original_string: public function stop()
      {
          $httpServer = $this->getHttpServer();
  
          // 是否已启动
          if (!$httpServer->isRunning()) {
              \output()->writeln('<error>The server is not running! cannot stop</error>', true, true);
          }
  
          // pid文件
          $serverStatus = $httpServer->getServerSetting();
          $pidFile = $serverStatus['pfile'];
  
          \output()->writeln(sprintf('<info>Swoft %s is stopping ...</info>', input()->getScript()));
  
          $result = $httpServer->stop();
  
          // 停止失败
          if (!$result) {
              \output()->writeln(sprintf('<error>Swoft %s stop fail</error>', input()->getScript()), true, true);
          }
          //删除pid文件
          @unlink($pidFile);
  
          output()->writeln(sprintf('<success>Swoft %s stop success!</success>', input()->getScript()));
      }
code: public function stop()
      {
          $httpServer = $this->getHttpServer();
  
          // 是否已启动
          if (!$httpServer->isRunning()) {
              \output()->writeln('<error>The server is not running! cannot stop</error>', true, true);
          }
  
          // pid文件
          $serverStatus = $httpServer->getServerSetting();
          $pidFile = $serverStatus['pfile'];
  
          \output()->writeln(sprintf('<info>Swoft %s is stopping ...</info>', input()->getScript()));
  
          $result = $httpServer->stop();
  
          // 停止失败
          if (!$result) {
              \output()->writeln(sprintf('<error>Swoft %s stop fail</error>', input()->getScript()), true, true);
          }
          //删除pid文件
          @unlink($pidFile);
  
          output()->writeln(sprintf('<success>Swoft %s stop success!</success>', input()->getScript()));
      }
code_tokens: public function stop ( ) { $ httpServer = $ this -> getHttpServer ( ) ; // 是否已启动 if ( ! $ httpServer -> isRunning ( ) ) { \ output ( ) -> writeln ( '<error>The server is not running! cannot stop</error>' , true , true ) ; } // pid文件 $ serverStatus = $ httpServer -> getServerSetting ( ) ; $ pidFile = $ serverStatus [ 'pfile' ] ; \ output ( ) -> writeln ( sprintf ( '<info>Swoft %s is stopping ...</info>' , input ( ) -> getScript ( ) ) ) ; $ result = $ httpServer -> stop ( ) ; // 停止失败 if ( ! $ result ) { \ output ( ) -> writeln ( sprintf ( '<error>Swoft %s stop fail</error>' , input ( ) -> getScript ( ) ) , true , true ) ; } //删除pid文件 @ unlink ( $ pidFile ) ; output ( ) -> writeln ( sprintf ( '<success>Swoft %s stop success!</success>' , input ( ) -> getScript ( ) ) ) ; }
docstring: Stop the http server
  
  @Usage {fullCommand}
  @Example {fullCommand}
  @throws \InvalidArgumentException
  @throws \RuntimeException
docstring_tokens: Stop the http server