\Ceo\Core\ModelsMessage

Base message model

Summary

Methods
Properties
Constants
getSrn()
findFirstBySrn()
getResultsetClass()
hasProperty()
setRelated()
initialize()
getSource()
find()
findFirst()
$id
$uuid
$user_id
$subject
$message
$type
$reply_to
$status
$created_at
$queueable
$generated_by
$srn_name
No constants found
toArrayRelated()
No protected properties found
N/A
No private methods found
No private properties found
N/A

Properties

$id

$id : integer

ID

Type

integer

$uuid

$uuid : string

UUID

Type

string

$user_id

$user_id : string

User id

Type

string

$subject

$subject : string

Email subject

Type

string

$message

$message : string

Message content

Type

string

$type

$type : string

Message type, enum

Type

string

$reply_to

$reply_to : string

Reply to, if any

Type

string

$status

$status : \Ceo\Core\Models\tinyint

Send status, 0 = Queued, 1 = Sent Do not treat as boolean as futher statuses may be added

Type

\Ceo\Core\Models\tinyint

$created_at

$created_at : \Ceo\Core\Models\datetime

Created time

Type

\Ceo\Core\Models\datetime

$queueable

$queueable : boolean

Queueable message

Type

boolean

$generated_by

$generated_by : string

Track the generating item by UUID

Type

string

$srn_name

$srn_name : 

Type

Methods

getSrn()

getSrn() : string

Return model's SRN. Model should implement a 'srn_name' protected value.

Otherwise, this will pull from the 'getSource' method

Returns

string —

SRN

findFirstBySrn()

findFirstBySrn(string  $srn) : object

Find model by SRN

Parameters

string $srn

complete SRN

Returns

object —

Model object

getResultsetClass()

getResultsetClass() 

hasProperty()

hasProperty(string  $str) : boolean

Determine if the model has a public property.

Useful in determining valid sorting options on the front end.

Parameters

string $str

Property

Returns

boolean

setRelated()

setRelated(string  $relation, mixed  $value = array()) : self

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

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

Parameters

string $relation
mixed $value

Returns

self

initialize()

initialize() 

Initialize method for model.

getSource()

getSource() : string

Returns table name mapped in the model.

Returns

string

find()

find(mixed  $parameters = null) : array<mixed,\Ceo\Core\Models\User>

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

Parameters

mixed $parameters

Returns

array<mixed,\Ceo\Core\Models\User>

findFirst()

findFirst(mixed  $parameters = null) : \Ceo\Core\Models\User

Allows to query the first record that match the specified conditions

Parameters

mixed $parameters

Returns

\Ceo\Core\Models\User

toArrayRelated()

toArrayRelated(  $ops,   $array) 

Parameters

$ops
$array