@param int   $key   The action key
@param int   $index The action index
@param array $args  The action arguments

@return int The number of executed actions
357856
protected function preExecuteAction($key, $index, $args)
    {
        $executedCount = 0;
        switch ($key) {
            case self::ADD:
                $id = $args[0];
                if ($id && $this->rawLayoutBuilder->has($id)) {
                    $executedCount += $this->executeDependedRemoveAction($index, $id);
                }
                break;
        }

        return $executedCount;
    }
683533
protected function executeAction($index, $action)
    {
        list($key, $name, $args) = $action;

        $executedCount = $this->preExecuteAction($key, $index, $args);
        call_user_func_array([$this->rawLayoutBuilder, $name], $args);
        $executedCount++;
        $executedCount += $this->postExecuteAction($key, $index, $args);

        return $executedCount;
    }
69766
protected function getResult(callable $callable, array $args, string $index = null, bool $assoc = null){
		$out = new Result(null, $this->convert_encoding_src, $this->convert_encoding_dest);
		$i   = 0;

		/** @noinspection PhpAssignmentInConditionInspection */
		while($row = call_user_func_array($callable, $args)){
			$key = $assoc && !empty($index) ? $row[$index] : $i;

			$out[$key] = $row;
			$i++;
		}

		return $i === 0 ? true : $out;
	}
1183397
public function getArg($index = 0, $default = null)
    {
        return isset($this->args[$index]) ? $this->args[$index] : $default;
    }
698882
public function __lang($key, ...$args)
    {
        $string = array_key_exists($key, $this->messages_dictionary) ? $this->messages_dictionary[$key] : $key;
        return (func_num_args() > 1) ? vsprintf($string, $args) : $string;
    }
1296559
private function cmdMount($args)
    {
        $cmd = new MountCommand($this->cwd);

        return $cmd->run(array_slice($args, 1));
    }
1150379
public function execute(array $args, array $options = [])
    {
        if (!isset($args[0])) {
            throw new \InvalidArgumentException('arg action must be input');
        }
        $action = explode('::', $args[0]);
        if (!class_exists($action[0])) {
            throw new \InvalidArgumentException('action not not found!');
        }

        if (isset($args[1])) {
            $frequency = abs(intval($args[1]));
        } else {
            $frequency = null;
        }
        ProcessManage::addTask($action, $frequency);
    }
901728
public function arg( $index ) {
		return isset($this->arguments[$index]) ? $this->arguments[$index] : null;
	}
450320
private function _rindex($index, array $values) : int
    {
        if (is_int($index) && $index < 0){
            return count($values) + $index;
        }
        return $index;
    }
1351980
function get($key,$args=NULL) {
		if (is_string($val=$this->ref($key,FALSE)) && !is_null($args))
			return call_user_func_array(
				array($this,'format'),
				array_merge(array($val),is_array($args)?$args:array($args))
			);
		if (is_null($val)) {
			// Attempt to retrieve from cache
			if (Cache::instance()->exists($this->hash($key).'.var',$data))
				return $data;
		}
		return $val;
	}
213489
public function handle(Args $args, IO $io)
    {
        $path = Path::makeAbsolute($args->getArgument('path'), $this->currentPath);

        $resources = $this->repo->find($path);

        if (!count($resources)) {
            $io->errorLine(sprintf('No resources found for path %s', $path));

            return 1;
        }

        foreach ($resources as $resource) {
            if ($resource instanceof BodyResource) {
                $io->writeLine($resource->getBody());
            }
        }

        return 0;
    }
485428
public static function get($index = null, $default = null)
	{
		return (func_num_args() === 0) ? $_GET : \Arr::get($_GET, $index, $default);
	}
707491
public function tl($key, array $args = [], $lang = null)
    {
        return $this->translate($key, $args, $lang);
    }
416753
public static function split(array $args, $index = 0) {
		if (count($args) <= $index) {
			return [null, null];
		}
		$i = 0;
		foreach ($args as $key => $item) {
			if ($i == $index) {
				return [$key, $item];
			}
			$i ++ ;
		}
        return [null, null];
	}
1002855
public function handleList(Args $args, IO $io)
    {
        $modules = $this->getSelectedModules($args);

        if ($args->isOptionSet('format')) {
            $this->printModulesWithFormat($io, $modules, $args->getOption('format'));
        } else {
            $this->printModulesByState($io, $modules, $this->getSelectedStates($args));
        }

        return 0;
    }
837031
public function args($key = 0) {
		if (!empty($this->args[$key])) {
			return $this->args[$key];
		}
		return null;
	}
227880
public function mapUrl($controller, array $args = array(), $index = 0)
    {
        return $this->urlBuilder->createUrl($controller, $args, $index);
    }