SimpleHtmlSaxParser::acceptAttributeToken PHP Method

acceptAttributeToken() public method

Part of the tag data.
public acceptAttributeToken ( string $token, integer $event ) : boolean
$token string Incoming characters.
$event integer Lexer event type.
return boolean False if parse error.
    public function acceptAttributeToken($token, $event)
    {
        if ($this->current_attribute) {
            if ($event == LEXER_UNMATCHED) {
                $this->attributes[$this->current_attribute] .= html_entity_decode($token, ENT_QUOTES);
            }
            if ($event == LEXER_SPECIAL) {
                $this->attributes[$this->current_attribute] .= preg_replace('/^=\\s*/', '', html_entity_decode($token, ENT_QUOTES));
            }
        }
        return true;
    }