add method __get()

This commit is contained in:
Uwe Steinmann 2015-11-16 09:10:25 +01:00
parent 6d16946a19
commit a836e65f35

View File

@ -36,6 +36,13 @@ class SeedDMS_SQLiteFTS_Document {
*/
protected $fields;
public function __get($key) { /* {{{ */
if(isset($this->fields[$key]))
return $this->fields[$key];
else
return false;
} /* }}} */
public function addField($key, $value) { /* {{{ */
if($key == 'document_id') {
$this->id = $this->fields[$key] = (int) $value;