@param string $key
@param array  $syntax

@return array
163152
public function syntax2Array(string $key, array $syntax): array
    {
        $props  = $this->props[$key] ?? null;
        $closed = $this->closed[$key] ?? false;

        return Cache::get(__CLASS__ . $key, function () use ($syntax, $props, $closed) {
            return [
                'syntax' => $syntax,
                'props'  => $props,
                'closed' => $closed,
            ];
        });
    }
23298
private function matchAny(array $tokens)
    {
        if (!$this->lexer->isNextTokenAny($tokens)) {
            throw SyntaxException::expectedToken(
                implode(
                    ' or ',
                    array_map(array($this->lexer, 'getLiteral'), $tokens)
                ),
                null,
                $this->lexer
            );
        }

        return $this->lexer->moveNext();
    }
773360
protected function getLexemes(string $key, array $data)
    {
        $syntax = $this->tryLoad($key);

        if (empty($this->data[$key]))
        {
            $syntax = $this->syntax($key, $data);
            $this->syntax2Array($key, $syntax);
        }

        return $syntax;
    }
1205310
protected function parseKey($key)
    {
        if (!isset($this->keys[$key])) {
            $this->keys[$key] = explode($this->separator, $key);
        }

        return $this->keys[$key];
    }
722031
public function fieldsByKey($key)
	{
		$keys = array();

		if ($this->rows && $this->count())
		{
			foreach ($this->rows as $row)
			{
				$keys[] = $row->$key;
			}
		}

		return $keys;
	}
1355290
public function compilePattern($key) {
		$items = $this->patterns[$key];
		if (is_array($items)) {
			$items = implode(null, $items);
		}
		return String::insert($items, $this->regexInject);
	}
116209
public function toArrayByKey($key)
    {
        $data = [];
        if (isset($this->id)) {
            $data['id[' . $key . ']'] = $this->getId();
        }
        if (isset($this->pr)) {
            $data['pr[' . $key . ']'] = $this->getPr();
        }
        if (isset($this->no)) {
            $data['no[' . $key . ']'] = $this->getNo();
        }
        if (isset($this->de)) {
            $data['de[' . $key . ']'] = $this->getDe();
        }
        if (isset($this->it)) {
            $data['it[' . $key . ']'] = $this->getIt();
        }
        if (isset($this->va)) {
            $data['va[' . $key . ']'] = $this->getVa();
        }
        if (isset($this->sd)) {
            $data['sd[' . $key . ']'] = $this->getSd();
        }
        if (isset($this->ed)) {
            $data['ed[' . $key . ']'] = $this->getEd();
        }

        return $data;
    }
316077
public static function parseSeries(array $tokens): array
    {
        foreach ($tokens as $token) {
            if ($token->isString()) {
                throw SyntaxErrorException::stringAsFunctionArgument();
            }
        }

        $joined = trim(implode('', array_map(function (Token $token) {
            return $token->getValue();
        }, $tokens)));

        $int = function ($string) {
            if (!is_numeric($string)) {
                throw SyntaxErrorException::stringAsFunctionArgument();
            }

            return (int) $string;
        };

        switch (true) {
            case 'odd' === $joined:
                return [2, 1];
            case 'even' === $joined:
                return [2, 0];
            case 'n' === $joined:
                return [1, 0];
            case false === strpos($joined, 'n'):
                return [0, $int($joined)];
        }

        $split = explode('n', $joined);
        $first = isset($split[0]) ? $split[0] : null;

        return [
            $first ? ('-' === $first || '+' === $first ? $int($first.'1') : $int($first)) : 1,
            isset($split[1]) && $split[1] ? $int($split[1]) : 0,
        ];
    }
966307
final protected function getArrayValue(string $key): array
    {
        $value = $this->getConfigValue($key);
        if (!$value || !\is_array($value)) {
            return [];
        }

        return $value;
    }
1214596
public function keys(?string $key = null) : array
    {
        $value = $this->get($key);

        if (!is_array($value)) {
            throw new InvalidArgumentException(
                'method keys() should be called on array'
            );
        }

        return array_keys($value);
    }
1138537
public static function alias( $key, $to = null )
	{
		if ( is_null( $to ) || is_array( $to ) ) 
		{
			if ( array_key_exists( $key, static::$aliases ) )
			{
				if ( is_array( $to ) )
				{	
					// Workaround for HHVM: return preg_replace( "/\[\w+\]/e", 'array_shift($to)', static::$aliases[$key] );
					$return = static::$aliases[$key];
					
					foreach( $to as $rpl )
					{
						$return = preg_replace( "/\[\w+\]/", $rpl, $return, 1 );
					}
					
					return $return;
				}
				return static::$aliases[$key];
			}
			return false;
		}
		static::$aliases[$key] = $to;
	}
344455
public function get($key, array $replace = [])
    {
        return $this->translator->get($this->composeKey($key), $replace, $this->locale);
    }
105719
public function parseToken($key = 'access_token')
    {
        if ( $token = $this->getToken() )
        {
            $token_array = json_decode($token, true);

            return $token_array[$key];
        }
    }
750948
public function &offsetGet($key) {
        for($i = 0; $i < count($this->arrays); ++$i) {
            if(Util::exists($this->arrays[$i], $key)) {
                return $this->arrays[$i][$key];
            }
        }
        throw new KeyNotFoundException($key);
    }
9968
public static function pluck(array $values, $key)
    {
        return array_map(
            function($val) use ($key) {
                return is_object($val) ? $val->{$key} : $val[$key];
            },
            $values
        );
    }
581488
protected function input($key = null)
	{
		if ($key === null) {
			return Input::all();
		} elseif (is_array($key)) {
			return Input::only($key);
		} else {
			return Input::get($key);
		}
	}
5233
public function paramsFor(string $key): array
    {
        $params = [];
        if (isset($this->params[$key])) {
            $params = $this->params[$key];
        }

        return $params;
    }