HTMLPurifier_Injector::backward PHP Method

backward() protected method

Iterator function, starts with the previous token and continues until you reach the beginning of input tokens.
protected backward ( integer &$i, HTMLPurifier_Token &$current ) : boolean
$i integer Current integer index variable for inputTokens
$current HTMLPurifier_Token Current token variable. Do NOT use $token, as that variable is also a reference
return boolean
    protected function backward(&$i, &$current)
    {
        if ($i === null) {
            $i = count($this->inputZipper->front) - 1;
        } else {
            $i--;
        }
        if ($i < 0) {
            return false;
        }
        $current = $this->inputZipper->front[$i];
        return true;
    }