本文整理汇总了PHP中gpPlugin::Incl方法的典型用法代码示例。如果您正苦于以下问题:PHP gpPlugin::Incl方法的具体用法?PHP gpPlugin::Incl怎么用?PHP gpPlugin::Incl使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类gpPlugin
的用法示例。
在下文中一共展示了gpPlugin::Incl方法的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: defined
<?php
defined('is_running') or die('Not an entry point...');
gpPlugin::Incl('Languages.php');
class MultiLang_Common
{
var $config_file;
var $config;
var $lists = array();
var $titles = array();
var $langs = array();
var $lang;
var $language;
function Init()
{
global $addonPathData, $config, $ml_languages;
$this->config_file = $addonPathData . '/config.php';
$this->lang = $config['language'];
$this->GetData();
}
function GetData()
{
global $ml_languages;
$config = array();
if (file_exists($this->config_file)) {
require $this->config_file;
}
$config += array('titles' => array(), 'lists' => array(), 'langs' => array());
$this->config = $config;
$this->FixConfig();
$this->lists = $this->config['lists'];
示例2: defined
<?php
defined('is_running') or die('Not an entry point...');
gpPlugin::Incl('Common.php');
class MultiLang_Admin extends MultiLang_Common
{
protected $cmds = array();
//executable commands
public function __construct()
{
global $config;
$config += array('menus' => array());
parent::__construct();
$this->AddResources();
$this->cmds['TitleSettingsSave'] = '';
$this->cmds['TitleSettings'] = '';
$this->cmds['RemoveTitle'] = 'TitleSettings';
$this->cmds['NotTranslated'] = '';
$this->cmds['SaveLanguages'] = 'SelectLanguages';
$this->cmds['SelectLanguages'] = '';
$this->cmds['PrimaryLanguage'] = '';
$this->cmds['PrimaryLanguageSave'] = 'DefaultDisplay';
$this->cmds['AllTitles'] = '';
$cmd = common::GetCommand();
$this->RunCommands($cmd);
}
/**
* Run Commands
* See \gp\Base::RunCommands() (available in TS 5.0)
*
*/