26 abstract public function _format($arrayMessage);
32 abstract public function _getOne($keyValues, $include =
false, $useCache =
false);
40 abstract public function _delete(...$keyValues);
43 $instance->_new =
false;
44 return CRUDHelper::update ( $instance, $datas,
false, $updateMany );
47 protected function addOperation($instance, $datas, $insertMany =
false) {
48 $instance->_new =
true;
49 return CRUDHelper::update ( $instance, $datas,
false, $insertMany );
53 $modelsNS = Startup::getNS(
'models');
59 if (\class_exists ( $this->model )) {
64 echo $this->
_format ( $error->asArray () );
87 $this->
_checkResource ( $resource,
function () use ($id, $member) {
111 public function add_($resource) {
127 parent::_update ( ...$id );
static getController()
Returns the active controller name.
static getAction()
Returns tha active action.
Ubiquity\controllers\crud$CRUDHelper This class is part of Ubiquity.
getRequestParam($param, $default)
getOne_($resource, $id)
Returns an instance of $resource, by primary key $id.
getAll_($resource)
Returns all the instances from the model $resource.
addOperation($instance, $datas, $insertMany=false)
_getOne($keyValues, $include=false, $useCache=false)
add_($resource)
Inserts a new instance of $resource.
updateOperation($instance, $datas, $updateMany=false)
update_($resource,... $id)
Updates an existing instance of $resource.
delete_($resource,... $id)
Deletes an existing instance of $resource.
_getRelationShip($id, $member)
getRelationShip_($resource, $id, $member)
Returns an associated member value(s).
_checkResource($resource, $callback)
Gateway class between database and object model.
Object/relational mapping utilities.