Mvc\Model::getChangedFields

public getChangedFields () Returns a list of changed values

Mvc\Model::fireEventCancel

public fireEventCancel (mixed $eventName) Fires an event, implicitly calls behaviors and listeners in the events manager are notified This method stops if one of the callbacks/listeners returns boolean false

Mvc\Model::fireEvent

public fireEvent (mixed $eventName) Fires an event, implicitly calls behaviors and listeners in the events manager are notified

Mvc\Model::findFirst

public static static findFirst ([string | array $parameters]) Allows to query the first record that match the specified conditions //What's the first robot in robots table? $robot = Robots::findFirst(); echo "The robot name is ", $robot->name; //What's the first mechanical robot in robots table? $robot = Robots::findFirst("type='mechanical'"); echo "The first mechanical robot name is ", $robot->name; //Get first virtual robot ordered by name $robot = Robots::findFirst(array("type

Mvc\Model::find

public static find ([mixed $parameters]) Allows to query a set of records that match the specified conditions // How many robots are there? $robots = Robots::find(); echo 'There are ', count($robots), "\n"; // How many mechanical robots are there? $robots = Robots::find("type='mechanical'"); echo 'There are ', count($robots), "\n"; // Get and print virtual robots ordered by name $robots = Robots::find(["type='virtual'", 'order' => 'name']); foreach ($robots as $robot) { echo $robo

Mvc\Model::dump

public dump () Returns a simple representation of the object that can be used with var_dump var_dump($robot->dump());

Mvc\Model::DIRTY_STATE_TRANSIENT

integer DIRTY_STATE_TRANSIENT

Mvc\Model::DIRTY_STATE_PERSISTENT

integer DIRTY_STATE_PERSISTENT

Mvc\Model::DIRTY_STATE_DETACHED

integer DIRTY_STATE_DETACHED

Mvc\Model::delete

public delete () Deletes a model instance. Returning true on success or false otherwise. $robot = Robots::findFirst("id=100"); $robot->delete(); foreach (Robots::find("type = 'mechanical'") as $robot) { $robot->delete(); }