protected function parseChain($chain)
    {
        $parts = is_array($chain) ? $chain : explode('|', $chain);
        $parsed = [];

        foreach ($parts as $name) {
            list($operator, $key) = $this->splitExpression($name);

            $dotPos = strpos($key, ':');

            list($key, $parameters) = $dotPos ? explode(':', $key, 2) : [$key, ''];

            $parsed[$key] = [
                'operator'   => $operator,
                'parameters' => $parameters ? explode(',', $parameters) : [],
            ];
        }

        return $parsed;
    }
protected function parseChain($chain)
    {
        $parts = is_array($chain) ? $chain : explode('|', $chain);
        $parsed = [];

        foreach ($parts as $name) {
            list($operator, $key) = $this->splitExpression($name);

            $dotPos = strpos($key, ':');

            list($key, $parameters) = $dotPos ? explode(':', $key, 2) : [$key, ''];

            $parsed[$key] = [
                'operator'   => $operator,
                'parameters' => $parameters ? explode(',', $parameters) : [],
            ];
        }

        return $parsed;
    }
protected function parseChain ( $ chain ) { $ parts = is_array ( $ chain ) ? $ chain : explode ( '|' , $ chain ) ; $ parsed = [ ] ; foreach ( $ parts as $ name ) { list ( $ operator , $ key ) = $ this -> splitExpression ( $ name ) ; $ dotPos = strpos ( $ key , ':' ) ; list ( $ key , $ parameters ) = $ dotPos ? explode ( ':' , $ key , 2 ) : [ $ key , '' ] ; $ parsed [ $ key ] = [ 'operator' => $ operator , 'parameters' => $ parameters ? explode ( ',' , $ parameters ) : [ ] , ] ; } return $ parsed ; }
Parses a passed chain into a native format.

@param string|array $chain

@return array
Parses a passed chain into a native format .