Mutagenesis\Mutable::_parseTokensToMutations PHP Метод

_parseTokensToMutations() защищенный Метод

Based on the internal array of mutable methods, generate another internal array of supported mutations accessible using getMutations().
protected _parseTokensToMutations ( array $mutables ) : void
$mutables array
Результат void
    protected function _parseTokensToMutations(array $mutables)
    {
        foreach ($mutables as $method) {
            if (!isset($method['tokens']) || empty($method['tokens'])) {
                continue;
            }
            foreach ($method['tokens'] as $index => $token) {
                if (is_string($token)) {
                    $mutation = $this->_parseStringToken($token, $index);
                } else {
                    $mutation = $this->_parseToken($token, $index);
                }
                if (!is_null($mutation)) {
                    $this->_mutations[] = $method + array('index' => $index, 'mutation' => $mutation);
                }
            }
        }
    }