Symfony\Component\Console\Application::has PHP Метод

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

Returns true if the command exists, false otherwise.
public has ( string $name ) : boolean
$name string The command name or alias
Результат boolean true if the command exists, false otherwise
    public function has($name)
    {
        return isset($this->commands[$name]);
    }

Usage Example

 public function match(Request $request)
 {
     if (!$request instanceof ConsoleRequest) {
         return null;
     }
     $params = $request->getParams()->toArray();
     if (!isset($params[0]) || !$this->application->has($params[0])) {
         return null;
     }
     return new RouteMatch($this->defaults);
 }
All Usage Examples Of Symfony\Component\Console\Application::has