本文整理汇总了PHP中VmTable::_cache方法的典型用法代码示例。如果您正苦于以下问题:PHP VmTable::_cache方法的具体用法?PHP VmTable::_cache怎么用?PHP VmTable::_cache使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类VmTable
的用法示例。
在下文中一共展示了VmTable::_cache方法的3个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: getFields
/**
* Get the columns from database table.
*
* adjusted to vm2, We use the same, except that the cache is not a global static,.. we use static belonging to table
* @return mixed An array of the field names, or false if an error occurs.
*
* @since 11.1
*/
public function getFields()
{
if (self::$_cache === null) {
// Lookup the fields for this table only once.
$name = $this->_tbl;
if (JVM_VERSION === 1) {
$fields = $this->getTableColumns($name, false);
} else {
$fields = $this->_db->getTableColumns($name, false);
}
if (empty($fields)) {
$e = new JException(JText::_('JLIB_DATABASE_ERROR_COLUMNS_NOT_FOUND'));
$this->setError($e);
return false;
}
self::$_cache = $fields;
}
return self::$_cache;
}
示例2: emptyCache
public function emptyCache()
{
self::$_cache = array();
}
示例3: getFields
/**
* Get the columns from database table.
*
* adjusted to vm2, We use the same, except that the cache is not a global static,.. we use static belonging to table
* @return mixed An array of the field names, or false if an error occurs.
*
* @since 11.1
*/
public function getFields()
{
if (self::$_cache === null) {
// Lookup the fields for this table only once.
$name = $this->_tbl;
//ALCON Modifica per evitare che esegua 200 volte la richiesta dei campi della tabella media
if (!($name == "#__virtuemart_medias")) {
$fields = $this->_db->getTableColumns($name, false);
//$resultmedia = $result;
//var_dump( $fields);
//break;
}
if (empty($fields)) {
$e = new JException(JText::_('JLIB_DATABASE_ERROR_COLUMNS_NOT_FOUND'));
$this->setError($e);
return false;
}
self::$_cache = $fields;
}
return self::$_cache;
}