TaskSerializer

Handles serialization of `AbstractTask` objects.

Internal

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
throws
InvalidTaskException
Return values
AbstractTask

extractClassName()

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|null

resolveClassName()

public resolveClassName(T $task) : T>|string
Parameters
$task : T
Tags
template

T of object

Return values
T>|string

        
On this page

Search results