Skip to content

Instantly share code, notes, and snippets.

@mockiemockiz
Last active August 29, 2015 14:00
Show Gist options
  • Save mockiemockiz/11398979 to your computer and use it in GitHub Desktop.
Save mockiemockiz/11398979 to your computer and use it in GitHub Desktop.
fdgfdgdf
<?php
$cache = StorageFactory::adapterFactory('filesystem', array(
'cache_dir' => './data/cache',
'ttl' => 3600,
'plugins' => array(
'exception_handler' => array(
'throw_exceptions' => false
),
'serializer'
),
));
// grab the paginator from the AlbumTable
$paginator = $this->getRealEstatePropertyTable()->exploreProperty($cond);
// set the current page to what has been passed in query string, or to 1 if none set
$paginator->setCurrentPageNumber((int)$this->params()->fromQuery('page', 1));
// set the number of items per page to 10
$paginator->setItemCountPerPage(10);
$paginator->setCache($cache);
?>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment