Back to WritableContainerLoader class

Method has

public bool
has
(mixed $name)
Checks if a command exists.
Parameters
  • string $name The command to check.
Returns
  • bool
Since
  • 4.0.0

Method has - Source code

/**
 * Checks if a command exists.
 *
 * @param   string  $name  The command to check.
 *
 * @return  boolean
 *
 * @since   4.0.0
 */
public function has($name) : bool
{
    return isset($this->commandMap[$name]) && $this->container->has($this->commandMap[$name]);
}