Skip to content
This repository has been archived by the owner on Feb 6, 2020. It is now read-only.

Commit

Permalink
Merge remote-tracking branch 'superdweebie/smconfig'
Browse files Browse the repository at this point in the history
  • Loading branch information
Showing 1 changed file with 8 additions and 0 deletions.
8 changes: 8 additions & 0 deletions src/Configuration.php
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,11 @@ public function __construct($configuration = array())
$this->configuration = $configuration;
}

public function getAllowOverride()
{
return (isset($this->configuration['allow_override'])) ? $this->configuration['allow_override'] : null;
}

public function getFactories()
{
return (isset($this->configuration['factories'])) ? $this->configuration['factories'] : array();
Expand Down Expand Up @@ -43,6 +48,9 @@ public function getShared()

public function configureServiceManager(ServiceManager $serviceManager)
{
$allowOverride = $this->getAllowOverride();
isset($allowOverride) ? $serviceManager->setAllowOverride($allowOverride) : null;

foreach ($this->getFactories() as $name => $factory) {
$serviceManager->setFactory($name, $factory);
}
Expand Down

0 comments on commit acb7af7

Please sign in to comment.