当前位置: 首页>>代码示例>>PHP>>正文


PHP Manager::getConf方法代码示例

本文整理汇总了PHP中Manager::getConf方法的典型用法代码示例。如果您正苦于以下问题:PHP Manager::getConf方法的具体用法?PHP Manager::getConf怎么用?PHP Manager::getConf使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在Manager的用法示例。


在下文中一共展示了Manager::getConf方法的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。

示例1: getMailer

 /**
  * 
  * @param stdClass $params
  * @return \PHPMailer
  */
 public static function getMailer($params = null)
 {
     $mailer = new \PHPMailer();
     $mailer->IsSMTP();
     // telling the class to use SMTP
     $mailer->Host = \Manager::getConf('mailer.smtpServer');
     // SMTP server
     $mailer->From = \Manager::getConf('mailer.smtpFrom');
     $mailer->FromName = \Manager::getConf('mailer.smtpFromName');
     $mailer->CharSet = 'utf-8';
     $mailer->WordWrap = 100;
     // Caso não esteja no servidor de produção ou não exista destinatário,
     // o destinatário passa a ser o email configurado no conf
     if (!\Manager::PROD() || !self::hasReceivers($params)) {
         $params->to = $params->cc = $params->bcc = \Manager::getConf('mailer.smtpTo');
     }
     // Preenche os parametros do mailer. Ver atributos publicos da classe PHPMailer
     self::copyPublicAttributes($params, $mailer);
     $mailer->isHTML($params->isHTML);
     self::__AddAddress($params->to, $mailer);
     self::__AddCC($params->cc, $mailer);
     self::__AddBCC($params->bcc, $mailer);
     self::__AddReplyTo($params->ReplyTo, $mailer);
     return $mailer;
 }
开发者ID:joshuacoddingyou,项目名称:php,代码行数:30,代码来源:mmailer.php

示例2: init

 public function init()
 {
     parent::init();
     $this->idLanguage = Manager::getConf('options.language');
     $msgDir = Manager::getAppPath('conf/report');
     Manager::$msg->file = 'messages.' . $this->idLanguage . '.php';
     Manager::$msg->addMessages($msgDir);
 }
开发者ID:elymatos,项目名称:expressive_fnbr,代码行数:8,代码来源:MessageController.php

示例3: init

 public function init()
 {
     Manager::checkLogin(false);
     $this->idLanguage = Manager::getConf('fnbr20.lang');
     $msgDir = Manager::getAppPath('conf/report');
     Manager::$msg->file = 'messages.' . $this->idLanguage . '.php';
     Manager::$msg->addMessages($msgDir);
 }
开发者ID:elymatos,项目名称:expressive_fnbr,代码行数:8,代码来源:_FrameController.php

示例4: formEmail

 public function formEmail()
 {
     if (\Manager::getConf('mailer.smtpFrom')) {
         $this->data->desricaoConfFrom = '(' . \Manager::getConf('mailer.smtpFrom') . ')';
     }
     if (\Manager::getConf('mailer.smtpTo')) {
         $this->data->desricaoConfTo = '(' . \Manager::getConf('mailer.smtpTo') . ')';
     }
     $this->render();
 }
开发者ID:joshuacoddingyou,项目名称:php,代码行数:10,代码来源:diversosController.php

示例5: onCreate

 public function onCreate()
 {
     parent::onCreate();
     $this->formBox = new MBox();
     /* as MFormAction */
     $this->property->inline = Manager::getConf('ui.inlineFormAction') || $this->property->inline;
     /* as MFormBase */
     $this->actions = array();
     $this->menuAdded = false;
     $this->setRender('form');
 }
开发者ID:joshuacoddingyou,项目名称:php,代码行数:11,代码来源:mform.php

示例6: traceDump

 /**
  * Brief Description.
  * Complete Description.
  *
  * @returns (tipo) desc
  *
  */
 public function traceDump($msg, $file = '', $line = 0)
 {
     $message = $msg;
     if ($file != '') {
         $message .= " [file: {$file}] [line: {$line}]";
     }
     $this->trace[] = $message;
     $tag = Manager::getConf('logs')['tag'];
     if (strlen($tag) > 0) {
         $this->log->logMessage('[' . $tag . ']' . $message);
     } else {
         $this->log->logMessage('[CUSTOM]' . $message);
     }
 }
开发者ID:joshuacoddingyou,项目名称:php,代码行数:21,代码来源:mtrace.php

示例7: load

 public function load()
 {
     $report = 'repExemploCSV.jrxml';
     $logo = Manager::getPublicPath('exemplos', '', 'images/logo.png');
     $parametros['logo'] = $logo;
     //str_replace("/", "\\", $logo);
     $parametros['instituicao'] = Manager::getConf('instituicao');
     $parametros['param1'] = $this->data->param1;
     $parametros['param2'] = $this->data->param2;
     $parametros['param3'] = $this->data->param3;
     $parametros['param4'] = $this->data->param4;
     $url = $this->executeCSV($this->data->result, $report, $parametros);
     $this->page->window($url);
 }
开发者ID:joshuacoddingyou,项目名称:php,代码行数:14,代码来源:repExemploCSV.php

示例8: getMailer

 /**
  * 
  * @param stdClass $params
  * @return \PHPMailer
  */
 public static function getMailer($params = null)
 {
     $mailer = new \PHPMailer();
     $mailer->IsSMTP();
     // telling the class to use SMTP
     $mailer->Host = \Manager::getConf('maestro.mailer.smtpServer');
     // SMTP server
     $mailer->From = $params->from ?: \Manager::getConf('maestro.mailer.smtpFrom');
     $mailer->FromName = $params->fromName ?: \Manager::getConf('maestro.mailer.smtpFromName');
     $mailer->Subject = $params->subject;
     $mailer->Body = $params->body;
     $mailer->CharSet = 'utf-8';
     $mailer->WordWrap = $params->wordWrap ?: 100;
     $auth = \Manager::getConf('maestro.mailer.smtpAuth');
     if ($auth) {
         $mailer->SMTPAuth = true;
         // Usa autenticação SMTP
         $mailer->SMTP_PORT = \Manager::getConf('maestro.mailer.smtpPort');
         // Porta do servidor SMTP
         $mailer->Username = \Manager::getConf('maestro.mailer.smtpFrom');
         // Usuário do servidor SMTP
         $mailer->Password = \Manager::getConf('maestro.mailer.smtpPass');
         // Senha do servidor SMTP
     }
     // Caso não exista destinatário,
     // o destinatário passa a ser o email configurado no conf
     if (!self::hasReceivers($params)) {
         $params->to = $params->cc = $params->bcc = \Manager::getConf('maestro.mailer.smtpTo');
     }
     // Preenche os parametros do mailer. Ver atributos publicos da classe PHPMailer
     self::copyPublicAttributes($params, $mailer);
     $mailer->isHTML($params->isHTML);
     // Preenche os destinatários
     $to = self::emailListToArray($params->to);
     $cc = self::emailListToArray($params->cc);
     $bcc = self::emailListToArray($params->bcc);
     foreach ($to as $address) {
         $mailer->AddAddress($address);
     }
     foreach ($cc as $address) {
         $mailer->AddCC($address);
     }
     foreach ($bcc as $address) {
         $mailer->AddBCC($address);
     }
     return $mailer;
 }
开发者ID:elymatos,项目名称:expressive,代码行数:52,代码来源:MMailer.php

示例9: connect

 /**
  * Tenta se conectar à base Ldap de acordo com os dados em conf.php
  * @return boolean
  */
 private function connect()
 {
     $this->host = \Manager::getConf('maestro.login.ldap.host');
     $this->port = \Manager::getConf('maestro.login.ldap.port');
     $this->user = \Manager::getConf('maestro.login.ldap.user');
     $this->pass = \Manager::getConf('maestro.login.ldap.password');
     $this->base = \Manager::getConf('maestro.login.ldap.base');
     $this->conn = ldap_connect($this->host, $this->port);
     ldap_set_option($this->conn, LDAP_OPT_PROTOCOL_VERSION, 3);
     $r = ldap_bind($this->conn, $this->user, $this->pass);
     if (!$r) {
         $this->printLdapError('Error on ldap connection!');
         exit;
     }
     mtrace('Abrindo conexao ao LDAP!');
     return true;
 }
开发者ID:elymatos,项目名称:expressive,代码行数:21,代码来源:MLdap.php

示例10: preProcess

 public function preProcess()
 {
     $frontController = $this->frontController;
     // exemplo de alteração da configuração dependendo do controller sendo executado
     $context = $frontController->getContext();
     $controller = $context->getController();
     if ($controller == 'controls') {
         Manager::setConf('session.check', false);
     }
     // é necessário validar a sessão?
     if (Manager::getConf('login.check') || Manager::getConf('session.check')) {
         $timeout = Manager::getSession()->checkTimeout(Manager::getConf('session.exception'));
     }
     if ($timeout) {
         $frontController->canCallHandler(false);
         $url = Manager::getURL(Manager::getApp() . '/main');
         $frontController->setResult(new MRedirect(NULL, $url));
     }
 }
开发者ID:joshuacoddingyou,项目名称:php,代码行数:19,代码来源:sessionFilter.php

示例11: checkTimeout

 public function checkTimeout($exception = false)
 {
     $timeout = Manager::getConf('maestro.session.timeout');
     // If 0, we are not controling session
     if ($timeout != 0) {
         $timestamp = time();
         $difftime = $timestamp - $this->default->timestamp;
         $this->timeout = $difftime > $timeout * 60;
         $this->default->timestamp = $timestamp;
         if ($this->timeout) {
             $this->destroy();
             if ($exception) {
                 throw new ETimeOutException();
             } else {
                 return true;
             }
         }
     }
     return false;
 }
开发者ID:elymatos,项目名称:expressive,代码行数:20,代码来源:MSession.php

示例12: checkAccess

 public function checkAccess($transaction, $access, $deny = false)
 {
     //mdump($transaction);
     //mdump('--------------------');
     //mdump($access);
     $module = Manager::getModule();
     $ok = false;
     if (!is_numeric($access)) {
         $access = $this->access[$access];
     }
     if ($this->auth->isLogged()) {
         $login = $this->auth->getLogin();
         // MLogin object
         $transaction = strtoupper($transaction);
         // Transaction name
         $isAdmin = $login->isAdmin();
         // Is administrator?
         $rights = (int) $login->getRights($transaction);
         // user rights
         $rightsInAll = (int) $login->getRights('ALL');
         // user rights in all transactions
         $ok = ($rights & $access) == $access || ($rightsInAll & $access) == $access || $isAdmin;
         if (!$ok && $deny) {
             $msg = _M('Acesso Negado') . "<br><br>\n" . "<center><big><i><font color=red>" . _M('Transação: ') . "{$transaction}</font></i></big></center><br><br>\n" . _M('Informe um login válido para acessar esta página.') . "<br>";
             //$go = Manager::getCurrentURL();
             //$error = MPrompt::error($msg, $go, $caption, '');
             //Manager::prompt($error, $deny);
             throw new ESecurityException($msg);
         }
     } else {
         if ($deny) {
             $currentUrl = urlencode(Manager::getCurrentURL());
             $module = Manager::getConf('login.module');
             $url = Manager::getURL("{$module}/main.login", array('return_to' => $currentUrl));
             Manager::getPage()->redirect($url);
         }
     }
     return $ok;
 }
开发者ID:joshuacoddingyou,项目名称:php,代码行数:39,代码来源:mperms.php

示例13: __construct

 public function __construct($name = 'default')
 {
     try {
         $this->name = trim($name);
         $this->config = \Manager::getConf("maestro.db.{$name}");
         $platform = self::$_platformMap[$this->config['driver']];
         $this->platform = new $platform($this);
         $this->config['platform'] = $this->platform;
         $driver = self::$_driverClass[$this->config['driver']];
         if ($driver != '') {
             $this->config['driverClass'] = $driver;
             unset($this->config['driver']);
         }
         $this->connection = $this->newConnection();
         $this->params = $this->connection->getParams();
         $this->platform->connect();
         $ormLogger = $this->config['ormLoggerClass'];
         if ($ormLogger) {
             $this->ormLogger = new $ormLogger();
         }
     } catch (\Exception $e) {
         throw new EDBException('Erro na conexão com o banco de dados.');
     }
 }
开发者ID:elymatos,项目名称:expressive,代码行数:24,代码来源:MDatabase.php

示例14: ORMMap

 public static function ORMMap()
 {
     return array('class' => \get_called_class(), 'database' => \Manager::getConf('fnbr20.db'), 'table' => 'auth_access', 'attributes' => array('idAccess' => array('column' => 'idAccess', 'key' => 'primary', 'idgenerator' => 'identity', 'type' => 'integer'), 'rights' => array('column' => 'rights', 'type' => 'integer'), 'idGroup' => array('column' => 'idGroup', 'type' => 'integer'), 'idTransaction' => array('column' => 'idTransaction', 'type' => 'integer')), 'associations' => array('group' => array('toClass' => 'auth\\models\\Group', 'cardinality' => 'oneToOne', 'keys' => 'idGroup:idGroup'), 'transaction' => array('toClass' => 'auth\\models\\Transaction', 'cardinality' => 'oneToOne', 'keys' => 'idTransaction:idTransaction')));
 }
开发者ID:elymatos,项目名称:expressive_fnbr,代码行数:4,代码来源:AccessMap.php

示例15: ORMMap

 public static function ORMMap()
 {
     return array('class' => \get_called_class(), 'database' => \Manager::getConf('fnbr20.db'), 'table' => 'auth_person', 'attributes' => array('idPerson' => array('column' => 'idPerson', 'key' => 'primary', 'idgenerator' => 'identity', 'type' => 'integer'), 'name' => array('column' => 'name', 'type' => 'string'), 'email' => array('column' => 'email', 'type' => 'string'), 'nick' => array('column' => 'nick', 'type' => 'string')), 'associations' => array('users' => array('toClass' => 'auth\\models\\User', 'cardinality' => 'oneToMany', 'keys' => 'idPerson:idPerson')));
 }
开发者ID:elymatos,项目名称:expressive_fnbr,代码行数:4,代码来源:PersonMap.php


注:本文中的Manager::getConf方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。