public function addRule($rule)
    {
        if (count($this->rules) >= self::OSS_MAX_RULES) {
            throw new OssException("num of rules in the config exceeds self::OSS_MAX_RULES: " . strval(self::OSS_MAX_RULES));
        }
        $this->rules[] = $rule;
    }
public function addRule($rule)
    {
        if (count($this->rules) >= self::OSS_MAX_RULES) {
            throw new OssException("num of rules in the config exceeds self::OSS_MAX_RULES: " . strval(self::OSS_MAX_RULES));
        }
        $this->rules[] = $rule;
    }
public function addRule ( $ rule ) { if ( count ( $ this -> rules ) >= self :: OSS_MAX_RULES ) { throw new OssException ( "num of rules in the config exceeds self::OSS_MAX_RULES: " . strval ( self :: OSS_MAX_RULES ) ) ; } $ this -> rules [ ] = $ rule ; }
Add a new CorsRule

@param CorsRule $rule
@throws OssException
Add a new CorsRule