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


PHP JPagination::get方法代码示例

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


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

示例1: __construct

 /**
  * Class Constructor.
  *
  * @since	1.0
  * @access	public
  * @param	int		The total number of records.
  * @param	int		The number of items shown.
  * @param	int		The number of items to be shown per page.
  */
 public function __construct($total, $limitstart, $limit)
 {
     // Initialize the original pagination from Joomla.
     $this->pagination = new JPagination($total, $limitstart, $limit);
     if (!FD::isJoomla30()) {
         $this->pagination->pagesCurrent = $this->pagination->get('pages.current');
         $this->pagination->pagesTotal = $this->pagination->get('pages.total');
         $this->pagination->pagesStart = $this->pagination->get('pages.start');
         $this->pagination->pagesStop = $this->pagination->get('pages.stop');
     }
 }
开发者ID:BetterBetterBetter,项目名称:B3App,代码行数:20,代码来源:pagination.php

示例2: testConstructor

 /**
  * This method tests the.
  *
  * This is a basic data driven test.  It takes the data passed, runs the constructor
  * and make sure the appropriate values get setup.
  *
  * @return  void
  *
  * @since   11.1
  * @dataProvider dataTestConstructor
  * @covers  JPagination::__construct
  */
 public function testConstructor($total, $limitstart, $limit, $expected)
 {
     $pagination = new JPagination($total, $limitstart, $limit);
     $this->assertEquals($expected['total'], $pagination->total, 'Wrong Total');
     $this->assertEquals($expected['limitstart'], $pagination->limitstart, 'Wrong Limitstart');
     $this->assertEquals($expected['limit'], $pagination->limit, 'Wrong Limit');
     $this->assertEquals($expected['pages.total'], $pagination->get('pages.total'), 'Wrong Total Pages');
     $this->assertEquals($expected['pages.current'], $pagination->get('pages.current'), 'Wrong Current Page');
     $this->assertEquals($expected['pages.start'], $pagination->get('pages.start'), 'Wrong Start Page');
     $this->assertEquals($expected['pages.stop'], $pagination->get('pages.stop'), 'Wrong Stop Page');
     unset($pagination);
 }
开发者ID:rvsjoen,项目名称:joomla-platform,代码行数:24,代码来源:JPaginationTest.php

示例3: testGet

 /**
  * This method tests the get method.
  *
  * @param   integer  $property  The property to get.
  * @param   string   $default   The default value if the property doesn't exist
  * @param   array    $expected  The expected results for the JPagination object
  *
  * @return  void
  *
  * @covers        JPagination::get
  * @dataProvider  dataGet
  * @since         3.2
  */
 public function testGet($property, $default, $expected)
 {
     $pagination = new JPagination(100, 50, 20, '', $this->app);
     $result = $pagination->get($property, $default);
     $this->assertEquals($result, $expected, 'The expected output of the property is incorrect');
     unset($pagination);
 }
开发者ID:klas,项目名称:joomla-cms,代码行数:20,代码来源:JPaginationTest.php


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