private function checkRestPrefixValidity(array $restPrefixes)
    {
        foreach ($restPrefixes as $prefix) {
            if (!is_string($prefix)) {
                throw new DomainException('All provided prefixes for REST must be string');
            }

            // if it has "/" in it
            if (strpos('/', $prefix)) {
                throw new DomainException('Prefixes must not contain "/"');
            }
        }
    }