當前位置: 首頁>>代碼示例>>PHP>>正文


PHP LengthAwarePaginator::__construct方法代碼示例

本文整理匯總了PHP中Illuminate\Pagination\LengthAwarePaginator::__construct方法的典型用法代碼示例。如果您正苦於以下問題:PHP LengthAwarePaginator::__construct方法的具體用法?PHP LengthAwarePaginator::__construct怎麽用?PHP LengthAwarePaginator::__construct使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在Illuminate\Pagination\LengthAwarePaginator的用法示例。


在下文中一共展示了LengthAwarePaginator::__construct方法的6個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的PHP代碼示例。

示例1: __construct

 /**
  * Create a new paginator instance.
  *
  * @param  \Elodex\SearchResult $searchResult
  * @param  int $perPage
  * @param  int|null $currentPage
  * @param  array $options (path, query, fragment, pageName)
  */
 public function __construct($searchResult, $perPage, $currentPage = null, array $options = [])
 {
     $this->searchResult = $searchResult;
     $total = $this->searchResult->totalHits();
     $items = $this->searchResult->getDocuments();
     parent::__construct($items, $total, $perPage, $currentPage, $options);
 }
開發者ID:elodex,項目名稱:elodex,代碼行數:15,代碼來源:LengthAwarePaginator.php

示例2: __construct

 /**
  * Create a new paginator instance.
  *
  * @param  mixed  $items
  * @param  int  $total
  * @param  int  $perPage
  * @param  int|null  $currentPage
  * @param  array  $options (path, query, fragment, pageName)
  * @return void
  */
 public function __construct($items, $total, $perPage, $currentPage = null, array $options = [])
 {
     parent::__construct($items, $total, $perPage, $currentPage, $options);
     foreach (request()->query->all() as $key => $param) {
         $this->addQuery($key, $param);
     }
 }
開發者ID:atudz,項目名稱:gorabelframework,代碼行數:17,代碼來源:PaginatorCore.php

示例3: __construct

 /**
  * PlasticPaginator constructor.
  *
  * @param PlasticResult $result
  * @param int           $limit
  * @param int           $page
  */
 public function __construct(PlasticResult $result, $limit, $page)
 {
     $this->result = $result;
     parent::__construct($result->hits(), $result->totalHits(), $limit, $page, ['path' => LengthAwarePaginator::resolveCurrentPath()]);
     $hitsReference =& $this->items;
     $result->setHits($hitsReference);
 }
開發者ID:sleimanx2,項目名稱:plastic,代碼行數:14,代碼來源:PlasticPaginator.php

示例4: __construct

 /**
  * Create a new paginator instance.
  *
  * @param  mixed  $items
  * @param  int  $total
  * @param  int  $perPage
  * @param  int|null  $currentPage
  * @param  array  $options (path, query, fragment, pageName)
  * @return void
  */
 public function __construct($items, $total, $perPage, $currentPage = null, array $options = [])
 {
     parent::__construct($items, $total, $perPage, $currentPage, $options);
     /*
      * The original paginator always adds a trailing slash.
      * So we have to overwrite the $path variable with the path without a trailing slash.
      */
     $this->path = Request::url();
 }
開發者ID:chirilo,項目名稱:Contentify,代碼行數:19,代碼來源:LengthAwarePaginator.php

示例5: __construct

 public function __construct($items, $total, $perPage, $currentPage = null, array $options = [])
 {
     parent::__construct($items, $total, $perPage, $currentPage, $options);
 }
開發者ID:selahattinunlu,項目名稱:laravel-api-query-builder,代碼行數:4,代碼來源:Paginator.php

示例6: __construct

 /**
  * Create a new paginator instance.
  *
  * @param  mixed  $items
  * @param  int  $total
  * @param  int  $perPage
  * @param  array $aggregations
  * @param  int|null  $currentPage
  * @param  array  $options (path, query, fragment, pageName)
  * @return void
  */
 public function __construct($items, $total, $perPage, $aggregations, $currentPage = null, array $options = [])
 {
     $this->aggregations = $aggregations;
     parent::__construct($items, $total, $perPage, $currentPage, $options);
 }
開發者ID:danielmarreirosdeoliveira,項目名稱:ariadne-portal,代碼行數:16,代碼來源:ElasticSearchPaginator.php


注:本文中的Illuminate\Pagination\LengthAwarePaginator::__construct方法示例由純淨天空整理自Github/MSDocs等開源代碼及文檔管理平台,相關代碼片段篩選自各路編程大神貢獻的開源項目,源碼版權歸原作者所有,傳播和使用請參考對應項目的License;未經允許,請勿轉載。