<?php
/*
+--------------------------------------------------------------------+
- | CiviCRM version 4.5 |
+ | CiviCRM version 4.6 |
+--------------------------------------------------------------------+
| Copyright CiviCRM LLC (c) 2004-2014 |
+--------------------------------------------------------------------+
| GNU Affero General Public License or the licensing of CiviCRM, |
| see the CiviCRM license FAQ at http://civicrm.org/licensing |
+--------------------------------------------------------------------+
-*/
+ */
/**
* This interface defines methods that need to be implemented
var $remarks = array();
- /*
- * Class constructor
- *
- * @param string $namespace namespace prefix for component's files
- * @access public
- *
- */
-
/**
- * @param $params
+ * @param array $params
*/
public function __construct($params) {
foreach ($params as $name => $param) {
* @param null $date
*/
public function saveLastRun($date = NULL) {
- $dao = new CRM_Core_DAO_Job();
- $dao->id = $this->id;
+ $dao = new CRM_Core_DAO_Job();
+ $dao->id = $this->id;
$dao->last_run = ($date == NULL) ? CRM_Utils_Date::currentDBDate() : CRM_Utils_Date::currentDBDate($date);
$dao->save();
}
return TRUE;
case 'Hourly':
- $now = CRM_Utils_Date::currentDBDate();
+ $now = CRM_Utils_Date::currentDBDate();
$hourAgo = strtotime('-1 hour', strtotime($now));
$lastRun = strtotime($this->last_run);
if ($lastRun < $hourAgo) {
}
case 'Daily':
- $now = CRM_Utils_Date::currentDBDate();
- $dayAgo = strtotime('-1 day', strtotime($now));
+ $now = CRM_Utils_Date::currentDBDate();
+ $dayAgo = strtotime('-1 day', strtotime($now));
$lastRun = strtotime($this->last_run);
if ($lastRun < $dayAgo) {
return TRUE;
return FALSE;
}
- public function __destruct() {}
-}
+ public function __destruct() {
+ }
+}