コード例 #1
0
ファイル: ILove.php プロジェクト: evolutionarycoder/projectz
 /**
  * @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;
 }
コード例 #2
0
 /**
  * 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;
 }
コード例 #3
0
ファイル: Poems.php プロジェクト: evolutionarycoder/projectz
 /**
  * @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;
 }
コード例 #4
0
<?php

/**
 * Created by PhpStorm.
 * User: evolutionarycoder
 * Date: 2/17/16
 * Time: 12:41 PM
 *
 */
header("Cache-Control: no-cache, no-store");
header("Pragma: no-cache");
use Backend\Database\Tables\Notifications;
use Backend\Helpers\Email;
include "../../../vendor/autoload.php";
if (isset($_GET["fetch"])) {
    $table = new Notifications();
    if ($table->createJson()) {
        $email = new Email("MyLove Synced", "Table " . Notifications::TABLE_NAME);
        $email->send();
        header("Location: ../json/" . Notifications::JSON_NAME);
    } else {
        echo "false";
    }
}