private function parsePagination(\SimpleXMLElement $xmldata)
    {
        $pagination = new Pagination();
        $paginated = false;

        foreach ($xmldata->children('opensearch', true) as $key => $value) {
            switch ($key) {
                case 'totalResults':
                    $pagination->setNumberOfItem((int) $value);
                    $paginated = true;
                    break;
                case 'itemsPerPage':
                    $pagination->setItemsPerPage((int) $value);
                    $paginated = true;
                    break;
            }
        }

        return $paginated ? $pagination : null;
    }
private function parsePagination(\SimpleXMLElement $xmldata)
    {
        $pagination = new Pagination();
        $paginated = false;

        foreach ($xmldata->children('opensearch', true) as $key => $value) {
            switch ($key) {
                case 'totalResults':
                    $pagination->setNumberOfItem((int) $value);
                    $paginated = true;
                    break;
                case 'itemsPerPage':
                    $pagination->setItemsPerPage((int) $value);
                    $paginated = true;
                    break;
            }
        }

        return $paginated ? $pagination : null;
    }
private function parsePagination ( \ SimpleXMLElement $ xmldata ) { $ pagination = new Pagination ( ) ; $ paginated = false ; foreach ( $ xmldata -> children ( 'opensearch' , true ) as $ key => $ value ) { switch ( $ key ) { case 'totalResults' : $ pagination -> setNumberOfItem ( ( int ) $ value ) ; $ paginated = true ; break ; case 'itemsPerPage' : $ pagination -> setItemsPerPage ( ( int ) $ value ) ; $ paginated = true ; break ; } } return $ paginated ? $ pagination : null ; }
Met en forme la pagination si elle existe

@param \SimpleXMLElement $xmldata

@return Pagination|null null si elle n'existe pas
Met en forme la pagination si elle existe