package.xml 100666 0 0 63015 11173437505 6262
Pagerpear.php.netData paging classIt takes an array of data as input and pages it according to various parameters.
It also builds links within a specified range, and allows complete customization of the output (it even works with front controllers and mod_rewrite).
Two operating modes available: "Jumping" and "Sliding" window style.Lorenzo Albertonquipol.alberton@quipo.ityesRichard Heyesrichardrichard@phpguru.orgno2009-04-212.4.82.4.8stablestableBSD- request #15949: add autoSubmit option to getPerPageSelectBox() [Matt Rosenquist]
- fix potential issues with encoding in getPerPageSelectBox() and getPageSelectBox()4.0.01.4.0b12.4.82.4.8stablestable2009-04-21BSD- request #15949: add autoSubmit option to getPerPageSelectBox() [Matt Rosenquist]
- fix potential issues with encoding in getPerPageSelectBox() and getPageSelectBox()2.4.72.4.7stablestable2008-08-11BSD- fixed bug #13604: WARNINGS with PHP 5.3-dev [thanks to Chris Troup]
- request #13567: support for regexp in 'excludeVars' [thanks to Stefano Coletta]
- fixed bug #13913 empty prev/next image shown when only one page exists [cweiske]
- fixed bug #13881: fix for relative links (introduced in v.2.4.5) may cause some
issues with absolute links2.4.62.4.6stablestable2008-03-28BSD- fixed bug #13316: NOTICE in getLinks() in Jumping mode
- fixed bug #13342: getLinks() returns wrong result with multi-byte arrays
- fixed bug #13469: getPerPageSelectBox() can produce invalid xhtml with no data
- fixed bug #13472: PHP 6 Removes get_magic_quotes_gpc()
- fixed bug #13506: POST method deletes querystring
- request #13509: added 'prevImgEmpty' and 'nextImgEmpty' options to show a disabled
prev/next page link when you are on the last/first page (cweiske)2.4.52.4.5stablestable2008-02-23BSD- request #10869: added two reverse drivers in the /examples/ dir
- fixed a few PHP5 Strict Standards warnings (bug #12257 and #12934)
- Coding Standards fixes in the phpdoc blocks
- added 'PAGER_' prefix to internal constant names
- fixed bug #12267: correct detection of HTTPS on IIS (thanks to Carsten Wiedmann)
- fixed bug #12306: allow relative links
- fixed bug #12531: removed <u> tag from curPageSpan[Pre|Post] default options
in Pager_Sliding to make links HTML 4.01 strict
- request #12267: added $pager->linkTagsRaw array (same as $pager->linkTags but
as array) to play nice with HTML_Page2 (patch by Carsten Wiedmann)
- fixed bug #12796: curPageLinkClassName overrides curPageSpanPre and curPageSpanPost
- request #12797: added '%d' as a placeholder to altPage (by default, page number is appended)
- fixed bug #12837: if $_SESSION['setPerPage'] is set, Pager always uses it2.4.42.4.4stablestable2007-07-29BSD- handle UNION queries in the Wrapper (bug #9601)
- getPerPagerSelectBox() with $showAllData = true and $start > $totalItems was
returning an empty select menu (bug #9946)
- added 'onclick' option (request #11241)
- fixed bug #11697: Pager_Jumping::build() lose first and last page string concatenation2.4.32.4.3stablestable2006-12-03BSD- fixed issue with SSL (bug #7936)
- items set in 'excludeVars' array were removed from the URL even if they were
also set in the 'extraVars' array (bug #8969)
- added new option 'checkMaxLimit' to getPerPageSelectBox(): if true, Pager checks
if $end is bigger than $totalItems, and doesn't show the extra select options
- moved Pager.php to the pear root and added a wrapper in the old location
to adhere to PEAR policies (bug #2169)
- switched to package.xml v22.4.22.4.2stablestable2006-06-07BSD- fix double escaping of arg_separator when php.ini's arg_separator.output = "&"2.4.12.4.1stablestable2006-05-06BSD- more flexible implementation of the factory pattern allowing people to use custom
renderer classes that are not part of the Pager package (thanks to Martin Jansen)2.4.02.4.0stablestable2006-04-23BSD- added host to CURRENT_PATHNAME constant
- added accesskey option (if true, accesskey attributes are added to the links)
- fixed multibyte string issues with httpMethod==POST (bug #6812)
- return empty array instead of FALSE in getPageData() on bad pageID (request #6986)
- added Pager_HtmlWidgets class containing the methods getPerPageSelectBox()
(moved from Pager_Common) and getPageSelectBox() (new, request #6998).
The class is lazy-loaded when calling one of the two above methods from Pager.
- Improved rewriteCountQuery() function in the Pager Wrapper.
- added getOption($name) and getOptions() methods (request #7413)
- changed _setOptions() [private] to setOptions() [public]
- added build() to refresh the links and the paged data after a new call to setOptions()
- added 'attributes' option to set extra attributes for the <a> tag (request #7452)2.3.62.3.6stablestable2006-02-03BSD- fixed bug #6680: error with fileName parameter having an extra "%" character2.3.52.3.5stablestable2006-01-20BSD- remove flicker (caused by href="#") during POST requests (request #6005)
- added "formID" option to reuse an existing form in POST requests
(thanks to Marc Veldman)
- fixed bug #6529: problem with fields with quotes during POST requests2.3.42.3.4stablestable2005-09-28BSD- changed license to BSD
- fixed bug #4897 (multibyte chars not handled correctly)2.3.32.3.3stablestable2005-07-04PHP- improved Pager_Wrapper and added tests
- urlencoded square brackets (bug #4337)
NB: We recommend that users of Pager < 2.3.0 immediately upgrade the package,
otherwise they might be susceptible to XSS attacks2.3.22.3.2stablestable2005-06-03PHP- autodetect HTTP method used, when not specified,
instead of forcing "GET" (bug #4277)
- added "altFirst" and "altLast" options to set the
"title" attribute of the first and last page links2.3.12.3.1stablestable2005-05-02PHP- fixed various issues with __http_build_query() and escaped entities
- if the value of "arg_separator.output" in php.ini is "&", don't encode it again
- tweaked Pager_Wrapper query rewriting function, now it is fully case insensitive2.3.02.3.0stablestable2005-04-22PHP- tweaked Pager_Wrapper query rewriting function2.3.0RC22.3.0RC2betabeta2005-04-06PHP- fixed possible querystring duplication with front controllers2.3.0RC12.3.0RC1betabeta2005-04-01PHP- internal refactoring: added POST support: set the preferred http method
('GET' or 'POST') with the 'httpMethod' option.
- used $_GET instead of reparsing the querystring
[thanks to Nikolas 'Atrus' Coukouma]
(fixed bugs #3450, #3878 and #3451)
- added 'importQuery' boolean option to ignore the url vars entirely (bug #3449)
- added 'excludeVars' array option to selectively exclude some url vars (bug #2461)
- countless code optimizations
- added many new test cases to the testsuite2.2.72.2.7stablestable2005-03-18PHP- added Pager_Wrapper_Eclipse() function in the /examples/Pager_Wrapper example
(thanks to Matte Edens)
- added support for statements with subqueries in the Pager Wrappers
(thanks to Tobias Kuckuck)
- fixed bug #3451 (arrays in extraVars not handled correctly)2.2.62.2.6stablestable2005-02-04PHP- better 'currentPage' option support (thanks to Andrew Nagy)
- fixed typo (thanks to Massimiliano Arione)2.2.52.2.5stablestable2005-01-17PHP- allowed use of a javascript function in the fileName [bugs #2555 and #2754]
- added Pager_Wrapper_DBDO() function in the /examples/Pager_Wrapper example
(thanks to garak AT studenti DOT it)
- replaced urlencode() with htmlentities() because it was too aggressive
[bugs #2908, #3043 and #3212]
- added 'currentPage' option (patch by Kendrick Vargas)2.2.42.2.4stablestable2004-11-20PHP- fixed "Notice: Undefined property: _totalPages" [bug #2714]
- enforce errors (which weren't displayed at all)
- fixed Pager_Wrapper (examples dir) with GROUP BY queries
- changed $_GET to $_REQUEST. POST values should be valid too, now.
- Pager can be used on a DirectoryIndex script, now (patch by ieure) [bug #2617]2.2.32.2.3stablestable2004-08-17PHP- just the last one of a set of array values given as GET parameters
(i.e. site.php?foo[]=1&foo[]=2&foo[]=3) was carried on (bug #1904).
- make 4th parameter of getPerPageSelectBox() an array, and add an
"attribute" parameter to allow extra attributes for the select tag.
- added an example to show how this class can be used with big database
resultsets efficiently.
- prevent XSS attacks (bug #2131), thanks to sou_sk at nifty dot com2.2.22.2.2stablestable2004-05-18PHP- set correct selected value for getPerPageSelectBox even when "useSession"
option is false (bug #1263).
- added two parameters to getPerPageSelectBox():
* $showAllData (if true, an <option> to show
all the data is displayed in the generated <select>);
* $optionText (text to show in each <option>; use '%d' where you want to see
the number of pages selected)
- added showAllText option for alternate text in the $showAllData <option>
(the default is the number of total items).
- fixed getPageData() when $pageID is specified (bug #1377) (thanks to Ian Eure)
- added tests for getPageData()
- avoid duplicate vars in querystring when using 'extraVars' option (bug #1383)
(thanks to pauluz at gazeta dot pl)2.2.12.2.1stablestable2004-04-15PHP- PHP5 compatibility (fixed bug #812)
- Forced ucfirst() on filename too2.2.02.2.0stablestable2004-01-23PHP- Fixed handling of errors raised in common base class
- Added an 'extraVars' option to add vars to the querystring
- Added <link> tags building (patch by Joerg Bruckmann)
- Fixed Bug #589 (common.php raise a notice if the querystring has no '=' character)
- Use '&' instead of '&' in urls for better XHTML conformance2.1.02.1.0stablestable2003-12-22PHP- Added getPageRangeByPageId()
- Fix getOffsetByPageId() in Pager_Jumping when totalItems == 0.
- Fix getOffsetByPageId() in Pager_Sliding for BC with Pager 1.x and Pager_Jumping.
N.B.: its previous (not-indended) behaviour is now provided by the new getPageRangeByPageId() method.
- Fix isFirstPage() when totalItems == 0
- Added test suite.2.02.0stablestable2003-09-10PHP- New major version.
- Pager and Pager_Sliding are now merged in the same package.
Every option available in Pager_Sliding is now also available
in Pager. The API is the same as the old one, BC is kept 100%.
- Switch between "Jumping" and "Sliding" window mode just setting
an option.
- Improved error handling.1.0.81.0.8stablestable2003-09-10PHP- Minor patch for script_name vs php_self (not included in v.1.0.7)
- Prevent URL modification1.0.71.0.7stablestable2002-12-01PHPMinor patch for script_name vs php_self1.0.61.0.6stablestable2002-09-08PHPUpdated to no longer require an array of data. Now
can be used with just a number of items. Thanks to
Christian Dickmann for the patch.1.0.51.0.5stablestable2002-07-27PHPChanged getCurrentPage() to getCurrentPageID() and
added getNextPageID() and getPreviousPageID()1.0.41.0.4stablestable2002-06-29PHPChanged getCurrentPage() to getCurrentPageID() and
added getNextPageID() and getPreviousPageID()1.0.31.0.3stablestable2002-05-31PHPCouple of minor bugs1.0.21.0.2stablestable2002-05-31PHPApplied patch from Christian Dickmann adding getCurrentPage(), numItems()
and optional CSS class for links.1.0.11.0.1stablestable2002-05-27PHPo No longer barfs with no querystring
o Now works with associative data array1.01.0stablestable2002-02-09PHPThis is the initial release of the Pager package.
Pager-2.4.8/examples/example.php 100666 0 0 3600 11173437505 11606 $myData,
'perPage' => 10,
'delta' => 8, // for 'Jumping'-style a lower number is better
'append' => true,
//'separator' => ' | ',
'clearIfVoid' => false,
'urlVar' => 'entrant',
'useSessions' => true,
'closeSession' => true,
//'mode' => 'Sliding', //try switching modes
'mode' => 'Jumping',
);
$pager = & Pager::factory($params);
$page_data = $pager->getPageData();
$links = $pager->getLinks();
$selectBox = $pager->getPerPageSelectBox();
?>