kolesa-team/phalcon-clockwork

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

The clockwork extension for working with the phalcon framework

0.1.0 2023-02-27 04:47 UTC

This package is auto-updated.

Last update: 2024-10-27 08:53:27 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();