コード例 #1
0
ファイル: Newsletter.php プロジェクト: vooodoo/mailjetbundle
 /**
  * Update the date when the newsletter will be sent.
  *
  * @param int   $ID       of the current newsletter
  * @param mixed $datetime to schedule the newsletter
  *
  * @return schedule
  */
 public function updateSchedule($ID, $datetime)
 {
     $this->name = $this->name . "/{$ID}/schedule";
     if ($datetime instanceof \DateTime) {
         $timestamp = $datetime->getTimestamp();
     } else {
         $timestamp = 'Now';
     }
     return parent::update($ID, array('Date' => $timestamp), false);
 }