unserialize() public method

Implementation of Serializable::unserialize()
public unserialize ( string $data )
$data string Serialized data
Ejemplo n.º 1
0
 /**
  * Override unserialize method
  *
  * @param   string $data Serialized data
  */
 public function unserialize($data)
 {
     if (static::$securityProvider === null) {
         throw new RuntimeException('You must set a security provider in order to use this class');
     }
     $data = unserialize($data);
     if (false === ($data =& static::$securityProvider->verify($data))) {
         throw new SecurityException("Your serialized closure might have been modified and it's unsafe to be unserialized." . "Make sure you are using the same security provider, with the same settings, " . "both for serialization and unserialization.");
     }
     parent::unserialize($data);
 }