Documentation

Webcron extends BaseModel
in package

Webcron Task Model We use cron-expression for parsing: <pre> * * * * * * - - - - - - | | | | | | | | | | | + year [optional] | | | | +----- day of week (0 - 7) (Sunday=0 or 7) | | | +---------- month (1 - 12) | | +--------------- day of month (1 - 31) | +-------------------- hour (0 - 23) +------------------------- min (0 - 59) </pre>

Tags
see
https://packagist.org/packages/mtdowling/cron-expression

Table of Contents

$id  : int
ID
$label  : mixed
Issue text label
$schedule  : mixed
Schedule
$status  : mixed
Open = 1, closed = 0 Default is open
$task  : mixed
The task class
$uuid  : string
UUID
afterFetch()  : mixed
afterSave()  : mixed
beforeSave()  : mixed
find()  : array<string|int, Issues>
Allows to query a set of records that match the specified conditions
findFirst()  : Issue
Allows to query the first record that match the specified conditions
getMetadata()  : mixed
getResultsetClass()  : mixed
getSource()  : string
Returns table name mapped in the model.
hasProperty()  : bool
Determine if the model has a public property.
initialize()  : mixed
initializer
setRelated()  : self
Phalcon has this bug where if you enumerate a relation then try to set it via the magic setter, it won't save.
toArray()  : mixed
toCompat()  : object
Returns a base CEO model as a Gryphon compatible one.
toArrayRelated()  : mixed

Properties

$label

Issue text label

public mixed $label

string;

$schedule

Schedule

public mixed $schedule

string;

$status

Open = 1, closed = 0 Default is open

public mixed $status

string;

$task

The task class

public mixed $task

string;

Methods

afterFetch()

public afterFetch() : mixed
Return values
mixed

afterSave()

public afterSave() : mixed
Return values
mixed

beforeSave()

public beforeSave() : mixed
Return values
mixed

find()

Allows to query a set of records that match the specified conditions

public static find([mixed $parameters = null ]) : array<string|int, Issues>
Parameters
$parameters : mixed = null
Return values
array<string|int, Issues>

findFirst()

Allows to query the first record that match the specified conditions

public static findFirst([mixed $parameters = null ]) : Issue
Parameters
$parameters : mixed = null
Return values
Issue

getMetadata()

public getMetadata(mixed $k) : mixed
Parameters
$k : mixed
Return values
mixed

getResultsetClass()

public getResultsetClass() : mixed
Return values
mixed

getSource()

Returns table name mapped in the model.

public getSource() : string
Return values
string

hasProperty()

Determine if the model has a public property.

public hasProperty(string $str) : bool

Useful in determining valid sorting options on the front end.

Parameters
$str : string

Property

Return values
bool

initialize()

initializer

public initialize() : mixed
Return values
mixed

setRelated()

Phalcon has this bug where if you enumerate a relation then try to set it via the magic setter, it won't save.

public setRelated(string $relation[, mixed $value = [] ]) : self

I think it has something to do with implicit transactions, but I'm not entirely sure...

Parameters
$relation : string
$value : mixed = []
Return values
self

toArray()

public toArray([mixed $columns = NULL ]) : mixed
Parameters
$columns : mixed = NULL
Return values
mixed

toCompat()

Returns a base CEO model as a Gryphon compatible one.

public toCompat([mixed $useKlass = null ]) : object
{% set article = fetch('article').order('published_at desc').find() %}
{{ article[0].toCompat().url }}
Parameters
$useKlass : mixed = null
Return values
object

toArrayRelated()

protected toArrayRelated(mixed $ops, mixed $array) : mixed
Parameters
$ops : mixed
$array : mixed
Return values
mixed

Search results