/** * 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; }
/** * Test register to non-existing factory * * @expectedException Zork\Factory\Exception\ExceptionInterface */ public function testRegisterToNonExistingFactory() { $this->builder->registerAdapter('NonExsitentFactory', 'adapter0', 'stdClass'); }