|
static | tableScheme ($db_table) |
|
static | expireTableScheme () |
|
static | exists ($id) |
|
static | countBySql ($sql='1', $params=[]) |
|
static | create ($data) |
|
static | build ($data, $is_new=true) |
|
static | buildExisting ($data) |
|
static | import ($data) |
|
static | findBySQL ($sql, $params=[]) |
|
static | findOneBySQL ($where, $params=[]) |
|
static | findThru ($foreign_key_value, $options) |
|
static | findEachBySQL ($callable, $sql, $params=[]) |
|
static | findMany ($pks=[], $order='', $order_params=[]) |
|
static | findEachMany ($callable, $pks=[], $order='', $order_params=[]) |
|
static | findAndMapBySQL ($callable, $where, $params=[]) |
|
static | findAndMapMany ($callable, $pks=[], $order='', $order_params=[]) |
|
static | deleteBySQL ($where, $params=[]) |
|
static | toObject ($id_or_object) |
|
static | __callStatic (string $name, array $arguments) |
|
static | setMariadbDefaultColumnFix (bool $state=true) |
|
const | ID_SEPARATOR = '_' |
|
static | $schemes = null |
|
| $content = [] |
|
| $content_db = [] |
|
| $is_new = true |
|
| $is_deleted = false |
|
| $relations = [] |
|
| $additional_data = [] |
|
string | $i18n_class = I18NString::class |
|
static | $config = [] |
|
static | $reserved_slots = ['value','newid','iterator','tablemetadata', 'relationvalue','wherequery','relationoptions','data','new','id'] |
|
static | $performs_batch_operation = false |
|
static | $mariadb_column_default_fix = false |
|
◆ activate()
activate |
( |
bool |
$run_immediately = false | ) |
|
Activates this schedule.
- Returns
- CronjobSchedule Returns itself to allow chaining
◆ calculateNextExecution()
calculateNextExecution |
( |
|
$now = null | ) |
|
Calculates the next execution for this schedule.
The next execution is calculated by increasing the current timestamp and testing whether all conditions match. This is not the best method to test and should be optimized sooner or later.
- Parameters
-
mixed | $now | Defines the temporal fix point |
- Returns
- int Timestamp of calculated next execution
- Exceptions
-
RuntimeException | When calculation takes too long (you should check the conditions for validity in that case) |
◆ cbJsonifyParameters()
cbJsonifyParameters |
( |
|
$type | ) |
|
|
protected |
◆ configure()
static configure |
( |
|
$config = [] | ) |
|
|
staticprotected |
◆ deactivate()
Deactivates this schedule.
- Returns
- CronjobSchedule Returns itself to allow chaining
◆ execute()
execute |
( |
|
$force = false | ) |
|
Executes this schedule.
- Parameters
-
bool | $force | Pass true to force execution of the schedule even if it's not activated |
- Returns
- mixed The result of the execution
- Exceptions
-
RuntimeException | When either the schedule or the according is not activated |
◆ getTitle()
replaces title with task name if title is empty.
- Returns
- string the title or the task name
◆ shouldExecute()
shouldExecute |
( |
|
$now = null | ) |
|
Determines whether the schedule should execute given the provided timestamp.
- Parameters
-
mixed | $now | Defines the temporal fix point |
- Returns
- bool Whether the schedule should execute or not.
◆ store()
Stores the schedule in database. Will bail out with an exception if the provided task does not exists. Will also nullify the title if it matches the task name (see CronjobSchedule::getTitle()).
- Returns
- CronjobSchedule Returns itself to allow chaining
◆ testTimestamp()
testTimestamp |
( |
|
$timestamp, |
|
|
|
$condition, |
|
|
|
$format |
|
) |
| |
|
protected |
Tests a timestamp against the passed condition.
- Parameters
-
int | $timestamp | The timestamp to test |
mixed | $condition | Can be either null for "don't care", a positive number for an exact moment or a negative number for a repeating moment |
String | $format | Format for date() to extract a portion of the timestamp |
The documentation for this class was generated from the following file: