src/Ratchet/Server/FlashPolicy.php
public function addAllowedAccess($domain, $ports = '*', $secure = false) {
        if (!$this->validateDomain($domain)) {
           throw new \UnexpectedValueException('Invalid domain');
        }

        if (!$this->validatePorts($ports)) {
           throw new \UnexpectedValueException('Invalid Port');
        }

        $this->_access[]   = array($domain, $ports, (boolean)$secure);
        $this->_cacheValid = false;

        return $this;
    }
public function addAllowedAccess($domain, $ports = '*', $secure = false) {
        if (!$this->validateDomain($domain)) {
           throw new \UnexpectedValueException('Invalid domain');
        }

        if (!$this->validatePorts($ports)) {
           throw new \UnexpectedValueException('Invalid Port');
        }

        $this->_access[]   = array($domain, $ports, (boolean)$secure);
        $this->_cacheValid = false;

        return $this;
    }
public function addAllowedAccess ( $ domain , $ ports = '*' , $ secure = false ) { if ( ! $ this -> validateDomain ( $ domain ) ) { throw new \ UnexpectedValueException ( 'Invalid domain' ) ; } if ( ! $ this -> validatePorts ( $ ports ) ) { throw new \ UnexpectedValueException ( 'Invalid Port' ) ; } $ this -> _access [ ] = array ( $ domain , $ ports , ( boolean ) $ secure ) ; $ this -> _cacheValid = false ; return $ this ; }
Add a domain to an allowed access list.

@param string $domain Specifies a requesting domain to be granted access. Both named domains and IP
addresses are acceptable values. Subdomains are considered different domains. A wildcard (*) can
be used to match all domains when used alone, or multiple domains (subdomains) when used as a
prefix for an explicit, second-level domain name separated with a dot (.)
@param string $ports A comma-separated list of ports or range of ports that a socket connection
is allowed to connect to. A range of ports is specified through a dash (-) between two port numbers.
Ranges can be used with individual ports when separated with a comma. A single wildcard (*) can
be used to allow all ports.
@param bool $secure
@throws \UnexpectedValueException
@return FlashPolicy
Add a domain to an allowed access list .