public function bindClass(string $name, string $factory, array $arguments = [], bool $shared = true) : ServiceFactory
    {
        $factory = new ServiceFactory($factory, $arguments);

        if ($shared) {
            $this->bindFactoryShared($name, $factory);
        } else {
            $this->bindFactory($name, $factory);
        }

        return $factory;
    }
public function bindClass(string $name, string $factory, array $arguments = [], bool $shared = true) : ServiceFactory
    {
        $factory = new ServiceFactory($factory, $arguments);

        if ($shared) {
            $this->bindFactoryShared($name, $factory);
        } else {
            $this->bindFactory($name, $factory);
        }

        return $factory;
    }
public function bindClass ( string $ name , string $ factory , array $ arguments = [ ] , bool $ shared = true ) : ServiceFactory { $ factory = new ServiceFactory ( $ factory , $ arguments ) ; if ( $ shared ) { $ this -> bindFactoryShared ( $ name , $ factory ) ; } else { $ this -> bindFactory ( $ name , $ factory ) ; } return $ factory ; }
Creates and binds a service factory by class name and arguments.

@param string            $name The service name.
@param string            $className The service class name.
@param array             $arguments An array of arguments.
@param bool              $shared Should the service be shared inside the container.

@return ServiceFactory The created service factory
Creates and binds a service factory by class name and arguments .