src/Service/Cron.php
public function getCronjobs()
    {
        if (!$this->cronjobs) {
            $cronjobs = array();

            $results = $this->serviceLocator
                ->get('Application')
                ->getEventManager()
                ->trigger(__FUNCTION__, $this, array(
                        'cronjobs' => $cronjobs
                ));

            if ($results) {
                foreach ($results as $key => $cron) {
                    foreach ($cron as $id => $conf) {
                        $cronjobs[$id] = $conf;
                    }
                }
            }

            $this->setCronjobs($cronjobs);
        }

        return $this->cronjobs;
    }
public function getCronjobs()
    {
        if (!$this->cronjobs) {
            $cronjobs = array();

            $results = $this->serviceLocator
                ->get('Application')
                ->getEventManager()
                ->trigger(__FUNCTION__, $this, array(
                        'cronjobs' => $cronjobs
                ));

            if ($results) {
                foreach ($results as $key => $cron) {
                    foreach ($cron as $id => $conf) {
                        $cronjobs[$id] = $conf;
                    }
                }
            }

            $this->setCronjobs($cronjobs);
        }

        return $this->cronjobs;
    }
public function getCronjobs ( ) { if ( ! $ this -> cronjobs ) { $ cronjobs = array ( ) ; $ results = $ this -> serviceLocator -> get ( 'Application' ) -> getEventManager ( ) -> trigger ( __FUNCTION__ , $ this , array ( 'cronjobs' => $ cronjobs ) ) ; if ( $ results ) { foreach ( $ results as $ key => $ cron ) { foreach ( $ cron as $ id => $ conf ) { $ cronjobs [ $ id ] = $ conf ; } } } $ this -> setCronjobs ( $ cronjobs ) ; } return $ this -> cronjobs ; }
trigger an event and fetch crons
Return array
trigger an event and fetch crons Return array