src/Criteria.php
public function toScript()
    {
        $script = "(";
        $first = true;
        foreach ($this->getCriteria() as $c) {
            $script .= $first ? "" :  " {$this->getLogicalOperator()} ";
            $script .= $c->toScript();
            $first = false;
        }
        $script .= ")";
        return $script;
    }
public function toScript()
    {
        $script = "(";
        $first = true;
        foreach ($this->getCriteria() as $c) {
            $script .= $first ? "" :  " {$this->getLogicalOperator()} ";
            $script .= $c->toScript();
            $first = false;
        }
        $script .= ")";
        return $script;
    }
public function toScript ( ) { $ script = "(" ; $ first = true ; foreach ( $ this -> getCriteria ( ) as $ c ) { $ script .= $ first ? "" : " {$this->getLogicalOperator()} " ; $ script .= $ c -> toScript ( ) ; $ first = false ; } $ script .= ")" ; return $ script ; }
Creates a JavaScript readable representation of the logic
@return string
Creates a JavaScript readable representation of the logic