Skip to content

Commit 04ed29e

Browse files
committed
Better var name for paging info
1 parent 8479e71 commit 04ed29e

File tree

1 file changed

+7
-7
lines changed

1 file changed

+7
-7
lines changed

src/Controller/Component/ApiPaginationComponent.php

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,7 @@ class ApiPaginationComponent extends Component
2828
*
2929
* @var array
3030
*/
31-
protected $paging = [];
31+
protected $pagingInfo = [];
3232

3333
/**
3434
* Injects the pagination info into the response if the current request is a
@@ -45,7 +45,7 @@ public function beforeRender(Event $event)
4545
return;
4646
}
4747

48-
$this->paging = $controller->request->params['paging'][$controller->name];
48+
$this->pagingInfo = $controller->request->params['paging'][$controller->name];
4949
$config = $this->config();
5050

5151
if (!empty($config['aliases'])) {
@@ -56,7 +56,7 @@ public function beforeRender(Event $event)
5656
$this->setVisibility();
5757
}
5858

59-
$controller->set($this->config('key'), $this->paging);
59+
$controller->set($this->config('key'), $this->pagingInfo);
6060
$controller->viewVars['_serialize'][] = $this->config('key');
6161
}
6262

@@ -70,8 +70,8 @@ protected function setAliases()
7070
{
7171
$aliases = $this->config('aliases');
7272
foreach ($aliases as $key => $value) {
73-
$this->paging[$value] = $this->paging[$key];
74-
unset($this->paging[$key]);
73+
$this->pagingInfo[$value] = $this->pagingInfo[$key];
74+
unset($this->pagingInfo[$key]);
7575
}
7676
}
7777

@@ -84,9 +84,9 @@ protected function setAliases()
8484
protected function setVisibility()
8585
{
8686
$visible = $this->config('visible');
87-
foreach ($this->paging as $key => $value) {
87+
foreach ($this->pagingInfo as $key => $value) {
8888
if (!in_array($key, $visible)) {
89-
unset($this->paging[$key]);
89+
unset($this->pagingInfo[$key]);
9090
}
9191
}
9292
}

0 commit comments

Comments
 (0)