Ejemplo n.º 1
0
 /**
  * Register a factory-adapter
  *
  * @param string $adapter Adapter's name
  * @param string $class Adapter's class
  * @return self
  */
 public function registerAdapter($adapter, $class)
 {
     $this->builder->registerAdapter(get_called_class(), $adapter, $class);
     return $this;
 }
Ejemplo n.º 2
0
 /**
  * Test register to non-existing factory
  *
  * @expectedException   Zork\Factory\Exception\ExceptionInterface
  */
 public function testRegisterToNonExistingFactory()
 {
     $this->builder->registerAdapter('NonExsitentFactory', 'adapter0', 'stdClass');
 }