本文整理汇总了PHP中Zend\Paginator\Paginator::getAdapter方法的典型用法代码示例。如果您正苦于以下问题:PHP Paginator::getAdapter方法的具体用法?PHP Paginator::getAdapter怎么用?PHP Paginator::getAdapter使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类Zend\Paginator\Paginator
的用法示例。
在下文中一共展示了Paginator::getAdapter方法的3个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: setCriteria
/**
* Set criteria
*
* @access public
*
* @param Doctrine\Common\Collections\Criteria $criteria
*/
public function setCriteria($criteria)
{
$this->paginator->getAdapter()->setCriteria($criteria);
}
示例2: testArrayAccessInClassSerializableLimitIterator
/**
* @group ZF-9396
*/
public function testArrayAccessInClassSerializableLimitIterator()
{
$iterator = new \ArrayIterator(array('zf9396', 'foo', null));
$paginator = new Paginator\Paginator(new Adapter\Iterator($iterator));
$this->assertEquals('zf9396', $paginator->getItem(1));
$items = $paginator->getAdapter()->getItems(0, 10);
$this->assertEquals('foo', $items[1]);
$this->assertEquals(0, $items->key());
$this->assertFalse(isset($items[2]));
$this->assertTrue(isset($items[1]));
$this->assertFalse(isset($items[3]));
}
示例3: getAlias
/**
* Get the alias of $paginator
*
* @param Zend\Paginator\Paginator $paginator
* @return string
*/
private function getAlias(Paginator $paginator)
{
$alias = '';
$adapter = $paginator->getAdapter();
if ($adapter instanceof Adapter) {
$alias = $adapter->getAlias();
}
return $alias;
}