Exemple #1
0
 /**
  * Initializes the object.
  *
  * @param string $operator Operator used for the expression
  * @param string $name Name of variable that should be compared.
  * @param mixed $value Value that the variable should be compared to
  */
 public function __construct($operator, $name, $value)
 {
     if (!isset(self::$operators[$operator])) {
         throw new \Aimeos\MW\Common\Exception(sprintf('Invalid operator "%1$s"', $operator));
     }
     parent::__construct($operator, $name, $value);
 }
Exemple #2
0
 public function testCreateFunction()
 {
     $func = \Aimeos\MW\Criteria\Expression\Compare\Base::createFunction('test', array(true, 1, 0.1, 'string', array(2, 3)));
     $this->assertEquals('test(1,1,0.1,"string",[2,3])', $func);
 }