public function build($className , array $options = [] )
    {
        if (is_a($className, Configurable::class, true)) {
            $service = new $className($options);
            $this->propagate($service);
            return $service;
        }

        throw new ServiceNotFoundException($className);
    }
public function build($className , array $options = [] )
    {
        if (is_a($className, Configurable::class, true)) {
            $service = new $className($options);
            $this->propagate($service);
            return $service;
        }

        throw new ServiceNotFoundException($className);
    }
public function build ( $ className , array $ options = [ ] ) { if ( is_a ( $ className , Configurable :: class , true ) ) { $ service = new $ className ( $ options ) ; $ this -> propagate ( $ service ) ; return $ service ; } throw new ServiceNotFoundException ( $ className ) ; }
Service or sub-service factory

@param $className
@param array $options
@return mixed
Service or sub - service factory