public function parse() {
        $name_without_parens = preg_replace('/[{}]/', '', $this->full_name);

        $parts = explode('|', $name_without_parens);
        $name_without_pipes = trim($parts[0]);

        $parts = explode('::', $name_without_pipes);
        $name_without_case_keys = trim($parts[0]);
        array_shift($parts);
        $this->case_keys = array_map('trim', $parts);

        $parts = explode(':', $name_without_case_keys);
        $this->short_name = trim($parts[0]);
        array_shift($parts);
        $this->context_keys = array_map('trim', $parts);

        $this->separator = (strpos($this->full_name,'||') !== false) ? '||' : '|';

        $this->parameters = array();
        $parts = explode($this->separator, $name_without_parens);
        if (count($parts) > 1) {
            $parts = explode(',', $parts[1]);
            foreach($parts as $part) {
                array_push($this->parameters, trim($part));
            }
        }
    }
public function parse() {
        $name_without_parens = preg_replace('/[{}]/', '', $this->full_name);

        $parts = explode('|', $name_without_parens);
        $name_without_pipes = trim($parts[0]);

        $parts = explode('::', $name_without_pipes);
        $name_without_case_keys = trim($parts[0]);
        array_shift($parts);
        $this->case_keys = array_map('trim', $parts);

        $parts = explode(':', $name_without_case_keys);
        $this->short_name = trim($parts[0]);
        array_shift($parts);
        $this->context_keys = array_map('trim', $parts);

        $this->separator = (strpos($this->full_name,'||') !== false) ? '||' : '|';

        $this->parameters = array();
        $parts = explode($this->separator, $name_without_parens);
        if (count($parts) > 1) {
            $parts = explode(',', $parts[1]);
            foreach($parts as $part) {
                array_push($this->parameters, trim($part));
            }
        }
    }
public function parse ( ) { $ name_without_parens = preg_replace ( '/[{}]/' , '' , $ this -> full_name ) ; $ parts = explode ( '|' , $ name_without_parens ) ; $ name_without_pipes = trim ( $ parts [ 0 ] ) ; $ parts = explode ( '::' , $ name_without_pipes ) ; $ name_without_case_keys = trim ( $ parts [ 0 ] ) ; array_shift ( $ parts ) ; $ this -> case_keys = array_map ( 'trim' , $ parts ) ; $ parts = explode ( ':' , $ name_without_case_keys ) ; $ this -> short_name = trim ( $ parts [ 0 ] ) ; array_shift ( $ parts ) ; $ this -> context_keys = array_map ( 'trim' , $ parts ) ; $ this -> separator = ( strpos ( $ this -> full_name , '||' ) !== false ) ? '||' : '|' ; $ this -> parameters = array ( ) ; $ parts = explode ( $ this -> separator , $ name_without_parens ) ; if ( count ( $ parts ) > 1 ) { $ parts = explode ( ',' , $ parts [ 1 ] ) ; foreach ( $ parts as $ part ) { array_push ( $ this -> parameters , trim ( $ part ) ) ; } } }
Parses token elements
Parses token elements