Example #1
0
 /**
  * @param \Backend\Database\Schemas\ILove $obj
  *
  * @return bool
  */
 public function create($obj)
 {
     if (is_object($obj)) {
         $this->clean($obj);
         $this->love = $obj->getLove();
         $this->synced = $obj->getSynced();
         if ($this->c->execute()) {
             $notification = new Notifications($this->getConnection());
             $obj = new Notification(null, "New ILove");
             $notification->create($obj);
             return true;
         }
     }
     return false;
 }
 /**
  * Creates a new row in database table
  *
  * @param Reassure $obj
  *
  * @return bool True on success, false otherwise
  */
 public function create($obj)
 {
     if (is_object($obj)) {
         $this->clean($obj);
         $this->reassure = $obj->getReassure();
         $this->synced = $obj->getSynced();
         $this->toUpdate = $obj->getToUpdate();
         if ($this->c->execute()) {
             $notification = new Notifications($this->getConnection());
             $obj = new Notification(null, "New Reassurance");
             $notification->create($obj);
             return true;
         }
     }
     return false;
 }
Example #3
0
 /**
  * @param Poem $obj
  *
  * @return bool
  */
 public function create($obj)
 {
     if (is_object($obj)) {
         $this->clean($obj);
         $this->author = $obj->getAuthor();
         $this->date = $obj->getDate();
         $this->name = $obj->getName();
         $this->poem = $obj->getPoem();
         $this->favourite = $obj->getFavourite();
         $this->synced = $obj->getSynced();
         $this->toUpdate = $obj->getToUpdate();
         if ($this->c->execute()) {
             $notification = new Notifications($this->getConnection());
             $obj = new Notification(null, "New Poem");
             $notification->create($obj);
             return true;
         }
     }
     return false;
 }