Class PHPCrawlerProcessCommunication

Description

Class containing methods for process handling and communication

Located in /libs/PHPCrawler/ProcessCommunication/PHPCrawlerProcessCommunication.class.php (line 8)


	
			
Variable Summary
Method Summary
PHPCrawlerProcessCommunication __construct (string $crawler_uniqid, int $multiprocess_mode, string $working_directory, bool $enable_resumtion)
array getChildPIDs ([int $process_count = null])
void registerChildPID (int $pid)
void setCrawlerStatus (PHPCrawlerStatus $crawler_status)
void updateCrawlerStatus (PHPCrawlerDocumentInfo $PageInfo, [int $abort_reason = null], [string $first_content_url = null])
Variables
mixed $crawlerStatus (line 16)
  • access: protected
mixed $crawler_uniqid (line 10)
  • access: protected
mixed $multiprocess_mode (line 12)
  • access: protected
PHPCrawlerDocumentInfoQueue $resumtion_enabled = false (line 23)

Flag indicating whether resumtion is activated

  • access: protected
mixed $working_directory (line 14)
  • access: protected
Methods
Constructor __construct (line 33)

Initiates a new PHPCrawlerProcessCommunication-object.

  • access: public
PHPCrawlerProcessCommunication __construct (string $crawler_uniqid, int $multiprocess_mode, string $working_directory, bool $enable_resumtion)
  • string $crawler_uniqid: UID of the crawler
  • int $multiprocess_mode: Multprocess-mode the crawler is running (one of the PHPCrawlerMultiProcessModes-constants)
  • string $working_directory: Working-dir of the crawler
  • bool $enable_resumtion: TRUE if resumption of crawling-processes should be possible
childProcessAlive (line 192)

Checks wehther any child-processes a (still) running.

  • access: public
bool childProcessAlive ()
getChildPIDs (line 152)

Returns alls PIDs of all running child-processes

  • return: Numeric array conatining the PIDs
  • access: public
array getChildPIDs ([int $process_count = null])
  • int $process_count: If set, this function tries to get the child-PIDs until the gievn number of PIDs was determinated.
getCrawlerStatus (line 64)

Returns/reads the current crawler-status

  • return: The current crawlerstatus as a PHPCrawlerStatus-object
  • access: public
PHPCrawlerStatus getCrawlerStatus ()
killChildProcesses (line 178)

Kills all running child-processes

  • access: public
void killChildProcesses ()
registerChildPID (line 135)

Registers the PID of a child-process

  • access: public
void registerChildPID (int $pid)
  • int $pid: The IPD
setCrawlerStatus (line 48)

Sets/writes the current crawler-status

  • access: public
void setCrawlerStatus (PHPCrawlerStatus $crawler_status)
updateCrawlerStatus (line 85)

Updates the status of the crawler

  • access: public
void updateCrawlerStatus (PHPCrawlerDocumentInfo $PageInfo, [int $abort_reason = null], [string $first_content_url = null])
  • PHPCrawlerDocumentInfo $PageInfo: The PHPCrawlerDocumentInfo-object of the last received document or NULL if no document was received.
  • int $abort_reason: One of the PHPCrawlerAbortReasons::ABORTREASON-constants if the crawling-process should get aborted, otherwise NULL
  • string $first_content_url: The first URL some content was found in (or NULL if no content was found so far).

Documentation generated on Sun, 20 Jan 2013 21:18:50 +0200 by phpDocumentor 1.4.4