private function parse()
    {
        if (!self::$placeholders) {
            self::loadConfig();
        }
        $this->type = '';
        $this->modifiers = self::$lModifiers;
        $ph = $this->placeholder;
        if ($ph == '') {
            return true;
        }
        $comp = explode('-', $ph);
        if (count($comp) > 1) {
            $type = array_shift($comp);
            if (isset(self::$longs[$type])) {
                $this->type = self::$longs[$type];
            } elseif (isset(self::$longModifiers[$type])) {
                $this->modifiers[self::$longModifiers[$type]] = true;
            } else {
                return $this->error();
            }
            foreach ($comp as $c) {
                if (isset(self::$longModifiers[$c])) {
                    $this->modifiers[self::$longModifiers[$c]] = true;
                } else {
                    return $this->error();
                }
            }
            return true;
        }
        if (isset(self::$longs[$ph])) {
            $this->type = self::$longs[$ph];
            return true;
        }
        if (isset(self::$longModifiers[$ph])) {
            $this->modifiers[self::$longModifiers[$ph]] = true;
            return true;
        }
        $type = $ph[0];
        if (isset(self::$placeholders[$type])) {
            $this->type = $type;
        } elseif (isset(self::$lModifiers[$type])) {
            $this->modifiers[$type] = true;
        } else {
            return $this->error();
        }
        $len = strlen($ph);
        for ($i = 1; $i < $len; $i++) {
            $modifier = $ph[$i];
            if (isset(self::$lModifiers[$modifier])) {
                $this->modifiers[$modifier] = true;
            } else {
                return $this->error();
            }
        }
        return true;
    }
private function parse()
    {
        if (!self::$placeholders) {
            self::loadConfig();
        }
        $this->type = '';
        $this->modifiers = self::$lModifiers;
        $ph = $this->placeholder;
        if ($ph == '') {
            return true;
        }
        $comp = explode('-', $ph);
        if (count($comp) > 1) {
            $type = array_shift($comp);
            if (isset(self::$longs[$type])) {
                $this->type = self::$longs[$type];
            } elseif (isset(self::$longModifiers[$type])) {
                $this->modifiers[self::$longModifiers[$type]] = true;
            } else {
                return $this->error();
            }
            foreach ($comp as $c) {
                if (isset(self::$longModifiers[$c])) {
                    $this->modifiers[self::$longModifiers[$c]] = true;
                } else {
                    return $this->error();
                }
            }
            return true;
        }
        if (isset(self::$longs[$ph])) {
            $this->type = self::$longs[$ph];
            return true;
        }
        if (isset(self::$longModifiers[$ph])) {
            $this->modifiers[self::$longModifiers[$ph]] = true;
            return true;
        }
        $type = $ph[0];
        if (isset(self::$placeholders[$type])) {
            $this->type = $type;
        } elseif (isset(self::$lModifiers[$type])) {
            $this->modifiers[$type] = true;
        } else {
            return $this->error();
        }
        $len = strlen($ph);
        for ($i = 1; $i < $len; $i++) {
            $modifier = $ph[$i];
            if (isset(self::$lModifiers[$modifier])) {
                $this->modifiers[$modifier] = true;
            } else {
                return $this->error();
            }
        }
        return true;
    }
private function parse ( ) { if ( ! self :: $ placeholders ) { self :: loadConfig ( ) ; } $ this -> type = '' ; $ this -> modifiers = self :: $ lModifiers ; $ ph = $ this -> placeholder ; if ( $ ph == '' ) { return true ; } $ comp = explode ( '-' , $ ph ) ; if ( count ( $ comp ) > 1 ) { $ type = array_shift ( $ comp ) ; if ( isset ( self :: $ longs [ $ type ] ) ) { $ this -> type = self :: $ longs [ $ type ] ; } elseif ( isset ( self :: $ longModifiers [ $ type ] ) ) { $ this -> modifiers [ self :: $ longModifiers [ $ type ] ] = true ; } else { return $ this -> error ( ) ; } foreach ( $ comp as $ c ) { if ( isset ( self :: $ longModifiers [ $ c ] ) ) { $ this -> modifiers [ self :: $ longModifiers [ $ c ] ] = true ; } else { return $ this -> error ( ) ; } } return true ; } if ( isset ( self :: $ longs [ $ ph ] ) ) { $ this -> type = self :: $ longs [ $ ph ] ; return true ; } if ( isset ( self :: $ longModifiers [ $ ph ] ) ) { $ this -> modifiers [ self :: $ longModifiers [ $ ph ] ] = true ; return true ; } $ type = $ ph [ 0 ] ; if ( isset ( self :: $ placeholders [ $ type ] ) ) { $ this -> type = $ type ; } elseif ( isset ( self :: $ lModifiers [ $ type ] ) ) { $ this -> modifiers [ $ type ] = true ; } else { return $ this -> error ( ) ; } $ len = strlen ( $ ph ) ; for ( $ i = 1 ; $ i < $ len ; $ i ++ ) { $ modifier = $ ph [ $ i ] ; if ( isset ( self :: $ lModifiers [ $ modifier ] ) ) { $ this -> modifiers [ $ modifier ] = true ; } else { return $ this -> error ( ) ; } } return true ; }
Parses the placeholder
Parses the placeholder