Skip to content

Instantly share code, notes, and snippets.

View fritz-gerneth's full-sized avatar

Fritz Gerneth fritz-gerneth

  • funct GmbH
  • Munich
View GitHub Profile
<?php
return array(
'di' => array(
'instance' => array(
'Zend\EventManager\EventManager' => array(
'injections' => array(
'attach' => array(
array('event' => 'Test\Event\Collection'),
)
<?php
return array(
'di' => array(
'instance' => array(
'Test\Event\Collection' => array(
'injections' => array(
'Test\Event\View',
'Test\Event\View',
),
import android.os.Bundle;
import android.os.RemoteException;
/**
* The common interface for all connections. This interface only states that
* this object is a connection at all.
*
* @author Fritz Gerneth
*
*/
class InjectLocatorListener implements \Doctrine\Common\EventSubscriber, \Zend\Loader\LocatorAware
{
protected $locator;
public function postLoad(\Doctrine\ORM\Event\LifecycleEventArgs $eventArgs)
{
$entity = $eventArgs->getEntity();
if($entity instanceof \Zend\Loader\LocatorAware)
{
$entity->setLocator($this->getLocator());
<?php
namespace SpiffyDoctrine\Doctrine\Common;
use Doctrine\Common\EventManager as DoctrineEventManager,
SpiffyDoctrine\Doctrine\Instance;
class EventManager extends Instance implements \Zend\Loader\LocatorAware
{
/**
* @var array
*/