TaskSerializer
Handles serialization of `AbstractTask` objects.
This is an internal API, avoid using it in custom implementations.
Table of Contents
Methods
- deserialize() : AbstractTask
- This method takes care of safely deserializing tasks from the database and either returns a valid Task or throws an InvalidTaskException, which holds information about the broken task.
- extractClassName() : string|null
- If the task class couldn't be figured out from the unserialization (because of uninstalled extensions or exceptions), try to find it in the serialized string with a simple preg match.
- resolveClassName() : T>|string
Methods
deserialize()
This method takes care of safely deserializing tasks from the database and either returns a valid Task or throws an InvalidTaskException, which holds information about the broken task.
public
deserialize(string $serializedTask) : AbstractTask
Parameters
- $serializedTask : string
Tags
Return values
AbstractTaskextractClassName()
If the task class couldn't be figured out from the unserialization (because of uninstalled extensions or exceptions), try to find it in the serialized string with a simple preg match.
public
extractClassName(string $serializedTask) : string|null
Parameters
- $serializedTask : string
Return values
string|nullresolveClassName()
public
resolveClassName(T $task) : T>|string
Parameters
- $task : T