function setRequest(\Symfony\Component\HttpFoundation\Request $request) {
        $this->request = $request;
        
        if(self::FORMAT_ARRAY_DATA_TABLES == $this->defaultFormat){
            //Ejemplo start(20) / length(10) = 2
            $start = (int)$request->get("start",0);//Elemento inicio
            $length = (int)$request->get("length",10);//Cantidad de elementos por pagina
            $this->draw = $request->get("draw",  $this->draw) + 1;//No cache
            
            if($start > 0){
                $page = (int)($start / $length);
                $page = $page + 1;
            }else{
                $page = 1;
            }
            if(!is_int($length)){
                $length = 10;
            }
            if(!is_int($page)){
                $page = 1;
            }
            $this->setMaxPerPage($length);
            $this->setCurrentPage($page);
        }else if(self::FORMAT_ARRAY_STANDARD == $this->defaultFormat){
            $page = (int)$request->get("page",1);//Elemento inicio
            $maxPerPage = (int)$request->get("maxPerPage",10);//Elemento inicio
            $this->setMaxPerPage($maxPerPage);
            $totalPages = $this->getNbPages();
            if($page > $this->getNbPages()){
                $page = $totalPages;
            }
            $this->setCurrentPage($page);
        }
    }