protected function startChildProcessLoop()
  { 
    $this->initCrawlerProcess();
    
    // Call overidable method initChildProcess()
    $this->initChildProcess();
    
    // Start benchmark (if single-processed)
    if ($this->is_chlid_process == false)
    {
      PHPCrawlerBenchmark::start("crawling_process");
    }
    
    // Init vars
    $stop_crawling = false;
    
    // Main-Loop
    while ($stop_crawling == false)
    { 
      // Get next URL from cache
      $UrlDescriptor = $this->LinkCache->getNextUrl();
      
      // Process URL
      if ($UrlDescriptor != null)
      {
        $stop_crawling = $this->processUrl($UrlDescriptor);
      }
      else
      {
        sleep(1);
      }
      
      if ($this->multiprocess_mode != PHPCrawlerMultiProcessModes::MPMODE_PARENT_EXECUTES_USERCODE)
      {
        // If there's nothing more to do
        if ($this->LinkCache->containsURLs() == false)
        {
          $stop_crawling = true;
          $this->ProcessCommunication->updateCrawlerStatus(null, PHPCrawlerAbortReasons::ABORTREASON_PASSEDTHROUGH);
        }
        
        // Check for abort form other processes
        if ($this->checkForAbort() !== null) $stop_crawling = true;
      }
    }

    // Loop enden gere. If child-process -> kill it
    if ($this->is_chlid_process == true)
    {
      if ($this->multiprocess_mode == PHPCrawlerMultiProcessModes::MPMODE_PARENT_EXECUTES_USERCODE) return;
      else exit;
    }
    
    $this->crawlerStatus = $this->ProcessCommunication->getCrawlerStatus();
       
    // Cleanup crawler
    $this->cleanup();
    
    // Stop benchmark (if single-processed)
    if ($this->is_chlid_process == false)
    {
      PHPCrawlerBenchmark::stop("crawling_process");
    }
  }
protected function startChildProcessLoop()
  { 
    $this->initCrawlerProcess();
    
    // Call overidable method initChildProcess()
    $this->initChildProcess();
    
    // Start benchmark (if single-processed)
    if ($this->is_chlid_process == false)
    {
      PHPCrawlerBenchmark::start("crawling_process");
    }
    
    // Init vars
    $stop_crawling = false;
    
    // Main-Loop
    while ($stop_crawling == false)
    { 
      // Get next URL from cache
      $UrlDescriptor = $this->LinkCache->getNextUrl();
      
      // Process URL
      if ($UrlDescriptor != null)
      {
        $stop_crawling = $this->processUrl($UrlDescriptor);
      }
      else
      {
        sleep(1);
      }
      
      if ($this->multiprocess_mode != PHPCrawlerMultiProcessModes::MPMODE_PARENT_EXECUTES_USERCODE)
      {
        // If there's nothing more to do
        if ($this->LinkCache->containsURLs() == false)
        {
          $stop_crawling = true;
          $this->ProcessCommunication->updateCrawlerStatus(null, PHPCrawlerAbortReasons::ABORTREASON_PASSEDTHROUGH);
        }
        
        // Check for abort form other processes
        if ($this->checkForAbort() !== null) $stop_crawling = true;
      }
    }

    // Loop enden gere. If child-process -> kill it
    if ($this->is_chlid_process == true)
    {
      if ($this->multiprocess_mode == PHPCrawlerMultiProcessModes::MPMODE_PARENT_EXECUTES_USERCODE) return;
      else exit;
    }
    
    $this->crawlerStatus = $this->ProcessCommunication->getCrawlerStatus();
       
    // Cleanup crawler
    $this->cleanup();
    
    // Stop benchmark (if single-processed)
    if ($this->is_chlid_process == false)
    {
      PHPCrawlerBenchmark::stop("crawling_process");
    }
  }
protected function startChildProcessLoop ( ) { $ this -> initCrawlerProcess ( ) ; // Call overidable method initChildProcess()
 $ this -> initChildProcess ( ) ; // Start benchmark (if single-processed)
 if ( $ this -> is_chlid_process == false ) { PHPCrawlerBenchmark :: start ( "crawling_process" ) ; } // Init vars
 $ stop_crawling = false ; // Main-Loop
 while ( $ stop_crawling == false ) { // Get next URL from cache
 $ UrlDescriptor = $ this -> LinkCache -> getNextUrl ( ) ; // Process URL
 if ( $ UrlDescriptor != null ) { $ stop_crawling = $ this -> processUrl ( $ UrlDescriptor ) ; } else { sleep ( 1 ) ; } if ( $ this -> multiprocess_mode != PHPCrawlerMultiProcessModes :: MPMODE_PARENT_EXECUTES_USERCODE ) { // If there's nothing more to do
 if ( $ this -> LinkCache -> containsURLs ( ) == false ) { $ stop_crawling = true ; $ this -> ProcessCommunication -> updateCrawlerStatus ( null , PHPCrawlerAbortReasons :: ABORTREASON_PASSEDTHROUGH ) ; } // Check for abort form other processes
 if ( $ this -> checkForAbort ( ) !== null ) $ stop_crawling = true ; } } // Loop enden gere. If child-process -> kill it
 if ( $ this -> is_chlid_process == true ) { if ( $ this -> multiprocess_mode == PHPCrawlerMultiProcessModes :: MPMODE_PARENT_EXECUTES_USERCODE ) return ; else exit ; } $ this -> crawlerStatus = $ this -> ProcessCommunication -> getCrawlerStatus ( ) ; // Cleanup crawler
 $ this -> cleanup ( ) ; // Stop benchmark (if single-processed)
 if ( $ this -> is_chlid_process == false ) { PHPCrawlerBenchmark :: stop ( "crawling_process" ) ; } }
Starts the loop of a child-process.
Starts the loop of a child - process .