|
@@ -577,12 +577,21 @@ abstract class Model {
|
|
|
|
|
|
if (starts_with($method, 'get_'))
|
|
|
{
|
|
|
- return $this->get_attribute(substr($method, 4));
|
|
|
+ return $this->attributes[substr($method, 4)];
|
|
|
}
|
|
|
elseif (starts_with($method, 'set_'))
|
|
|
{
|
|
|
- return $this->set_attribute(substr($method, 4), $parameters[0]);
|
|
|
+ $this->attributes[substr($method, 4)] = $parameters[0];
|
|
|
}
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
+ elseif (starts_with($method, 'add_'))
|
|
|
+ {
|
|
|
+ $this->relationships[substr($method, 4)][] = $parameters[0];
|
|
|
+ }
|
|
|
+
|
|
|
|
|
|
|
|
|
|