Created
March 15, 2012 15:13
-
-
Save weierophinney/2044728 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
function getEventManager() | |
{ | |
$em = new EventManager(); | |
$em->setStaticConnections($this->getGlobalEventManager()); | |
return $em; | |
} | |
function getGlobalEventManager() | |
{ | |
if ($this->globalEm instanceof StaticEventCollection) { | |
return $this->globalEm; | |
} | |
$this->globalEm = new NonStaticGlobalEventManager(); | |
return $this->globalEm; | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment