Abstract class Phalcon\Mvc\Model\Behavior
implements Phalcon\Mvc\Model\BehaviorInterface
Source on GitHub
This is an optional base class for ORM behaviors
Methods
public __construct ([array $options])
protected mustTakeAction (mixed $eventName)
Checks whether the behavior must take action on certain event
protected array getOptions ([string $eventName])
Returns the behavior options related to an event
public notify (mixed $type, Phalcon\Mvc\ModelInterface $model)
This method receives the notifications from the EventsManager
public missingMethod (Phalcon\Mvc\ModelInterface $model, string $method, [array $arguments])
Acts as fallbacks when a missing method is called on the model
Class Phalcon\Mvc\Model\Behavior\SoftDelete
extends abstract class Phalcon\Mvc\Model\Behavior
implements Phalcon\Mvc\Model\BehaviorInterface
Source on GitHub
Instead of permanently delete a record it marks the record as
deleted changing the value of a flag column
Methods
public notify (mixed $type, Phalcon\Mvc\ModelInterface $model)
Listens for notifications from the models manager
public __construct ([array $options]) inherited from Phalcon\Mvc\Model\Behavior
Phalcon\Mvc\Model\Behavior
protected mustTakeAction (mixed $eventName) inherited from Phalcon\Mvc\Model\Behavior
Checks whether the behavior must take action on certain event
protected array getOptions ([string $eventName]) inherited from Phalcon\Mvc\Model\Behavior
Returns the behavior options related to an event
public missingMethod (Phalcon\Mvc\ModelInterface $model, string $method, [array $arguments]) inherited from Phalcon\Mvc\Model\Behavior
Acts as fallbacks when a missing method is called on the model
Class Phalcon\Mvc\Model\Behavior\Timestampable
extends abstract class Phalcon\Mvc\Model\Behavior
implements Phalcon\Mvc\Model\BehaviorInterface
Source on GitHub
Allows to automatically update a model’s attribute saving the
datetime when a record is created or updated
Methods
public notify (mixed $type, Phalcon\Mvc\ModelInterface $model)
Listens for notifications from the models manager
public __construct ([array $options]) inherited from Phalcon\Mvc\Model\Behavior
Phalcon\Mvc\Model\Behavior
protected mustTakeAction (mixed $eventName) inherited from Phalcon\Mvc\Model\Behavior
Checks whether the behavior must take action on certain event
protected array getOptions ([string $eventName]) inherited from Phalcon\Mvc\Model\Behavior
Returns the behavior options related to an event
public missingMethod (Phalcon\Mvc\ModelInterface $model, string $method, [array $arguments]) inherited from Phalcon\Mvc\Model\Behavior
Acts as fallbacks when a missing method is called on the model
Interface Phalcon\Mvc\Model\BehaviorInterface
Source on GitHub
Methods
abstract public notify (mixed $type, Phalcon\Mvc\ModelInterface $model)
…
abstract public missingMethod (Phalcon\Mvc\ModelInterface $model, mixed $method, [mixed $arguments])
…