本文整理汇总了PHP中config::getConfig方法的典型用法代码示例。如果您正苦于以下问题:PHP config::getConfig方法的具体用法?PHP config::getConfig怎么用?PHP config::getConfig使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类config
的用法示例。
在下文中一共展示了config::getConfig方法的5个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: __construct
public function __construct()
{
// parent::__construct();
config::getInstance();
config::getConfig();
$router = new Router();
$router->explodeUri();
/*
apenas para checagem dos caminhos
//echo '<p>ROUT FILE: '.$routFile.'</p>';
echo '<pre >';
echo '<p>ROTA COMPLETA: '.$this->getRoute().'</p>';
echo '<p>NOME Controller: '.$this->getController().'</p>';
echo '<p>NOME METODO: '.$this->getAction().'</p>';
echo '</pre>';
*/
define('ROUTE', $router->getRoute());
define('CONTROLLER', $router->getController());
define('ACTION', $router->getAction());
$filename = BASEPATH . DIRECTORY_SEPARATOR . APPPATH . DIRECTORY_SEPARATOR . CONTROLLERS . DIRECTORY_SEPARATOR . ROUTE . CONTROLLER . '.controller.php';
if (file_exists($filename)) {
require_once $filename;
$_controllerName = CONTROLLER;
$_controller = new $_controllerName();
$action = ACTION;
if (method_exists($_controller, $action)) {
$_controller->{$action}();
} else {
require_once BASEPATH . DIRECTORY_SEPARATOR . APPPATH . DIRECTORY_SEPARATOR . CONTROLLERS . DIRECTORY_SEPARATOR . 'error404.controller.php';
$errorController = new error404();
$errorController->index();
}
} else {
require_once BASEPATH . DIRECTORY_SEPARATOR . APPPATH . DIRECTORY_SEPARATOR . CONTROLLERS . DIRECTORY_SEPARATOR . 'error404.controller.php';
$errorController = new error404();
$errorController->index();
}
}
示例2: getConfig
/**
* Return connection settings.
*
* @return config
*/
public function getConfig()
{
$this->config = config::getConfig();
$this->config = $this->config['connections'];
return $this;
}
示例3: alipayapi
public function alipayapi()
{
vendor('alipay.config');
$this->alipay_config = config::getConfig();
}
示例4: getSubscribersEmail
function getSubscribersEmail($cnx, $table_config, $email, $from, $from_name, $list_id = '')
{
$cnx->query("SET NAMES UTF8");
$conf = new config();
$conf->getConfig($db_host, $db_login, $db_pass, $db_name, $table_config);
$db = new Db();
$db->DbConnect($db_host, $db_login, $db_pass, $db_name);
$sql = "SELECT DISTINCT email FROM {$conf->table_email} ";
if (!empty($list_id)) {
$sql .= "WHERE list_id='{$list_id}'";
}
$cnx->SqlRow($sql);
if ($db->DbError()) {
echo $db->DbError();
return -1;
}
$body = "adresse email des abonnés:\n";
$body .= "-------------------------\n";
while ($a = $db->DbNextRow()) {
$body .= $a[0] . "\n";
}
return sendEmail($conf->sending_method, $email, $from, $from_name, "Liste des adresses", $body, $conf->smtp_auth, $conf->smtp_host = '', $conf->smtp_login = '', $conf->smtp_pass);
}
示例5: notify_url
public function notify_url()
{
vendor('alipay.config');
$this->alipay_config = config::getConfig();
}