本文整理汇总了PHP中gpPlugin::StackPush方法的典型用法代码示例。如果您正苦于以下问题:PHP gpPlugin::StackPush方法的具体用法?PHP gpPlugin::StackPush怎么用?PHP gpPlugin::StackPush使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类gpPlugin
的用法示例。
在下文中一共展示了gpPlugin::StackPush方法的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: SetDataFolder
/**
* Set global path variables for the current addon
* @param string $addon_key Key used to identify a plugin uniquely in the configuration
*
*/
static function SetDataFolder($addon_key)
{
global $dataDir, $config;
global $addonDataFolder, $addonCodeFolder;
//deprecated
global $addonRelativeCode, $addonRelativeData, $addonPathData, $addonPathCode, $addonFolderName, $addon_current_id, $addon_current_version;
if (!isset($config['addons'][$addon_key])) {
return;
}
gpPlugin::StackPush();
self::$current = self::GetAddonConfig($addon_key);
$addonFolderName = $addon_key;
$addon_current_id = self::$current['id'];
$addon_current_version = self::$current['version'];
$addonPathCode = $addonCodeFolder = self::$current['code_folder_full'];
$addonPathData = $addonDataFolder = self::$current['data_folder_full'];
$addonRelativeCode = self::$current['code_folder_rel'];
$addonRelativeData = self::$current['data_folder_rel'];
}
示例2: SetDataFolder
/**
* Set global path variables for the current addon
* @param string $addon_key Key used to identify a plugin uniquely in the configuration
*
*/
function SetDataFolder($addon_key)
{
global $dataDir, $config;
global $addonDataFolder, $addonCodeFolder;
//deprecated
global $addonRelativeCode, $addonRelativeData, $addonPathData, $addonPathCode, $addonFolderName, $addon_current_id, $addon_current_version;
if (!isset($config['addons'][$addon_key])) {
return;
}
gpPlugin::StackPush();
$data_folder = gpPlugin::GetDataFolder($addon_key);
$addon_current_id = $addon_current_version = false;
if (isset($config['addons'][$addon_key]['id'])) {
$addon_current_id = $config['addons'][$addon_key]['id'];
}
if (isset($config['addons'][$addon_key]['version'])) {
$addon_current_version = $config['addons'][$addon_key]['version'];
}
$addonFolderName = $addon_key;
$addonPathCode = $addonCodeFolder = $dataDir . '/data/_addoncode/' . $addon_key;
$addonPathData = $addonDataFolder = $dataDir . '/data/_addondata/' . $data_folder;
$addonRelativeCode = common::GetDir('/data/_addoncode/' . $addon_key);
$addonRelativeData = common::GetDir('/data/_addondata/' . $data_folder);
}