\Ceo\ModelsMediaAuthor

Base model methods

Summary

Methods
Properties
Constants
getResultsetClass()
hasProperty()
setRelated()
beforeSave()
afterSave()
afterFetch()
getMetadata()
toCompat()
initialize()
getSource()
$id
$author_id
$item_id
$item_type
No constants found
toArrayRelated()
No protected properties found
N/A
No private methods found
No private properties found
N/A

Properties

$id

$id : integer

internal id

Type

integer

$author_id

$author_id : integer

Author ID

Type

integer

$item_id

$item_id : integer

Item ID

Type

integer

$item_type

$item_type : string

Item Type

Type

string

Methods

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

beforeSave()

beforeSave() 

afterSave()

afterSave() 

afterFetch()

afterFetch() 

getMetadata()

getMetadata(  $k) 

Parameters

$k

toCompat()

toCompat(  $useKlass = null) : object

Returns a base CEO model as a Gryphon compatible one.

{% set article = fetch('article').order('published_at desc').find() %}
{{ article[0].toCompat().url }}

Parameters

$useKlass

Returns

object

initialize()

initialize() 

getSource()

getSource() 

toArrayRelated()

toArrayRelated(  $ops,   $array) 

Parameters

$ops
$array