protected function _normalizeDomains($domains)
    {
        $result = [];
        foreach ($domains as $domain) {
            if ($domain === '*') {
                $result[] = ['preg' => '@.@', 'original' => '*'];
                continue;
            }

            $original = $preg = $domain;
            if (strpos($domain, '://') === false) {
                $preg = ($this->_isSsl ? 'https://' : 'http://') . $domain;
            }
            $preg = '@^' . str_replace('\*', '.*', preg_quote($preg, '@')) . '$@';
            $result[] = compact('original', 'preg');
        }

        return $result;
    }
protected function _normalizeDomains($domains)
    {
        $result = [];
        foreach ($domains as $domain) {
            if ($domain === '*') {
                $result[] = ['preg' => '@.@', 'original' => '*'];
                continue;
            }

            $original = $preg = $domain;
            if (strpos($domain, '://') === false) {
                $preg = ($this->_isSsl ? 'https://' : 'http://') . $domain;
            }
            $preg = '@^' . str_replace('\*', '.*', preg_quote($preg, '@')) . '$@';
            $result[] = compact('original', 'preg');
        }

        return $result;
    }
protected function _normalizeDomains ( $ domains ) { $ result = [ ] ; foreach ( $ domains as $ domain ) { if ( $ domain === '*' ) { $ result [ ] = [ 'preg' => '@.@' , 'original' => '*' ] ; continue ; } $ original = $ preg = $ domain ; if ( strpos ( $ domain , '://' ) === false ) { $ preg = ( $ this -> _isSsl ? 'https://' : 'http://' ) . $ domain ; } $ preg = '@^' . str_replace ( '\*' , '.*' , preg_quote ( $ preg , '@' ) ) . '$@' ; $ result [ ] = compact ( 'original' , 'preg' ) ; } return $ result ; }
Normalize the origin to regular expressions and put in an array format

@param array $domains Domain names to normalize.
@return array
Normalize the origin to regular expressions and put in an array format