Created
January 14, 2010 15:53
-
-
Save nebiros/277274 to your computer and use it in GitHub Desktop.
How to implement Zend_Paginator without Zend
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
defined( "APPLICATION_PATH" ) | |
|| define( "APPLICATION_PATH", realpath( dirname( __FILE__ ) ) ); | |
// Ensure library/ is on include_path. | |
set_include_path( implode( PATH_SEPARATOR, array( | |
realpath( APPLICATION_PATH . "/library" ), // Aca va a estar la carpeta Zend que viene con el .tag.gz del ZF | |
get_include_path(), | |
) ) ); | |
/** Lo que haga la pagina **/ | |
/** Implementamos por ejemplo el paginador **/ | |
require_once "Zend/Paginator.php"; | |
$paginator = Zend_Paginator::factory( $data ); // $data es un arreglo cualquiera, o lo que reciba el Zend_Paginator#factory. | |
$paginator->setItemCountPerPage( 50 ); | |
$paginator->setCurrentPageNumber( 1 ); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment