Whether the command with the given name was specified. See {@link Input::isCommand()} for the definition of "command".

@param  string $name

@return bool|int - boolean value or number of times the command was specified (if defined)
174660
public function hasCommand($name) {
        if (!$this->docoptResult)
            return false;

        if ($this->isCommand($name)) {
            $value = $this->docoptResult[$name];
            if (is_int($value) && $value > 1)
                return $value;
            return (bool) $value;
        }
        return false;
    }
1218814
public function has($name)
    {
        $this->init();

        return isset($this->commands[$name]) || ($this->commandLoader && $this->commandLoader->has($name) && $this->add($this->commandLoader->get($name)));
    }
1276821
public function hasOption($name) {
        return $this->definition->hasOption($name) && isset($this->options[$name]);
    }
512819
public function has($name)
    {
        $name = self::normalizeName($name);

        if (strpos($name, '[') !== false) {
            $names = explode('[', str_replace(']', '', $name));
            $key = array_shift($names);
            $item = isset($this->parameters[$key]) ? $this->parameters[$key] : [];

            foreach ($names as $key) {
                if (!isset($item[$key])) {
                    return false;
                }

                $item = $item[$key];
            }

            return !empty($item);
        }

        return !empty($this->parameters[$name]);
    }
1180868
public function __isset($name)
    {
        try {
            $this->__get($name);
        } catch (InvalidArgumentException | ReflectionException $e) {
            return false;
        }

        return true;
    }
416667
protected function _default($name) {
		$commands = [
			['model', $name],
			['controller', $name],
			['test', 'model', $name],
			['test', 'controller', $name]
		];
		foreach ($commands as $args) {
			$command = $this->template = $this->request->params['command'] = array_shift($args);
			$this->request->params['action'] = array_shift($args);
			$this->request->params['args'] = $args;

			if (!$this->_execute($command)) {
				return false;
			}
		}
		return true;
	}
614609
public function hasMethod($name) {
		try {
			$method = new ReflectionMethod($this, $name);
			if (!$method->isPublic() || substr($name, 0, 1) === '_') {
				return false;
			}
			if ($method->getDeclaringClass()->name === 'Shell') {
				return false;
			}
			$installerCommands = $this->ConfigInstaller->getListInstallerCommands(false);
			$defaultCommands = ['main' => null];
			$commands = $installerCommands + $defaultCommands;
			if (!array_key_exists($name, $commands)) {
				return false;
			}

			return true;
		} catch (ReflectionException $e) {
			return false;
		}

		return true;
	}
585785
public function __isset($name) : bool
    {
        return in_array($name, $this->explorableIndex, true) && isset($this->{$name});
    }
49786
public function hasArgument($name)
    {
        $offset = array_search($name, $this->argNames, true);
        if ($offset === false) {
            return false;
        }

        return isset($this->args[$offset]);
    }
749515
public function get($name)
    {
        $this->init();

        if (!$this->has($name)) {
            throw new CommandNotFoundException(sprintf('The command "%s" does not exist.', $name));
        }

        $command = $this->commands[$name];

        if ($this->wantHelps) {
            $this->wantHelps = false;

            $helpCommand = $this->get('help');
            $helpCommand->setCommand($command);

            return $helpCommand;
        }

        return $command;
    }
84012
public function __isset( string $name ) {
		return (bool) $this->$name ?? $this->_attributes[ $name ] ?? FALSE;
	}
1250251
public function has(string $name) : bool
    {
        try {
            $result = $this->configCommand($name);
        } catch (RuntimeException $exception) {
            return false;
        }

        return $result->isSuccessful();
    }
714177
public function __isset(string $name): bool
    {
        try {
            $value = $this->__get($name);

            $result = ($value !== null);
        } catch (Exception $e) {
            $result = false;
        }

        return $result;
    }
695155
public function HasParam ($name = '') {
		if ($this->params === NULL) $this->initParams();
		return isset($this->params[$name]);
	}
977214
public function contains($name)
    {
        return isset($this->commands[$name]) || isset($this->shortNameIndex[$name]) || isset($this->aliasIndex[$name]);
    }
43240
public function hasParameter(string $name): bool {
		foreach ($this->parameters as $param) {
			if ($param->getName() == $name) {
				return true;
			}
		}

		return false;
	}
115413
public function __isset($name)
    {
        return isset($this->properties[$name]) && !empty($this->properties[$name]);
    }