TaskValidator
Table of Contents
Methods
- isValid() : bool
- This method encapsulates a very simple test for the purpose of clarity.
Methods
isValid()
This method encapsulates a very simple test for the purpose of clarity.
public
isValid(mixed $value) : bool
Registered tasks are stored in the database along with a serialized task object. When a registered task is fetched, its object is unserialized. At that point, if the class corresponding to the object is not available anymore (e.g. because the extension providing it has been uninstalled), the unserialization will produce an incomplete object. This test checks whether the unserialized object is of the right (parent) class or not.
Parameters
- $value : mixed
-
The object to test
Return values
bool —TRUE if object is a task, FALSE otherwise