Skip to content

Instantly share code, notes, and snippets.

@stephpy
Created September 24, 2013 10:44
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save stephpy/6683056 to your computer and use it in GitHub Desktop.
Save stephpy/6683056 to your computer and use it in GitHub Desktop.
class Container
{
public function getA()
{
$object = new A();
$object->addModule($this->getB()); // a la fin de addModule, il injecte le logger dans B
}
public function getB()
{
$object = new B();
$object->addUdpdate(.......); // ici, il fait ->getLog
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment