summaryrefslogtreecommitdiff
path: root/idiorm.php
diff options
context:
space:
mode:
authorJamie Matthews <[email protected]>2010-02-10 23:38:17 +0000
committerJamie Matthews <[email protected]>2010-02-10 23:38:17 +0000
commit45d4a51131cf4c2eb7b990661ad9fe00e69db47d (patch)
tree18fd54877525dedeead1eef1ceee3b936433e3bf /idiorm.php
parentb5ef302b28d3f24d6311bca9392e037c03c4e7e9 (diff)
Added magic methods to allow property-style get/set access
Diffstat (limited to 'idiorm.php')
-rw-r--r--idiorm.php11
1 files changed, 11 insertions, 0 deletions
diff --git a/idiorm.php b/idiorm.php
index 66caaaf..c4b649c 100644
--- a/idiorm.php
+++ b/idiorm.php
@@ -427,5 +427,16 @@
$statement = self::$db->prepare($query);
return $statement->execute($values);
}
+
+ // --------------------- //
+ // --- MAGIC METHODS --- //
+ // --------------------- //
+ public function __get($key) {
+ return $this->get($key);
+ }
+
+ public function __set($key, $value) {
+ $this->set($key, $value);
+ }
}