本文整理汇总了PHP中Manager::getModulePath方法的典型用法代码示例。如果您正苦于以下问题:PHP Manager::getModulePath方法的具体用法?PHP Manager::getModulePath怎么用?PHP Manager::getModulePath使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类Manager
的用法示例。
在下文中一共展示了Manager::getModulePath方法的4个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: __construct
public function __construct($module, $item, $value, $defaults = null)
{
$this->value = $value;
$this->module = $module;
$this->item = $item;
$this->defaults = $defaults;
parent::__construct($module);
if (file_exists(Manager::getModulePath($module, 'db/lookup.class')) && Manager::uses('/db/lookup.class', $module) || Manager::uses('/classes/lookup.class', $module)) {
eval("\$object = new Business{$module}Lookup();");
eval("\$info = \$object->autoComplete{$item}(\$this,\$defaults);");
parent::__construct($this->module);
if ($info) {
$this->result = $info;
} else {
//faz consulta
$sql = new Msql('');
$sql->createFrom($this->sql);
$sql->prepare($value);
$db = Manager::getDatabase($this->module);
//$this->sql = MSql::prepare($this->sql,$value);
//$result = $this->_db->query($value ? $sql->command : str_replace('?','NULL',$this->sql));
$result = $db->query($value ? $sql->command : str_replace('?', 'NULL', $this->sql));
$this->result = $result[0];
}
}
}
示例2: executeJRXML
function executeJRXML($fileInput, $parameters = null, $fileType = 'PDF', $save = false)
{
$this->fileType = isset($fileType) ? strtoupper(trim($fileType)) : 'PDF';
$id = uniqid(md5(uniqid("")));
// generate a unique id to avoid name conflicts
$this->fileOutput = $id . "." . strtolower($this->fileType);
// the report generated file
$pathOut = Manager::getFilesPath($this->fileOutput, true);
$pathIn = $this->getInputPath($fileInput);
$javaPath = Manager::getConf("home.java");
$MJasperPath = Manager::home . '/' . Manager::getConf("home.extensions") . "/jasper";
$scriptletsPath = Manager::getModulePath($module, 'reports/scriptlets.jar');
// scriptlets allow to create custom functions for use at report
$classPath = "\"{$MJasperPath}/lib/*;{$MJasperPath}/build/classes;{$scriptletsPath};{$javaPath}/lib\"";
return $this->fill($pathIn, $pathOut, $fileType, $parameters, $classPath, $save);
}
示例3: invokeHandler
public function invokeHandler($m, $handler)
{
global $context, $module, $action, $item, $session, $page, $auth, $perms, $navbar, $theme, $history, $self, $url;
if ($handler == '') {
return false;
}
//$this->data = $data;
$this->action = $handler;
$app = Manager::getApp();
if ($m == '' || $m == $app) {
$module = $app;
$path = Manager::getAppPath() . '/controllers/';
} else {
$module = $m;
$path = Manager::getModulePath($module, 'controllers/');
}
//mdump("Handler:invokeHandler: [$module][$handler]");
$context = Manager::getContext();
$action = $context->getAction();
$self = $context->getAction();
$item = mrequest('item');
$session = Manager::getSession();
$navbar = new MNavigationBar();
//$view = Manager::getView($module, 'handler', $action);
$page = $this->theme;
$url = Manager::getCurrentURL();
$auth = Manager::getAuth();
$perms = Manager::getPerms();
$theme = $this->theme;
$file = $path . $handler . '.inc.php';
//mdump('Handler:invokeHandler: file : ' . $file);
if ($return = file_exists($file)) {
include $file;
}
return $return;
}
示例4: addModuleMessages
public function addModuleMessages($module)
{
$msgDir = Manager::getModulePath($module, 'conf/');
Manager::$msg->addMessages($msgDir);
}