Exemple #1
0
 /**
  * Makes an object.  Its the new new.
  *
  *
  * @param string $name the name of the class to create
  * @param string $container the main of the container to use
  * @return object the created class
  */
 public static function name($name, $container = 'main')
 {
     $object = Pd_Make_Constructor::construct($name, $container);
     Pd_Make_Setter::inject($object, $container);
     return $object;
 }
Exemple #2
0
 public function testStaticInjector()
 {
     $this->object = new PdTests_stubs_Dummy();
     Pd_Make_Setter::inject($this->object, $this->containerName);
     $this->assertEquals('a fruit', $this->object->pear);
 }