src/Client.php
public function addServiceClass($serviceClass)
    {
        if (!is_subclass_of($serviceClass, ManagerInterface::class)) {
            throw new InvalidArgumentException(sprintf('The service class "%s" should implement "ManagerInterface"', $serviceClass));
        }
        $this->serviceClass[] = $serviceClass;
        $this->container->register($serviceClass::getServiceName(), $serviceClass);
    }
public function addServiceClass($serviceClass)
    {
        if (!is_subclass_of($serviceClass, ManagerInterface::class)) {
            throw new InvalidArgumentException(sprintf('The service class "%s" should implement "ManagerInterface"', $serviceClass));
        }
        $this->serviceClass[] = $serviceClass;
        $this->container->register($serviceClass::getServiceName(), $serviceClass);
    }
public function addServiceClass ( $ serviceClass ) { if ( ! is_subclass_of ( $ serviceClass , ManagerInterface :: class ) ) { throw new InvalidArgumentException ( sprintf ( 'The service class "%s" should implement "ManagerInterface"' , $ serviceClass ) ) ; } $ this -> serviceClass [ ] = $ serviceClass ; $ this -> container -> register ( $ serviceClass :: getServiceName ( ) , $ serviceClass ) ; }
Add a custom service class.

@param string $serviceClass
@throws InvalidArgumentException
Add a custom service class .