protected function startsWithPrefix($serviceId, $allowedPrefixes)
    {
        foreach ($allowedPrefixes as $prefix) {
            /* @var $prefix string */
            if (strpos($serviceId, $prefix) === 0) {
                return true;
            }
        }
        return false;
    }
protected function startsWithPrefix($serviceId, $allowedPrefixes)
    {
        foreach ($allowedPrefixes as $prefix) {
            /* @var $prefix string */
            if (strpos($serviceId, $prefix) === 0) {
                return true;
            }
        }
        return false;
    }
protected function startsWithPrefix ( $ serviceId , $ allowedPrefixes ) { foreach ( $ allowedPrefixes as $ prefix ) { /* @var $prefix string */ if ( strpos ( $ serviceId , $ prefix ) === 0 ) { return true ; } } return false ; }
Checks if the given service ID starts with any of the provided prefixes.

@param string $serviceId
@param string[] $allowedPrefixes
@return boolean
Checks if the given service ID starts with any of the provided prefixes .