public static function loadService(
        EngineTypeInterface $engine,
        $type,
        $name = null
    ) {
        $classname = static::serviceClassname($type);

        if (!class_exists($classname)) {
            throw new \RuntimeException(
                sprintf("Service class %s doesn't exist.", $classname)
            );
        }

        return new $classname($engine, $name);
    }
public static function loadService(
        EngineTypeInterface $engine,
        $type,
        $name = null
    ) {
        $classname = static::serviceClassname($type);

        if (!class_exists($classname)) {
            throw new \RuntimeException(
                sprintf("Service class %s doesn't exist.", $classname)
            );
        }

        return new $classname($engine, $name);
    }
public static function loadService ( EngineTypeInterface $ engine , $ type , $ name = null ) { $ classname = static :: serviceClassname ( $ type ) ; if ( ! class_exists ( $ classname ) ) { throw new \ RuntimeException ( sprintf ( "Service class %s doesn't exist." , $ classname ) ) ; } return new $ classname ( $ engine , $ name ) ; }
Load engine service.

@param EngineTypeInterface $engine
The engine object.
@param string $type
The service type.
@param string|null $name
The service machine name.

@return \Droath\ProjectX\Engine\ServiceInterface
Load engine service .