コード例 #1
0
ファイル: Item.php プロジェクト: paolopr/todolist
 /**
  * Create an entry in the database for this item
  * @return nothing
  */
 public function create()
 {
     $this->itemId = null;
     // TODO better way to do this must equla null to be new
     $this->dateCreated = new \DateTime('now');
     $this->dateUpdated = new \DateTime('now');
     $this->mostRecent = 1;
     if (!isset($this->revision)) {
         $this->revision = 0;
     }
     $this->isCompleted = false;
     $query = $this->createSqlStmt($this);
     Connect::create($query['query'], $query['params']);
 }