public function getValue($name) { $ret = parent::getValue($name); // config gets special treatment if ($name == 'config') { if ($ret) { $obj = new Blerby_Entity_Object(); $obj->fromArray(json_decode(stripcslashes($ret), true)); $ret = $obj; } } return $ret; }
public function init($options = array()) { if (!$this->meta instanceof Blerby_Entity_Object) { $meta = new Blerby_Entity_Object(); $meta->fromArray($this->meta); $this->meta = $meta; } $dir = dirname($this->meta('file')); $metacache = $dir . "/metadata.xml"; if (is_file($metacache)) { $xml = new SimpleXMLElement(file_get_contents($metacache), LIBXML_NOCDATA); $this->parseMeta($xml, $this->meta); } // collect appropriate rows for config $componentTable = new Blerby_Entity_Model_Component(); $componentTableMeta = $componentTable->info(); $this->meta->componentCols = array_keys($componentTableMeta['metadata']); }