xakki/phalcon-clockwork

There is no license information available for the latest version (3.4.5.1) of this package.

The clockwork extension for working with the phalcon framework. Fork by kolesa-team/phalcon-clockwork

3.4.5.1 2021-03-06 02:06 UTC

This package is auto-updated.

Last update: 2024-11-06 11:04:03 UTC


README

#Installation Install the Clockwork library via Composer.

$ composer require kolesa-team/phalcon-clockwork

Set events manager to service(di)

        $di->set('eventsManager', function () {
            $manager = new Phalcon\Events\Manager();

            return $manager;
        }, true);

Set events manager to Application

    $eventsManager = $di->get('eventsManager');
    $application   = new Phalcon\Mvc\Application($di);
    
    $application->setEventsManager($eventsManager)

Init clockwork

    $clockwork = new ClockworkServices();
    
    $clockwork->setEventsManager($di->get('eventsManager'));      
    $clockwork->initialize();