public function registerFactory(string $produced_class, Factory $factory)
    {
        $this->factories[$produced_class] = $factory;
        return $this;
    }
public function registerFactory(string $produced_class, Factory $factory)
    {
        $this->factories[$produced_class] = $factory;
        return $this;
    }
public function registerFactory ( string $ produced_class , Factory $ factory ) { $ this -> factories [ $ produced_class ] = $ factory ; return $ this ; }
Register a factory for a class name

@param string $produced_class The class produced by the factory
@param Wedeto\Util\DI\Factory $factory The factory to register
@return $this Provides fluent interface
Register a factory for a class name