コード例 #1
0
ファイル: Where.php プロジェクト: mykehowells/factotum
 /**
  * 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;
 }
コード例 #2
0
ファイル: Insert.php プロジェクト: mykehowells/factotum
 /**
  * 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);
     }
 }
コード例 #3
0
 public function testCast()
 {
     $this->assertEquals('\'testInput\'', Statement::cast('testInput'));
 }
コード例 #4
0
ファイル: Update.php プロジェクト: mykehowells/factotum
 /**
  * Update constructor.
  *
  * @param $data
  */
 function __construct($data)
 {
     $data = S::cast($data);
     $this->fields = $data;
 }