本文整理汇总了PHP中Engine::__construct方法的典型用法代码示例。如果您正苦于以下问题:PHP Engine::__construct方法的具体用法?PHP Engine::__construct怎么用?PHP Engine::__construct使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类Engine
的用法示例。
在下文中一共展示了Engine::__construct方法的7个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: __construct
/**
* Construct the Interpreter object
* @param array $options Optional array of name/value options
*/
public function __construct(array $options = NULL)
{
$this->environment = new Environment();
if (is_null($options)) {
$options = $this->environment->getOptions();
}
$this->colourer = new ShellColour();
parent::__construct($options);
}
示例2:
function __construct($action, $code)
{
parent::__construct("error");
if ($this->valid()) {
$this->_main_template = "error/index.tpl";
$this->_error_code = $code;
$this->_template = $code . ".tpl";
}
}
示例3: Convert
function __construct(&$extr, $params)
{
parent::__construct($extr, $params['name'], Engine::getCmd($params['cmd']) . ' --vanilla --quiet', new Convert('pdf', 'png'), $params['forbidden'], isset($params['category']) ? 'R' : $params['category']);
$pre = $this->dir('@.R');
file_exists($pre) || copy($extr->R_EXT . '@.R', $pre);
$output = shell_exec(Engine::getCmd($params['cmd']) . ' --version');
$pos = strpos($output, "\n");
$this->desc = substr($output, 0, $pos);
$this->lang = 'rsplus';
}
示例4: Convert
function __construct(&$extr, $params)
{
//($name, $cmd, $banfile, $category=null) {
parent::__construct($extr, $params['name'], Engine::getCmd($params['cmd']) . ' -qfH --no-window-system', new Convert('pdf', 'png', '-trim'), $params['forbidden'], isset($params['category']) ? 'M' : $params['category']);
$pre = $this->dir('@.m');
file_exists($pre) || copy($this->extr->R_EXT . '@.m', $pre);
$output = shell_exec(Engine::getCmd($params['cmd']) . ' --version');
$pos = strpos($output, "\n");
$this->desc = substr($output, 0, $pos);
$this->lang = 'matlab';
}
示例5: array
function __construct($action)
{
$this->_supported = array('admin', 'adm-sitecfg', 'adm-usercfg', 'adm-users', 'adm-edit-user', 'adm-edit-perms', 'adm-groups', 'adm-edit-group', 'adm-group-members', 'adm-galcfg', 'adm-categories', 'adm-edit-category', 'adm-photos');
parent::__construct($action);
if (!$this->valid()) {
return;
}
if (!$this->session()->checkPerm("admin-panel")) {
$this->_valid = false;
$this->_status_code = 403;
}
if (!$this->valid()) {
return;
}
$this->_main_template = "admin/index.tpl";
$this->setTemplateVar("admin_panel", 1);
$this->setTemplateVar("sub", Utils::pg("sub", ""));
$this->_action_fn = str_replace("_adm_", "_", $this->_action_fn);
$this->_template = str_replace("adm-", "", $this->_template);
$this->addCSS(Utils::fullURL("css/admin/admin.css"));
}
示例6: __construct
public function __construct()
{
parent::__construct();
$this->type = "SmallEngine";
}
示例7: array
function __construct($action)
{
$this->_supported = array("start", "login", "register", "logout", "activate", "upload-form");
parent::__construct($action);
$this->addCSS('css/screen.css');
}