/** * Get instance of allready contructed object * * @param void $id unique object id * @param string $class item className * * @return BaseZF_DbItem object instance */ public static function getInstance($table, $id = null, $realtime = false, $class = __CLASS__) { return parent::getInstance($table, $id, $realtime, $class); }
/** * */ protected static function _decodeData($dataString) { $data = Zend_Json::decode($dataString, true); foreach ($data as $key => &$value) { if (strpos($value, '{json}') !== false) { $value = Zend_Json::decode(str_replace('{json}', '', $value), true); switch ($value['type']) { case 'Item': $value = BaseZF_DbItem::getInstance($value['table'], $value['id']); break; case 'Collection': $value = new BaseZF_DbCollection($value['table'], $value['id']); break; } } } return $data; }