Literal.php 405 Bytes
Newer Older
romanb's avatar
romanb committed
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24
<?php

namespace Doctrine\ORM\Query\AST;

class Literal extends Node
{
    const STRING = 1;
    const BOOLEAN = 2;
    const NUMERIC = 3;
    
    public $type;
    public $value;
    
    public function __construct($type, $value)
    {
        $this->type = $type;
        $this->value = $value;
    }
    
    public function dispatch($walker)
    {
        return $walker->walkLiteral($this);
    }
}