Exemple #1
0
 /**
  * Removes an job from the cron tab
  *
  * @param Enlight_Components_Cron_Job $job
  * @return Enlight_Components_Cron_Adapter_DbTable
  */
 public function removeJob(Enlight_Components_Cron_Job $job)
 {
     $where = $this->getAdapter()->quoteInto($this->getAdapter()->quoteIdentifier($this->_primary) . ' = ?', $job->getId());
     $this->delete($where);
     return $this;
 }
Exemple #2
0
 /**
  *
  */
 public function testSetId()
 {
     $this->assertInstanceOf('Enlight_Components_Cron_Job', $this->job->setId('2'));
     $this->assertEquals('2', $this->job->getId());
 }
Exemple #3
0
 /**
  * Removes an job from the cron tab
  *
  * @param Enlight_Components_Cron_Job $job
  * @return Enlight_Components_Cron_Adapter_DbTable
  */
 public function deleteJob(Enlight_Components_Cron_Job $job)
 {
     $this->delete(array($this->getAdapter()->quoteIdentifier($this->_primary) . ' = ?' => $job->getId()));
     return $this;
 }
Exemple #4
0
 /**
  * {@inheritdoc}
  */
 public function deleteJob(Enlight_Components_Cron_Job $job)
 {
     $this->connection->delete($this->tableName, ['id' => $job->getId()]);
 }