original_string: public function allowOrigin($domain)
      {
          $allowed = $this->_normalizeDomains((array)$domain);
          foreach ($allowed as $domain) {
              if (!preg_match($domain['preg'], $this->_origin)) {
                  continue;
              }
              $value = $domain['original'] === '*' ? '*' : $this->_origin;
              $this->_headers['Access-Control-Allow-Origin'] = $value;
              break;
          }
  
          return $this;
      }
code: public function allowOrigin($domain)
      {
          $allowed = $this->_normalizeDomains((array)$domain);
          foreach ($allowed as $domain) {
              if (!preg_match($domain['preg'], $this->_origin)) {
                  continue;
              }
              $value = $domain['original'] === '*' ? '*' : $this->_origin;
              $this->_headers['Access-Control-Allow-Origin'] = $value;
              break;
          }
  
          return $this;
      }
code_tokens: public function allowOrigin ( $ domain ) { $ allowed = $ this -> _normalizeDomains ( ( array ) $ domain ) ; foreach ( $ allowed as $ domain ) { if ( ! preg_match ( $ domain [ 'preg' ] , $ this -> _origin ) ) { continue ; } $ value = $ domain [ 'original' ] === '*' ? '*' : $ this -> _origin ; $ this -> _headers [ 'Access-Control-Allow-Origin' ] = $ value ; break ; } return $ this ; }
docstring: Set the list of allowed domains.
  
  Accepts a string or an array of domains that have CORS enabled.
  You can use `*.example.com` wildcards to accept subdomains, or `*` to allow all domains
  
  @param string|array $domain The allowed domains
  @return $this
docstring_tokens: Set the list of allowed domains .