public function __construct($limit, $skip = 0) { if ($skip == 0) { $value = $limit; } else { $value = [$skip, $limit]; } parent::__construct('$slice', $value); }
/** * @param Expression $firstOperand * @param Expression $secondOperand */ public function __construct(Expression $firstOperand, Expression $secondOperand) { parent::__construct('+', $firstOperand, $secondOperand); }
public function __construct($value) { parent::__construct('$push', $value); }
public function __construct($parent = null, $children = array()) { parent::__construct($parent, "not", $children); }
/** * Create new FunctionToken object which represent one mathematical function. * * @param string $value string representation of this function e.g. sin, cos, ... */ public function __construct($value) { parent::__construct($value, 3, Operator::O_LEFT_ASSOCIATIVE); $this->type = Token::T_FUNCTION; }
/** * Designated constructor. * Takes either single parameter — array of MQB_Conditions or several parameters-MQB_Conditions * * @param string|array $content,... */ public function __construct($content) { if (func_num_args() > 1) { parent::__construct(func_get_args()); } else { parent::__construct($content); } $this->startSql = "("; $this->implodeSql = " XOR "; $this->endSql = ")"; }
public function __construct($value) { parent::__construct('$addToSet', $value); }
/** * Meta constructor. */ public function __construct() { parent::__construct('$meta', 'textScore'); }