/** * Execute all the registered tasks for the domain */ private function domainsTask() { // Get 20 Active tasks items $tasks = DomainsTasks::getTasks(Statuses::id('active', 'domains_tasks'), 20); // Check if an active registrar is active $registrar = Registrars::findActiveRegistrars(); // If exist a registrar set in the database if (isset($registrar[0])) { // Check all the tasks saved within the Domains_Tasks table. foreach ($tasks as $task) { Shineisp_Commons_Utilities::logs($task['action'] . " - " . $task['Domains']['domain'] . "." . $task['Domains']['tld'], "tasks.log"); try { self::doDomainTask($task); } catch (SoapFault $e) { Shineisp_Commons_Utilities::logs($e->faultstring, "tasks.log"); } } } return true; }