Lines Matching refs:obj
195 $obj = $sth->fetchObject($this->get_object_class_name(),
198 if ($obj === false) {
202 return $obj;
218 $obj = new $object_name($this->model, $defaults);
219 return $obj;
234 protected function insert(Entity $obj) {
235 if ($obj->id != NULL) {
242 foreach ($obj->get_columns() as $column) {
243 if ($obj->$column === null) continue;
246 $value = $obj->$column;
261 $reflectionClass = new \ReflectionClass($obj);
264 $reflectionProperty->setValue($obj, $this->model->db->lastInsertId());
268 protected function update(Entity $obj) {
269 if ($obj->id == NULL) {
274 $execute = array(':id' => $obj->id);
275 foreach ($obj->get_columns() as $column) {
278 $value = $obj->$column;
294 public function initial_save(Entity $obj, $data) {
295 $obj->set_data($data);
296 $this->insert($obj);
299 public function update_save(Entity $obj, $data) {
300 $obj->set_data($data);
301 $this->update($obj);
304 public function save(Entity $obj) {
305 if ($obj->id == NULL) {
306 $this->insert($obj);
308 $this->update($obj);
318 public function delete(Entity $obj) {
319 if ($obj->acl_of('id') < BEZ_PERMISSION_DELETE) {
322 $this->delete_from_db($obj->id);