xakki/phalcon-clockwork

This package is not installable via Composer 1.x, please make sure you upgrade to Composer 2+. Read more about our Composer 1.x deprecation policy.
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: 2021-09-06 03:45:44 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();