本文整理汇总了PHP中ArrayObject::unserialize方法的典型用法代码示例。如果您正苦于以下问题:PHP ArrayObject::unserialize方法的具体用法?PHP ArrayObject::unserialize怎么用?PHP ArrayObject::unserialize使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类ArrayObject
的用法示例。
在下文中一共展示了ArrayObject::unserialize方法的6个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: ArrayObject
<?php
$a = new ArrayObject(array());
$a->unserialize("");
示例2: unserialize
public function unserialize($s)
{
return parent::unserialize($s);
}
示例3: unserialize
/**
* Unserializes key values data and root section name
*/
public function unserialize($data)
{
$data = unserialize($data);
$this->_name = $data['name'];
parent::unserialize($data['data']);
}
示例4: unserialize
/**
* Unserialize an ArrayObject
* @param string $serialized <p>
* The serialized <b>ArrayObject</b>.
* </p>
* @return void The unserialized <b>ArrayObject</b>.
*/
public function unserialize($serialized)
{
if (version_compare(PHP_VERSION, '5.3.0', '>=')) {
return parent::unserialize($serialized);
}
$serialized = substr($serialized, strlen('x:i:0;'));
$serialized = substr($serialized, 0, strlen($serialized) - strlen(';m:a:0:{}'));
$unserialized = unserialize($serialized);
$this->exchangeArray($unserialized);
}
示例5: ArrayObject
<?php
$a = new ArrayObject(array(1, 2, 3));
$b = $a->serialize();
$c = new ArrayObject();
$d = $c->unserialize($b);
var_dump($a);
var_dump($c);
var_dump($d);
var_dump($a == $c);
示例6: unserialize
/**
* Implementation of ArrayAccess::unserialize()
*
* Replaces the existing arrayObject with the object referred to by the
* serialized string.
*
* No value is returned.
*
* @param string $serialized
*/
public function unserialize($serialized)
{
$this->arrayObject->unserialize($serialized);
}