コード例 #1
0
ファイル: Query.php プロジェクト: Textalk/opis-database
 public function __construct(Connection $connection, Model $model)
 {
     $this->model = $model;
     $this->connection = $connection;
     $compiler = $connection->compiler();
     $query = new Select($compiler, $model->getTable());
     $whereCondition = new WhereCondition($this, $query);
     parent::__construct($compiler, $query, $whereCondition);
 }
コード例 #2
0
ファイル: Update.php プロジェクト: cgslivre/database-1
 /**
  * Constructor
  * 
  * @param   Connection      $connection
  * @param   string|array    $table
  */
 public function __construct(Connection $connection, $table)
 {
     parent::__construct($connection->compiler(), $table);
     $this->connection = $connection;
 }
コード例 #3
0
ファイル: Insert.php プロジェクト: Textalk/opis-database
 public function __construct(Connection $connection, array $values)
 {
     parent::__construct($connection->compiler());
     $this->connection = $connection;
     $this->insert($values);
 }