@@ 142-142 (lines=1) @@ | ||
139 | foreach ((array)$data as $key => $value) { |
|
140 | $obj->$key = $value; |
|
141 | } |
|
142 | if (is_callable(($c=get_called_class())."::trigger")) $c::trigger("load", $obj, $table, $options['key']); |
|
143 | return $obj; |
|
144 | } else { |
|
145 | return null; |
|
@@ 167-167 (lines=1) @@ | ||
164 | * Private Standard Save Method |
|
165 | */ |
|
166 | private function persistenceSaveDefault($table,$options){ |
|
167 | if (is_callable(($c=get_called_class())."::trigger")) $c::trigger("save", $this, $table, $options['key']); |
|
168 | $id = SQL::insertOrUpdate($table,array_filter((array)$this, function($var) { |
|
169 | return !is_null($var); |
|
170 | }),$options['key']); |