@inheritdoc

@param $interfaceName

@return boolean

@throws \Zend\ServiceManager\Exception\ServiceNotFoundException
@throws \Zend\ServiceManager\Exception\ServiceNotCreatedException
@throws \Zend\ServiceManager\Exception\RuntimeException
510114
public function hasEntityClassByInterface($interfaceName)
    {
        if (array_key_exists($interfaceName, $this->interfaceNameToEntityClass)) {
            return false !== $this->interfaceNameToEntityClass[$interfaceName];
        }

        if (!$this->has($interfaceName)) {
            $this->interfaceNameToEntityClass[$interfaceName] = false;
            return false;
        }

        $entity = $this->get($interfaceName);

        if (!is_object($entity)) {
            $this->interfaceNameToEntityClass[$interfaceName] = false;
            return false;
        }

        $this->interfaceNameToEntityClass[$interfaceName] = get_class($entity);

        return true;
    }
723160
public static function createService($serviceName)
    {
        switch ($serviceName) {
            case self::SERVICE_REST:
                return new RestService();
            break;
            case self::SERVICE_SOAP:
                return new SoapService();
            break;
            case self::SERVICE_XMLRPC:
                return new XmlRpcService();
            break;
        }

        throw new \Exception(sprintf('Unknown service %s', $serviceName));
    }
974477
final protected function assertClassImplementsInterface(string $interfaceName, string $className): void
    {
        $this->assertInterfaceExists($interfaceName);
        $this->assertClassExists($className);

        $reflection = new \ReflectionClass($className);

        self::assertTrue($reflection->implementsInterface($interfaceName), \sprintf(
            'Failed asserting that class "%s" implements interface "%s".',
            $className,
            $interfaceName
        ));
    }
255167
public function hasService($name)
    {
        if (!$this->serviceManager) {
            return false;
        }

        return $this->serviceManager->has($name, false);
    }
1306329
public function canCreate(ContainerInterface $container, $requestedName)
    {
        if (substr($requestedName, 0, strlen($this->_configPrefix)) != $this->_configPrefix) {
            return false;
        }

        return true;
    }
727137
public function setService($serviceName)
    {
        if (!array_key_exists($serviceName, $this->servicesList)) {
            $serviceName = $this->defaultServiceName;
        }

        $this->service = new $this->servicesList[$serviceName];

        return $this;
    }
141176
public function enableService($id)
	{
	    if(!isset($this->services[$id])){
	        throw new Exception\ServiceNotFoundException(
                sprintf('Service ID "%s" does not exist', $id)
	        );
	    }
	    
	    if (!isset($this->services[$id]['listener'])) {
	        $this->services[$id]['listener'] = $this->getCommandManager()->attach(
                $this->services[$id]['name'], $id, $this->services[$id]['priority']);
	        
	        return true;
	    } else {
	        return false;
	    }
	}
1359229
public function createForService($serviceName) {
		if ($this->_basePath === null) {
			throw new ConfigError('Base path was not given');
		}
		
		$filename = $this->_filenameTemplate;
		
		if (strpos($filename, self::PATTERN_SERVICE) !== false) {
			$filename = str_replace(self::PATTERN_SERVICE, $serviceName, $filename);
		}
		
		if (strpos($filename, self::PATTERN_DATE) !== false) {
			$filename = str_replace(self::PATTERN_DATE, date($this->_dateFormat), $filename);
		}
		
		$path = $this->_basePath;
		
		if ($this->_separateDirs) {
			$path .= DIRECTORY_SEPARATOR . $serviceName;
			
			if ((! file_exists($path) || ! is_dir($path)) && ! mkdir($path)) {
				throw new NoDirectory('Directory does not exists and unable to create: "' . $path . '"');
			}
		}
		
		$path .= DIRECTORY_SEPARATOR . $filename;
		
		if (isset($this->_loggers[$serviceName])) {
			return $this->_loggers[$serviceName];
		}
		
		$adapter = $this->getCreateCallback()->__invoke($path);
		$logger  = new Logger($adapter);
		
		$this->_loggers[$serviceName] = $logger;
		return $logger;
	}
1179399
public function getServiceMethod($methodName)
    {
        return $this->getService($this->getServiceName($methodName)) instanceof Service ? $this->getService($this->getServiceName($methodName))->getMethod($methodName) : null;
    }
620277
protected function factorySyncService( $serviceName ) {

        $syncClass = '\\ufocoder\\SyncSocial\\components\\services\\' . ucfirst( $serviceName );

        if ( ! class_exists( $syncClass ) ) {
            throw new Exception( Yii::t( 'SyncSocial', 'SyncSocial Extension not support "{serviceName}" service', [
                'serviceName' => $serviceName
            ] ) );
        }

        return new $syncClass( [
            'serviceSettings' => isset( $this->settings[ $serviceName ] ) ? $this->settings[ $serviceName ] : [ ],
            'connectUrl'      => $this->getConnectUrl( $serviceName )
        ] );
    }
624090
public function disableService($id)
	{
	    $id = $this->normalizeServiceId($id);
	    
	    if(!isset($this->services[$id])){
	        throw new Exception\ServiceNotFoundException(
                sprintf('Service ID "%s" does not exist', $id)
	        );
	    }
	    
	    if (isset($this->services[$id]['listener'])) {
	        $return = $this->getCommandManager()->detach($this->services[$id]['listener']);
	        $this->services[$id]['listener'] = null;
	        
	        return $return;
	    } else {
	        return false;
	    }
	}
896576
public static function hasInterface($objectOrClass, string $interfaceClassName): bool
    {
        return in_array($interfaceClassName, self::getInterfaces($objectOrClass));
    }
737556
public function isClassImplementationOf($className, $interfaceName)
    {
        $className = $this->prepareClassReflectionForUsage($className);

        $interfaceName = $this->cleanClassName($interfaceName);
        $this->loadOrReflectClassIfNecessary($interfaceName);

        return (isset($this->classReflectionData[$interfaceName][self::DATA_INTERFACE_IMPLEMENTATIONS][$className]));
    }
1014925
public function hasEntityPostfixByInterfaceName($entityInterfaceName)
    {
        if (!array_key_exists($entityInterfaceName, $this->interfaceNameToEntityPostfix)) {
            $has = false !== $this->buildEntityPostfixByInterfaceName($entityInterfaceName);
        } else {
            $has = false !== $this->interfaceNameToEntityPostfix[$entityInterfaceName];
        }

        return $has;
    }
1104645
function &interfaceNamed($interfaceName)
    {
        $return = NULL;
        if (isset($this->_interfaces[$interfaceName])) {
            $return =& $this->_interfaces[$interfaceName];
        }

        return $return;
    }
1317024
public function addInterface(string $interfaceName, string $alias = null)
    {
        $this->interfaces[] = $this->addUse($interfaceName, $alias);
    }
602730
public function removeDataSource($interfaceName, $driver, $className)
    {
        if (!isset($this->dataSources[$interfaceName][$driver])) {
            return false;
        }
        
        unset($this->dataSources[$interfaceName][$driver]);
        $this->saveDataSources();
        
        return true;
    }