Skip to content

Instantly share code, notes, and snippets.

@teklakct
Created August 2, 2016 09:57
Show Gist options
  • Save teklakct/863e5af52ef9becfb9e639c7dcd0e5e3 to your computer and use it in GitHub Desktop.
Save teklakct/863e5af52ef9becfb9e639c7dcd0e5e3 to your computer and use it in GitHub Desktop.
Subscriber for Sculpin
<?php
namespace Bundle\MyBundle;
use Sculpin\Core\Event\SourceSetEvent;
use Sculpin\Core\Sculpin;
use Symfony\Component\EventDispatcher\EventSubscriberInterface;
class MySubscriber implements EventSubscriberInterface
{
/**
* {@inheritdoc}
*/
public static function getSubscribedEvents()
{
return array(
Sculpin::EVENT_BEFORE_RUN => 'beforeRun',
);
}
/**
* Before run
*
* @param SourceSetEvent $sourceSetEvent Source Set Event
*/
public function beforeRun(SourceSetEvent $sourceSetEvent)
{
// ...
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment