protected function checkServiceType($serviceType)
    {
        $reflection = new \ReflectionObject($this);
        $constants = $reflection->getConstants();
        if (!in_array($serviceType, $constants)) {
            throw new RuntimeException('The type of service does not support: ' . $serviceType);
        }
        return $serviceType;
    }
protected function checkServiceType($serviceType)
    {
        $reflection = new \ReflectionObject($this);
        $constants = $reflection->getConstants();
        if (!in_array($serviceType, $constants)) {
            throw new RuntimeException('The type of service does not support: ' . $serviceType);
        }
        return $serviceType;
    }
protected function checkServiceType ( $ serviceType ) { $ reflection = new \ ReflectionObject ( $ this ) ; $ constants = $ reflection -> getConstants ( ) ; if ( ! in_array ( $ serviceType , $ constants ) ) { throw new RuntimeException ( 'The type of service does not support: ' . $ serviceType ) ; } return $ serviceType ; }
Check available name for service
@param string $serviceType
@return string
@throw RuntimeException
Check available name for service