Skip to content

Commit

Permalink
Avoid reusing trait to make PHP 5.6 happy.
Browse files Browse the repository at this point in the history
  • Loading branch information
ADmad committed Jun 5, 2017
1 parent 8a6e889 commit 1f7f02e
Showing 1 changed file with 11 additions and 10 deletions.
21 changes: 11 additions & 10 deletions src/Controller/Component/PaginatorComponent.php
Expand Up @@ -16,7 +16,6 @@

use Cake\Controller\Component;
use Cake\Controller\ComponentRegistry;
use Cake\Core\InstanceConfigTrait;
use Cake\Network\Exception\NotFoundException;
use Cake\ORM\Paginator;

Expand All @@ -32,10 +31,6 @@
*/
class PaginatorComponent extends Component
{
use InstanceConfigTrait {
setConfig as protected _setConfig;
configShallow as protected _configShallow;
}

/**
* Default pagination settings.
Expand Down Expand Up @@ -217,18 +212,24 @@ protected function _setPagingParams()
+ (array)$request->getParam('paging');
}

public function config($key = null, $value = null, $merge = true)
{
return $this->_paginator->config($key, $value, $merge);
}

public function setConfig($key, $value = null, $merge = true)
{
$this->_paginator->setConfig($key, $value, $merge);
return $this->_paginator->setConfig($key, $value, $merge);
}

return $this->_setConfig($key, $value, $merge);
public function getConfig($key = null)
{
return $this->_paginator->getConfig($key);
}

public function configShallow($key, $value = null)
{
$this->_paginator->configShallow($key, $value = null);

return $this->_configShallow($key, $value = null);
return $this->_paginator->configShallow($key, $value = null);
}

public function __call($method, $args)
Expand Down

0 comments on commit 1f7f02e

Please sign in to comment.