Initiates a new PHPCrawlerProcessCommunication-object.
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
Checks wehther any child-processes a (still) running.
bool
childProcessAlive
()
Returns alls PIDs of all running child-processes
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.
Returns/reads the current crawler-status
Kills all running child-processes
void
killChildProcesses
()
Registers the PID of a child-process
void
registerChildPID
(int $pid)
Sets/writes the current crawler-status
Updates the status of the crawler
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).