public function addDocumentInfo(PHPCrawlerDocumentInfo $DocInfo)
  {
    // If queue is full -> wait a little
    while ($this->getDocumentInfoCount() >= $this->queue_max_size)
    {
      sleep(0.5);
    }
    
    $this->createPreparedStatements();
    
    $ser = serialize($DocInfo);
    
    $this->PDO->exec("BEGIN EXCLUSIVE TRANSACTION");
    $this->prepared_insert_statement->bindParam(1, $ser, PDO::PARAM_LOB);
    $this->prepared_insert_statement->execute();
    $this->prepared_select_statement->closeCursor();
    $this->PDO->exec("COMMIT");
  }
public function addDocumentInfo(PHPCrawlerDocumentInfo $DocInfo)
  {
    // If queue is full -> wait a little
    while ($this->getDocumentInfoCount() >= $this->queue_max_size)
    {
      sleep(0.5);
    }
    
    $this->createPreparedStatements();
    
    $ser = serialize($DocInfo);
    
    $this->PDO->exec("BEGIN EXCLUSIVE TRANSACTION");
    $this->prepared_insert_statement->bindParam(1, $ser, PDO::PARAM_LOB);
    $this->prepared_insert_statement->execute();
    $this->prepared_select_statement->closeCursor();
    $this->PDO->exec("COMMIT");
  }
public function addDocumentInfo ( PHPCrawlerDocumentInfo $ DocInfo ) { // If queue is full -> wait a little
 while ( $ this -> getDocumentInfoCount ( ) >= $ this -> queue_max_size ) { sleep ( 0.5 ) ; } $ this -> createPreparedStatements ( ) ; $ ser = serialize ( $ DocInfo ) ; $ this -> PDO -> exec ( "BEGIN EXCLUSIVE TRANSACTION" ) ; $ this -> prepared_insert_statement -> bindParam ( 1 , $ ser , PDO :: PARAM_LOB ) ; $ this -> prepared_insert_statement -> execute ( ) ; $ this -> prepared_select_statement -> closeCursor ( ) ; $ this -> PDO -> exec ( "COMMIT" ) ; }
Adds a PHPCrawlerDocumentInfo-object to the queue
Adds a PHPCrawlerDocumentInfo - object to the queue