当前位置: 首页>>代码示例>>PHP>>正文


PHP Zend_Paginator::addAdapterPrefixPath方法代码示例

本文整理汇总了PHP中Zend_Paginator::addAdapterPrefixPath方法的典型用法代码示例。如果您正苦于以下问题:PHP Zend_Paginator::addAdapterPrefixPath方法的具体用法?PHP Zend_Paginator::addAdapterPrefixPath怎么用?PHP Zend_Paginator::addAdapterPrefixPath使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在Zend_Paginator的用法示例。


在下文中一共展示了Zend_Paginator::addAdapterPrefixPath方法的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。

示例1: __construct

 /**
  * Constructor.
  *
  * @param Zrt_JQuery_JqGrid_Adapter_Interface $adaptor
  * @param array $options
  */
 public function __construct($id, $adapter, array $options = array())
 {
     Zend_Paginator::addAdapterPrefixPath('Zrt_JQuery_JqGrid_Adapter', 'Zrt/JQuery/JqGrid/Adapter');
     if ($adapter instanceof Zrt_JQuery_JqGrid_Adapter_Interface) {
         $this->_adapter = $adapter;
     } else {
         throw new Zrt_JQuery_JqGrid_Exception('Zrt_JQuery_JqGrid only accepts instances of the type ' . 'Zrt_JQuery_JqGrid_Adapter_Interface');
     }
     $this->_id = $id;
     // Set grid options, automatically set the default options
     // and over-ride with user options.
     $this->_setDefaultOptions();
     if (isset($options)) {
         if ($options instanceof Zend_Config) {
             $options = $options->toArray();
         }
         if (!is_array($options)) {
             throw new Zend_Exception('JqGrid options must be in an array or a Zend_Config object');
         }
         $this->setOptions($options);
     }
     $this->_plugins = new Zrt_JQuery_JqGrid_Plugin_Broker();
     $this->_plugins->setGrid($this);
     $this->_plugins->registerPlugin(new Zrt_JQuery_JqGrid_Plugin_Pager());
 }
开发者ID:josmel,项目名称:adminwap,代码行数:31,代码来源:JqGrid.php

示例2: testAddsSingleAdapterPrefixPath

 public function testAddsSingleAdapterPrefixPath()
 {
     Zend_Paginator::addAdapterPrefixPath('prefix1', 'path1');
     $loader = Zend_Paginator::getAdapterLoader();
     $paths = $loader->getPaths();
     $this->assertArrayHasKey('prefix1_', $paths);
     $this->assertEquals($paths['prefix1_'], array('path1/'));
     $loader->clearPaths('prefix1');
 }
开发者ID:SustainableCoastlines,项目名称:loveyourwater,代码行数:9,代码来源:PaginatorTest.php


注:本文中的Zend_Paginator::addAdapterPrefixPath方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。