Пример #1
0
 /**
  * This loads the data stored by the plugin before, NOT the configuration of the method,
  * this function should never be triggered only called from triggered functions.
  *
  * @param int    $id
  * @param string $primaryKey
  */
 protected function getPluginInternalData($id, $primaryKey = 0)
 {
     $x = vmPlugin::getCache('getPluginInternalData', $this->_vmpItable, $id, $this->_tablename, $this->tableFields, $primaryKey, $this->_tableId, $this->_loggable);
     if (!empty($x)) {
         //OPCloader::opcDebug('cache is_active:');
         //OPCloader::opcDebug($x->is_active);
         return $x;
     }
     if (isset($this->_vmpItable)) {
         $vmpItableStored = $this->_vmpItable;
     } else {
         $vmpItableStored = null;
     }
     if ($primaryKey === 0) {
         $primaryKey = $this->_tablepkey;
     }
     $this->_vmpItable = $this->createPluginTableObject($this->_tablename, $this->tableFields, $primaryKey, $this->_tableId, $this->_loggable);
     // 		vmdebug('getPluginInternalData $id '.$id.' and $primaryKey '.$primaryKey);
     //$ret = $this->_vmpItable->clear();
     $ret = $this->_vmpItable->load($id);
     vmPlugin::setCache($ret, 'getPluginInternalData', $vmpItableStored, $id, $this->_tablename, $this->tableFields, $primaryKey, $this->_tableId, $this->_loggable);
     //OPCloader::opcDebug($vmpItableStored);
     //OPCloader::opcDebug('is_active:');
     //OPCloader::opcDebug($ret);
     return $ret;
 }