2015-09-17 23:11:18 -04:00
|
|
|
<?php
|
|
|
|
|
|
|
|
namespace Aviat\Ion\Di;
|
|
|
|
|
2015-10-14 09:20:52 -04:00
|
|
|
/**
|
|
|
|
* Trait implementation of ContainerAwareInterface
|
|
|
|
*/
|
2015-09-17 23:11:18 -04:00
|
|
|
trait ContainerAware {
|
|
|
|
|
|
|
|
/**
|
|
|
|
* Di Container
|
|
|
|
*
|
|
|
|
* @var ContainerInterface
|
|
|
|
*/
|
|
|
|
protected $container;
|
|
|
|
|
|
|
|
/**
|
|
|
|
* Set the container for the current object
|
|
|
|
*
|
|
|
|
* @param ContainerInterface $container
|
|
|
|
* @return $this
|
|
|
|
*/
|
|
|
|
public function setContainer(ContainerInterface $container)
|
|
|
|
{
|
|
|
|
$this->container = $container;
|
|
|
|
return $this;
|
|
|
|
}
|
|
|
|
|
|
|
|
/**
|
|
|
|
* Get the container object
|
|
|
|
*
|
|
|
|
* @return ContainerInterface
|
|
|
|
*/
|
|
|
|
public function getContainer()
|
|
|
|
{
|
|
|
|
return $this->container;
|
|
|
|
}
|
|
|
|
}
|
2015-11-11 15:28:51 -05:00
|
|
|
// End of ContainerAware.php
|