コード例 #1
0
ファイル: SqlUnity.php プロジェクト: papac/framework
 /**
  * SqlUnity Contructor
  *
  * @param Table $table
  * @param mixed $id
  * @param null|\stdClass $data
  * @throws TableException
  */
 public function __construct(Table $table, $id, $data = null)
 {
     if ($data === null) {
         $data = $table->getOne();
     }
     if ($data == null) {
         throw new TableException('Aucune donnée trouvé.', E_ERROR);
     }
     $this->data = $data;
     $this->table = $table;
     $this->id = $id;
 }