Cake\Console\Shell::hasMethod PHP Method

hasMethod() public method

Check to see if this shell has a callable method by the given name.
public hasMethod ( string $name ) : boolean
$name string The method name to check.
return boolean
    public function hasMethod($name)
    {
        try {
            $method = new ReflectionMethod($this, $name);
            if (!$method->isPublic()) {
                return false;
            }
            return $method->getDeclaringClass()->name !== 'Cake\\Console\\Shell';
        } catch (ReflectionException $e) {
            return false;
        }
    }