private function getCorsesArray()
    {
        $corsesArray = array();
        if (count($this->getCorses()) == 1) {
            $corsesArray = array(
                Resources::XTAG_CORS_RULE => $this->getCorses()[0]->toArray()
            );
        } elseif ($this->getCorses() != array()) {
            foreach ($this->getCorses() as $cors) {
                $corsesArray[] = [Resources::XTAG_CORS_RULE => $cors->toArray()];
            }
        }

        return $corsesArray;
    }