PhpPeg\PHPWriter::restore PHP Method

restore() public method

public restore ( $id, $remove = FALSE )
    function restore($id, $remove = FALSE)
    {
        $code = PHPBuilder::build()->l('$result = $res' . $id . ';', '$this->pos = $pos' . $id . ';');
        if ($remove) {
            $code->l('unset( $res' . $id . ' );', 'unset( $pos' . $id . ' );');
        }
        return $code;
    }