getStatus() публичный Метод

public getStatus ( callable $callback )
$callback callable
Пример #1
0
 protected function execute(InputInterface $input, OutputInterface $output)
 {
     $handler = new Client();
     $handler->getStatus(function ($status) {
         var_dump($status);
     });
 }
Пример #2
0
 protected function execute(InputInterface $input, OutputInterface $output)
 {
     $config = $this->initializeConfig($input, $output, false);
     $handler = new Client();
     $handler->setSocketPath($config['socket-path']);
     $handler->getStatus(function ($status) use($output) {
         foreach ($status as $key => $value) {
             $output->writeln(sprintf('%s: %s', $key, $value));
         }
     });
 }