/** * Where constructor. * * @param string $column The column name. * @param mixed $value The value that the column should be compared to. * @param string $operator Operator to be used to compare the column and value. * @param string $boolean The method by which multiple WHERE clauses should relate to this one. */ function __construct($column, $value, $operator, $boolean) { $this->column = $column; $this->value = Statement::cast($value); $this->operator = $operator; $this->boolean = $boolean; }
/** * Insert constructor. * * @param $data */ function __construct($data) { $data = InsertStatement::cast($data); foreach ($data as $field => $value) { array_push($this->fields, $field); array_push($this->values, $value); } }
public function testCast() { $this->assertEquals('\'testInput\'', Statement::cast('testInput')); }
/** * Update constructor. * * @param $data */ function __construct($data) { $data = S::cast($data); $this->fields = $data; }