EmbeddedServer::start PHP Method

start() public method

NB: The web service can take quite a bit longer than the process to start. So if you want to be sure you should instantiate SolrWebService and wait until it's status is SOLR_STATUS_ONLINE.
public start ( ) : boolean
return boolean true if the server started, otherwise false.
    function start()
    {
        // Run the start command.
        return $this->_runScript('start');
    }

Usage Example

コード例 #1
0
ファイル: EmbeddedServerTest.php プロジェクト: utlib/ojs
 /**
  * @covers EmbeddedServer
  */
 public function testStartStopIsRunning()
 {
     // Check whether the server is currently running.
     $running = $this->embeddedServer->isRunning();
     if ($running) {
         // If the server is running we stop it, then start it.
         // Stop the server.
         self::assertTrue($this->embeddedServer->stopAndWait());
         // Restart the server.
         self::assertTrue($this->embeddedServer->start());
         self::assertTrue($this->embeddedServer->isRunning());
     } else {
         // If the server is stopped, we start it, then stop it.
         // Start the server.
         self::assertTrue($this->embeddedServer->start());
         self::assertTrue($this->embeddedServer->isRunning());
         // Stop the server.
         self::assertTrue($this->embeddedServer->stopAndWait());
     }
 }
All Usage Examples Of EmbeddedServer::start