Check if argument exists.

@param string $argument Argument name
@param string|null $alias Argument alias name (if exists)
@return bool
767899
public function has($argument, $alias = null)
    {
        if (isset($this->arguments[$argument])) {
            return true;
        } else
            if (! empty($alias) && isset($this->arguments[$alias])) {
                return true;
            } else {
                return false;
            }
    }
301244
public function getRelated($alias, $arguments = null) {
        $relationship = $this->getRelationship($alias);
        if(($relationship === false || $relationship instanceof CustomRelationship) && method_exists($this, "get" . ucfirst($alias))) {
            return call_user_func(array($this, "get" . ucfirst($alias)));
        }
        return parent::getRelated($alias, $arguments);
    }
725168
public function alias($alias, $path = null)
	{
		if (is_null($path))
		{
			return $this->aliases[$alias] ?: null;
		}
		else
		{
			$this->aliases[$alias] = $path;
		}
	}
478
public function find_subcommand( &$args ) {
		$name = array_shift( $args );

		$subcommands = $this->get_subcommands();

		if ( ! isset( $subcommands[ $name ] ) ) {
			$aliases = self::get_aliases( $subcommands );

			if ( isset( $aliases[ $name ] ) ) {
				$name = $aliases[ $name ];
			}
		}

		if ( ! isset( $subcommands[ $name ] ) ) {
			return false;
		}

		return $subcommands[ $name ];
	}
1328743
public static function alias(&$config, $key, $alias){
		if(!isset($config[$alias]))
			return;
		$tmp = & $config;
		foreach(explode('.', $key) as $key){
			$tmp = & $tmp[$key];
		}
		if(!isset($tmp))
			$tmp = $config[$alias];
	}
742634
private function _checkArgument($argument, $name)
    {
        if (!is_string($argument)) {
            $argument = strval($argument);
        }

        if (strlen($argument) == 0) {
            throw new Klarna_ArgumentNotSetException($name);
        }
    }
1251608
public function get(string $alias = null)
    {
        if (is_null($alias)) {
            return $this->aliases;
        }

        return $this->has($alias) ? $this->aliases[$alias] : false;
    }
211642
static function get($alias = null)
    {
        if ($alias === null) {
            return static::$config[static::$default];
        }
        if (isset(static::$config[$alias])) {
            return static::$config[$alias];
        } else {
            return false;
        }
    }
1186767
public function has($alias)
    {
        $alias = $this->normalizeNamespace($alias);

        if (isset($this->byAlias[$alias]) || isset($this->byEntity[$alias])) {
            return true;
        }

        return false;
    }
377919
public function setAlias($alias)
    {
        if (!$this->isValidAlias($alias)) {
            return false;
        }

        $updateAliasStm = $this->connection->prepare("UPDATE Page SET alias = :alias WHERE page_id = :page_id");
        $updateAliasStm->bindParam(":alias", $this->alias);
        $updateAliasStm->bindParam(":page_id", $this->page_id);
        $this->alias = $alias;
        $updateAliasStm->execute();

        return true;
    }
186407
public function createAlias($reference, $alias = null)
    {
        //if reference is array look for array(alias=>reference);
        if (is_array($reference)) {
            foreach ($reference as $key => $class) {
                $this->createAlias($class, $key);
            }

            return true;
        }

        //store in this->alias as an associative array of class to an array of aliases;
        foreach ((!is_array($alias) ? [$alias] : $alias) as $key) {
            $this->aliases[$key] = $reference;
        }
    }
783743
function alias( $aliasName )
    {
        $aliasList = $this->aliasList();
        if ( !array_key_exists( $aliasName, $aliasList ) )
            return false;
        return $aliasList[$aliasName];
    }
1271897
public function getFunctionByAlias($alias)
    {
        return $this->hasFunctionAlias($alias) ? $this->getExpression($this->getHash($alias)) : null;
    }
604650
public static function cacheExists($cacheName, $option = array(), $alias = null)
	{
		$obj = self::getInstance($alias);
		if ($obj)
		{
			return $obj->exists($cacheName, $option);
		}
		else
		{
			return false;
		}
	}
543980
private function adaptArgument(Argument $argument)
    {
        $mode = null;

        if ($argument->isMultiValued()) {
            $mode |= InputArgument::IS_ARRAY;
        }

        if ($argument->isOptional()) {
            $mode |= InputArgument::OPTIONAL;
        }

        if ($argument->isRequired()) {
            $mode |= InputArgument::REQUIRED;
        }

        return new InputArgument($argument->getName(), $mode, $argument->getDescription(), $argument->getDefaultValue());
    }
727676
public function alias($alias = null)
    {
        if ($alias === null) {
            return $this->_alias;
        }
        $this->_alias = $alias;

        return $this;
    }
528052
public function exists(string $command, array $arguments = []): bool
    {
        return $this->storage->contains(function ($value) use ($command, $arguments) {
            return $value['command'] === $command && $value['arguments'] === $arguments;
        });
    }