Constructs builder method and executes with arguments
@param string $key
@param mixed|null $arg
@return mixed
519447
protected function buildClaim($key, $arg = null)
    {
        $claimBuilder = sprintf('build%sClaim', ucfirst($key));
        return $this->{$claimBuilder}($arg);
    }
1335739
public static TranslatableComponent make(final @NonNull String key, final @NonNull List<Component> args, final @NonNull Consumer<Builder> consumer) {
    final Builder builder = builder(key).args(args);
    consumer.accept(builder);
    return builder.build();
  }
496970
public function getArgs($key = NULL)
    {
        if (NULL === $key) {
            return $this->args;
        }

        if (!isset($this->args[$key])) {
            return;
        }

        return $this->args[$key];
    }
258580
public function addMessage($key, array $args = array())
    {
        // We will only display these messages once.
        if (isset($this->keys[$key]) === false) {
            // Add it to the keys, so the CMS can display it.
            $this->keys[$key] = array('key' => $key, 'params' => $args);
            $this->messages[] = $this->getHelp($key, $args);
        }
    }
91694
public function build(string $key)
    {
        if ($this->has($key)) {
            $object = $this->get($key);
        } else {
            $object = $this->create($key);
            $this->inject($key, $object);
        }

        return $object;
    }
723479
protected function getParameter($args, $key, $defaultValue = NULL)
    {
        $value = util::array_get($args[$key]);
        return is_null($value) ? $defaultValue : $value;
    }
1362573
public function create($name, $argument = null)
    {
        $constructorArgs = func_get_args();
        array_shift($constructorArgs);
        return $this->createWithArgs($name, $constructorArgs);
    }
1172057
protected function argument($key = null)
    {
        if (is_null($key)) {
            return $this->input->getArguments();
        }

        return $this->input->getArgument($key);
    }
436831
public function build($name, $arg1 = null, $arg2 = null, $arg3 = null, $arg4 = null)
    {
        $class = $this->getClass($name);

        if ($class) {
            return new $class($arg1, $arg2, $arg3, $arg4);
        }

        return null;
    }
910822
public function getArgument($key)
    {
        $argument = $this->findArgument($key);
        if ($argument === null) {
            return null;
        }

        return $argument->getValue();
    }
153978
private function buildCommand($cmd, $args = array()) {
    while(list($name, $data) = each($args)) {
    $safeData = false;
      $filterType = mb_substr($name, 0, 1);
      switch($filterType) {
        case '%':
          $safeData = escapeshellarg($data);
          break;
        case '!':
          $safeData = escapeshellcmd($data);
          break;
        default:
          throw new \phpSec\Exception\InvalidArgumentException('Unknown variable type');
          break;
      }
      if($safeData !== false) {
        $cmd = str_replace($name, $safeData, $cmd);
      }
    }
    return $cmd;
  }
1236845
public function input($arg,...$args){
        /** $args != null */
        if($args) {
            if(is_array($args[0])) {
                //$this->input('get',['name','pass']);
                $args = [$arg,$args[0]];
            }
            else {
                //$this->input('name','pass');
                array_unshift($args,$arg);
                $args = [$this->method,$args];
            }
        }
        else {
            /** $args == null */
            //$this->input('name');
            //$this->input(['name','pass']);
            $args = [$this->method,$arg];
        }

        $input = call_user_func_array([$this,'form'],$args);

        if(is_array($input) === false) {
            return null;
        }

        if(count($input) == 1) {
            return current($input);
        }

        return array_values($input);
    }
1101835
public function addTable(string $key) : TomlBuilder
    {
        $this->exceptionIfKeyEmpty($key);
        $addPreNewline = $this->currentLine > 0 ? true : false;
        $keyParts = explode('.', $key);

        foreach ($keyParts as $keyPart) {
            $this->exceptionIfKeyEmpty($keyPart, "Table: \"{$key}\".");
            $this->exceptionIfKeyIsNotUnquotedKey($keyPart);
        }

        $line = "[{$key}]";
        $this->addTableKey($key);
        $this->append($line, true, false, $addPreNewline);

        return $this;
    }
444088
public function make($key)
    {
        // Check if set
        if (!isset($this->keys[$key])) {
            throw new \InvalidArgumentException('Identifier "'. $key .'" is not defined.');
        }

        // Check if it is a simple value (string, int etc) that
        // should be returned
        if (
            !is_object($this->raw[$key])
            || !method_exists($this->raw[$key], '__invoke')
        ) {
            return $this->raw[$key];
        }

        if ($this->types[$key] === self::TYPE_SINGLETON) {
            if (isset($this->resolved[$key])) {
                return $this->resolved[$key];
            }

            $this->locked[$key] = true;
            return $this->resolved[$key] = $this->raw[$key]($this);
        }

        // Return multiton
        return $this->raw[$key]($this);
    }
902630
public function getArgument($key)
    {
        if ($this->hasArgument($key)) {
            return $this->arguments[$key];
        }

        throw new \InvalidArgumentException(sprintf('%s not found in %s', $key, $this->getName()));
    }
1049714
public function trigger( $key, $caller = NULL, $arguments = NULL ){
		if( !( $events = $this->getBoundEvents( $key, TRUE ) ) )
			return NULL;
		$this->removeStopMark( $key );
		foreach( $events as $callback ){
			if( in_array( $key, $this->stopped ) )
				continue;
			$event	= new ADT_Event_Data( $this );
			$event->key			= $callback[0];
			$event->trigger		= $key;
			$event->caller		= $caller;
			$event->data		= $callback[1]->getData();
			$event->arguments	= $arguments;
			$result			= call_user_func( $callback[1]->getCallback(), $event );
			if( $result === FALSE )
				return FALSE;
		}
		return TRUE;
	}
164647
public function arg($key) {
		return isset($this->args->$key) ? $this->args->$key : null;
	}