2017 © Pedro Peláez
 

library procrastinator-bundle

Symfony2 integration for Procrastinator (lstrojny/procrastinator)

image

lstrojny/procrastinator-bundle

Symfony2 integration for Procrastinator (lstrojny/procrastinator)

  • Sunday, February 26, 2017
  • by lstrojny
  • Repository
  • 1 Watchers
  • 8 Stars
  • 107 Installations
  • PHP
  • 0 Dependents
  • 0 Suggesters
  • 0 Forks
  • 0 Open issues
  • 4 Versions
  • 0 % Grown

The README.md

ProcrastinatorBundle for Symfony2: do stuff later Build Status Dependency Status Average time to resolve an issue Percentage of issues still open

Symfony2 integration for Procrastinator, (*1)

Example usage in controller to execute event only if the postFlush event in Doctrine occured

<?php
use Procrastinator\Deferred\DoctrineEventConditionalDeferred as Deferred;
use Doctrine\ORM\Events as OrmEvents;

class MyController ...
{
    public function sendMailAction()
    {
        $entry = new Entity();
        $entry->setText('hello world');

        $message = Message::newInstance()
                    ->setSubject('hello')
                    ->setBody('new entry');
        $mailer = $this->get('mailer');


        $procrastinator->register(
            $procrastinator
                ->newDeferred()
                ->ifDoctrineEvent(OrmEvents::postFlush)
                ->name('sendMail')
                ->call(function() use ($mailer, $message) { $mailer->send($message); })
                ->build()
        );


        $em = $this->get('doctrine.orm.default_entity_manager');
        $em->persist($entry);
        $em->flush();
    }
}

The Versions

26/02 2017

dev-master

9999999-dev

Symfony2 integration for Procrastinator (lstrojny/procrastinator)

  Sources   Download

MIT

The Requires

 

The Development Requires

19/01 2014

2.4.1

2.4.1.0

Symfony2 integration for Procrastinator (lstrojny/procrastinator)

  Sources   Download

MIT

The Requires

 

The Development Requires

04/10 2013

2.3.1

2.3.1.0

Symfony2 integration for Procrastinator (lstrojny/procrastinator)

  Sources   Download

MIT

The Requires

 

The Development Requires

04/10 2013

2.3.0

2.3.0.0

Symfony2 integration for Procrastinator (lstrojny/procrastinator)

  Sources   Download

MIT

The Requires

 

The Development Requires