/** * 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); }
function __construct($action, $code) { parent::__construct("error"); if ($this->valid()) { $this->_main_template = "error/index.tpl"; $this->_error_code = $code; $this->_template = $code . ".tpl"; } }
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'; }
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'; }
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")); }
public function __construct() { parent::__construct(); $this->type = "SmallEngine"; }
function __construct($action) { $this->_supported = array("start", "login", "register", "logout", "activate", "upload-form"); parent::__construct($action); $this->addCSS('css/screen.css'); }