Example #1
0
 /**
  * Adds the given raw dependencies (array) to the collection for given className
  * This method is intend to add the given raw dependencies (array) to the collection for given className.
  *
  * @param array  $rawDependencies Dependencies as raw array.
  * @param string $className       Name of the class having the dependencies.
  *
  * @author Benjamin Carl <*****@*****.**>
  */
 protected function addRawDependenciesToCollection(array $rawDependencies, $className = '')
 {
     $rawDependencies = [$className => ['className' => $className, 'dependencies' => array_merge([], $rawDependencies)]];
     parent::addRawDependenciesToCollection($rawDependencies);
 }
Example #2
0
 /**
  * Merges a new map with existing one.
  *
  * @param Doozr_Di_Map $target The map in which the $source is merged into
  * @param Doozr_Di_Map $source The map which is merged into $target
  *
  * @author Benjamin Carl <*****@*****.**>
  *
  * @return Doozr_Di_Map The current instance of the Container for chaining/fluent-interface
  */
 protected function mergeMaps(Doozr_Di_Map $target, Doozr_Di_Map $source)
 {
     // Import of dependencies is built in functionality of map
     $target->import($source->export());
     return $target;
 }
Example #3
0
 /**
  * Resets the state of this instance to default.
  * This method is intend to set the configuration of the dependency class.
  *
  * @author Benjamin Carl <*****@*****.**>
  */
 public function reset()
 {
     $this->className = null;
     $this->dependency = null;
     parent::reset();
 }