Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

Fix for editable id columns

Added function 'stored' for easy access to the currently stored data
  • Loading branch information...
commit a27252b682a41bc9b86c647e20e385f0ce1616aa 1 parent c3419a4
@tefra tefra authored
Showing with 19 additions and 0 deletions.
  1. +19 −0 data/Entity.php
View
19 data/Entity.php
@@ -400,6 +400,25 @@ public function export() {
);
}
+ /**
+ * Easy access to the currently stored values
+ *
+ * @param string $name Optionally included field name.
+ * @return mixed Entire stored data array if $name is empty, otherwise the value from the named field.
+ */
+ public function stored($name = null)
+ {
+ if($this->exists())
+ {
+ if($name)
+ {
+ return isset($this->_data[$name]) ? $this->_data[$name] : null;
+ }
+ return $this->_data;
+ }
+ return false;
+ }
+
/**
* Converts the data in the record set to a different format, i.e. an array.
*
Please sign in to comment.
Something went wrong with that request. Please try again.