public function getServiceNamesByType($type)
    {
        if (!$this->hasServices()) {
            return [];
        }
        $types = [];
        $services = $this->getServices();

        foreach ($services as $name => $service) {
            if ($service['type'] !== $type) {
                continue;
            }
            $types[] = $name;
        }

         return $types;
    }
public function getServiceNamesByType($type)
    {
        if (!$this->hasServices()) {
            return [];
        }
        $types = [];
        $services = $this->getServices();

        foreach ($services as $name => $service) {
            if ($service['type'] !== $type) {
                continue;
            }
            $types[] = $name;
        }

         return $types;
    }
public function getServiceNamesByType ( $ type ) { if ( ! $ this -> hasServices ( ) ) { return [ ] ; } $ types = [ ] ; $ services = $ this -> getServices ( ) ; foreach ( $ services as $ name => $ service ) { if ( $ service [ 'type' ] !== $ type ) { continue ; } $ types [ ] = $ name ; } return $ types ; }
Get service names by type.

@param $type
The service type to search for.

@return array
Get service names by type .