mirror of
https://github.com/kamilwylegala/cakephp2-php8.git
synced 2024-11-15 03:18:26 +00:00
Rename serializer
to serialize
This commit is contained in:
parent
0a704cc288
commit
7c83f7140f
2 changed files with 11 additions and 11 deletions
|
@ -84,7 +84,7 @@ class MemcachedEngine extends CacheEngine {
|
|||
'persistent' => false,
|
||||
'login' => null,
|
||||
'password' => null,
|
||||
'serializer' => 'php'
|
||||
'serialize' => 'php'
|
||||
);
|
||||
parent::init($settings);
|
||||
|
||||
|
@ -132,14 +132,14 @@ class MemcachedEngine extends CacheEngine {
|
|||
protected function _setOptions() {
|
||||
$this->_Memcached->setOption(Memcached::OPT_LIBKETAMA_COMPATIBLE, true);
|
||||
|
||||
if (!array_key_exists($this->settings['serializer'], self::$serializer)) {
|
||||
if (!array_key_exists($this->settings['serialize'], self::$serializer)) {
|
||||
throw new CacheException(
|
||||
__d('cake_dev', '%s is not a valid serializer engine for Memcached', $this->settings['serializer'])
|
||||
__d('cake_dev', '%s is not a valid serializer engine for Memcached', $this->settings['serialize'])
|
||||
);
|
||||
}
|
||||
|
||||
$serializer = self::$serializer['php'];
|
||||
switch($this->settings['serializer']) {
|
||||
switch($this->settings['serialize']) {
|
||||
case 'igbinary':
|
||||
if (Memcached::HAVE_IGBINARY) {
|
||||
$serializer = self::$serializer['igbinary'];
|
||||
|
|
|
@ -103,7 +103,7 @@ class MemcachedEngineTest extends CakeTestCase {
|
|||
'login' => null,
|
||||
'password' => null,
|
||||
'groups' => array(),
|
||||
'serializer' => 'php'
|
||||
'serialize' => 'php'
|
||||
);
|
||||
$this->assertEquals($expecting, $settings);
|
||||
}
|
||||
|
@ -144,7 +144,7 @@ class MemcachedEngineTest extends CakeTestCase {
|
|||
'engine' => 'Memcached',
|
||||
'servers' => array('127.0.0.1:11211'),
|
||||
'persistent' => false,
|
||||
'serializer' => 'invalid_serializer'
|
||||
'serialize' => 'invalid_serializer'
|
||||
);
|
||||
|
||||
$this->setExpectedException(
|
||||
|
@ -164,7 +164,7 @@ class MemcachedEngineTest extends CakeTestCase {
|
|||
'engine' => 'Memcached',
|
||||
'servers' => array('127.0.0.1:11211'),
|
||||
'persistent' => false,
|
||||
'serializer' => 'php'
|
||||
'serialize' => 'php'
|
||||
);
|
||||
|
||||
$Memcached->init($settings);
|
||||
|
@ -187,7 +187,7 @@ class MemcachedEngineTest extends CakeTestCase {
|
|||
'engine' => 'Memcached',
|
||||
'servers' => array('127.0.0.1:11211'),
|
||||
'persistent' => false,
|
||||
'serializer' => 'json'
|
||||
'serialize' => 'json'
|
||||
);
|
||||
|
||||
$Memcached->init($settings);
|
||||
|
@ -210,7 +210,7 @@ class MemcachedEngineTest extends CakeTestCase {
|
|||
'engine' => 'Memcached',
|
||||
'servers' => array('127.0.0.1:11211'),
|
||||
'persistent' => false,
|
||||
'serializer' => 'igbinary'
|
||||
'serialize' => 'igbinary'
|
||||
);
|
||||
|
||||
$Memcached->init($settings);
|
||||
|
@ -233,7 +233,7 @@ class MemcachedEngineTest extends CakeTestCase {
|
|||
'engine' => 'Memcached',
|
||||
'servers' => array('127.0.0.1:11211'),
|
||||
'persistent' => false,
|
||||
'serializer' => 'json'
|
||||
'serialize' => 'json'
|
||||
);
|
||||
|
||||
$this->setExpectedException(
|
||||
|
@ -258,7 +258,7 @@ class MemcachedEngineTest extends CakeTestCase {
|
|||
'engine' => 'Memcached',
|
||||
'servers' => array('127.0.0.1:11211'),
|
||||
'persistent' => false,
|
||||
'serializer' => 'igbinary'
|
||||
'serialize' => 'igbinary'
|
||||
);
|
||||
|
||||
$this->setExpectedException(
|
||||
|
|
Loading…
Reference in a new issue