* Class constructor.
*/
public function __construct() {
- $config = CRM_Core_Config::singleton();
- $config->fatalErrorHandler = 'CRM_Core_JobManager_scheduledJobFatalErrorHandler';
-
$this->jobs = $this->_getJobs();
}
* @return array
* ($id => CRM_Core_ScheduledJob)
*/
- private function _getJobs() {
+ private function _getJobs(): array {
$jobs = [];
$dao = new CRM_Core_DAO_Job();
$dao->orderBy('name');
$dao->domain_id = CRM_Core_Config::domainID();
$dao->find();
while ($dao->fetch()) {
- $temp = [];
+ $temp = ['class' => NULL, 'parameters' => NULL, 'last_run' => NULL];
CRM_Core_DAO::storeValues($dao, $temp);
$jobs[$dao->id] = new CRM_Core_ScheduledJob($temp);
}
}
}
-
-/**
- * @param $message
- *
- * @throws Exception
- */
-function CRM_Core_JobManager_scheduledJobFatalErrorHandler($message) {
- throw new Exception("{$message['message']}: {$message['code']}");
-}