preview Zend_View_Pagination version 2 + url download

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
2 messages Options
Reply | Threaded
Open this post in threaded view
|

preview Zend_View_Pagination version 2 + url download

Alexandre Riveira
Available new version from Zend_View_Pagination.

download: http://www.objectdata.com.br/pagination.php

Changes:
- Paginator implements iterator:
$pagination = new Zend_View_Pagination($this->list, 50, $params);
foreach($pagination as $row)
{

- methods getArrayIterator and getArrayObject removed.
---------------------------------------------------------------------------------------------------------------------------------------

I intend to also take off getArray, me I do not seem necessary more.
Opinions???????????????????
---------------------------------------------------------------------------------------------------------------------------------------



future points:
- $_REQUEST variable acess directly  for internal class

- The _buildURL method is very specific about how URLs are formed

- Large result's



Regards

Alexandre Riveira
Reply | Threaded
Open this post in threaded view
|

Re: preview Zend_View_Pagination version 2 + url download

Ondrej Ivanič
Hi

> Available new version from Zend_View_Pagination.

Why not Zend_View_Pager?

I have some remarks about code:

> const INDEX_NAME = 'ZEND_VIEW_PAGINATION_PAGE';

I think, this constant is not good, index name can be passed via methods
arguments, like this:

public function __construct($valueList, $sizePage, $params = array()) {
 ...
}

and

$p = new Zend_View_Pagination(..., ..., array('index' => 'page_id', ...));

with some fallback code to set default 'index' name, but currently $params are
used for attributes in <font> tag. This isn't good idea.

also other methods (_getCurrentIndex(), buildLink(),  needs to be updated to use
this parameter rather then INDEX_NAME constant.

if (isset($_REQUEST[self::INDEX_NAME])) {

versus

if (isset($_REQUEST[$this->$params['index']])) {

Why _buildLink() function url-ize all data in $_REQUEST?

--
Ondrej Ivanic
([hidden email])

-------------------------------------------------
This mail sent through IMP: http://horde.org/imp/