trait SerializationStopperTrait in Flysystem 8
Same name and namespace in other branches
- 3.x src/SerializationStopperTrait.php \Drupal\flysystem\SerializationStopperTrait
- 2.0.x src/SerializationStopperTrait.php \Drupal\flysystem\SerializationStopperTrait
- 3.0.x src/SerializationStopperTrait.php \Drupal\flysystem\SerializationStopperTrait
Stops a class from being serialized.
Hierarchy
- trait \Drupal\flysystem\SerializationStopperTrait
1 file declares its use of SerializationStopperTrait
- SerializationStopperTraitTest.php in tests/
src/ Unit/ SerializationStopperTraitTest.php
File
- src/
SerializationStopperTrait.php, line 8
Namespace
Drupal\flysystemView source
trait SerializationStopperTrait {
/**
* Prevents the class from being serialized.
*/
public function __sleep() {
$message = sprintf('%s can not be serialized. This probably means you are serializing an object that has an indirect reference to the %s object. Adjust your code so that is not necessary.', __CLASS__, __CLASS__);
throw new \LogicException($message);
}
}
Members
Name | Modifiers | Type | Description | Overrides |
---|---|---|---|---|
SerializationStopperTrait:: |
public | function | Prevents the class from being serialized. |