TaskSerializer

readonly class \TYPO3\CMS\Scheduler\Task\TaskSerializer

Handles serialization of `AbstractTask` objects.

Attributes

#[Autoconfigure]
$public: true

Table of Contents

Properties

$container  : ContainerInterface
$taskService  : TaskService

Methods

__construct()  : mixed
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.

Properties

$container

protected ContainerInterface $container

Methods

__construct()

public __construct(ContainerInterface $container, TaskService $taskService) : mixed

Parameters

$container : ContainerInterface
$taskService : TaskService

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(array $row) : AbstractTask

First, find the task object, from the registry Second, recreate the execution object, Then fill all the data of the new task object from the rest of the row.

Parameters

$row : array

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
On this page