public function setAllowedOrigins(array $origins): self
    {
        $this->allowedOrigins = [];

        foreach ($origins as $origin) {
            $this->allowedOrigins[\strtolower($origin)] = true;
        }

        $this->areAllOriginsAllowed = false;

        return $this;
    }
public function setAllowedOrigins(array $origins): self
    {
        $this->allowedOrigins = [];

        foreach ($origins as $origin) {
            $this->allowedOrigins[\strtolower($origin)] = true;
        }

        $this->areAllOriginsAllowed = false;

        return $this;
    }
public function setAllowedOrigins ( array $ origins ) : self { $ this -> allowedOrigins = [ ] ; foreach ( $ origins as $ origin ) { $ this -> allowedOrigins [ \ strtolower ( $ origin ) ] = true ; } $ this -> areAllOriginsAllowed = false ; return $ this ; }
Set allowed origins.

@param array $origins

@return self
Set allowed origins .