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


PHP Conf::getInstance方法代码示例

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


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

示例1: setConexion

 private function setConexion()
 {
     $conf = Conf::getInstance();
     $this->db_host = $conf->getHostDB();
     $this->db_name = $conf->getNameDB();
     $this->db_user = $conf->getUserDB();
     $this->db_pass = $conf->getPassDB();
 }
开发者ID:aarocr,项目名称:gf-scouting,代码行数:8,代码来源:Db.class.php

示例2: setConexion

 private function setConexion()
 {
     $conf = Conf::getInstance();
     $this->servidor = $conf->getHostDB();
     $this->base_datos = $conf->getDB();
     $this->usuario = $conf->getUserDB();
     $this->password = $conf->getPassDB();
 }
开发者ID:sindysuarez,项目名称:VentaPHP,代码行数:8,代码来源:conf.php

示例3: cached_curl_exec

function cached_curl_exec($ch)
{
    if (Conf::getInstance("main")->get("cache", "on") == "yes") {
        $id = "" . $ch->options[CURLOPT_URL];
        $contents = Cache::get($id);
        if ($contents == null) {
            $contents = curl_exec($ch);
            Cache::set($id, $contents);
        }
        return $contents;
    } else {
        return curl_exec($ch);
    }
}
开发者ID:pier22,项目名称:Band-Page-FB,代码行数:14,代码来源:facebook.php

示例4: init

 /**
  * Initialize the application
  */
 public function init()
 {
     // Load the application configuration
     $this->singleton('conf', Conf::getInstance());
     // Load the application error Handler
     $this->singleton('errorHandler', ErrorHandler::getInstance());
     // Load the application logger
     $this->singleton('logger', Logger::getInstance());
     // Load the filesystem library
     $this->singleton('fs', FileSystem::getInstance());
     // Load the application session
     $this->singleton('session', Session::getInstance());
     // Load the application router
     $this->singleton('router', Router::getInstance());
     // Load the application HTTP request
     $this->singleton('request', Request::getInstance());
     // Load the application HTTP response
     $this->singleton('response', Response::getInstance());
     // Load the application cache
     $this->singleton('cache', Cache::getInstance());
 }
开发者ID:elvyrra,项目名称:hawk,代码行数:24,代码来源:App.php

示例5: setConexion

 private function setConexion($db_name)
 {
     $conf = Conf::getInstance();
     $this->hostname = $conf->getHostDB();
     $this->user = $conf->getUserDB();
     $this->password = $conf->getPassDB();
     $this->dbname = $db_name;
 }
开发者ID:jhbsz,项目名称:ossimTest,代码行数:8,代码来源:mysqldiff.php

示例6:

<?
global $mainConf;
$pageId = Conf::getInstance("accounts")->get("facebook", "pageId")
?>
开发者ID:pier22,项目名称:Band-Page-FB,代码行数:4,代码来源:facebook_box.php

示例7: chdir

<?
chdir("..");
require_once 'library/conf.php';
require_once 'library/text2image.php';
$conf = Conf::getInstance("private");
text2image(16, $conf->get("contact", "fax"));
?>

开发者ID:pier22,项目名称:Band-Page-FB,代码行数:7,代码来源:fax.php

示例8: foreach

<?
require_once 'code/audio.php';
$config= "";
foreach(Conf::getInstance("main")->get("music_player_options") as $name=>$value)
	$config.= "<parameter name=\"$name\" value=\"$value\"/>";
?>

开发者ID:pier22,项目名称:Band-Page-FB,代码行数:6,代码来源:musicPlayer.php

示例9: Facebook

<?
require 'facebook/facebook.php';
require_once 'library/conf.php';
$conf = Conf::getInstance("main");
$accounts = Conf::getInstance("accounts");
Query::$facebook = new Facebook(array(
			'appId'  => $accounts->get("facebook", "appId"),
			'secret' => $accounts->get("facebook", "secret"),
			'cookie' => true, // enable optional cookie support
			));
Query::$pageId = $accounts->get("facebook", "pageId");
class Query
{
static $facebook;
static $pageId;
static function getObject($address="", $base=null)
{
	$page = Query::$pageId;
	if($base == null) $base = "$page/";
	$uri = "/$base$address";
	return Query::$facebook->api($uri);
}
static function getEventsIds()
{
	$feedItems = Query::getObject("feed");
	$result = array();
	foreach($feedItems["data"] as $item)
	{
		$pattern = "event.php?eid=";
		$link = $item["link"];
		$pos = strpos($link, $pattern);
开发者ID:pier22,项目名称:Band-Page-FB,代码行数:31,代码来源:query.php

示例10:

                                </label>
                            </td>
                            <td>
                                <input  type="text" name="buscarCentroCosto" id="buscarCentroCosto" value="" autocomplete="on" onfocus="llenarConsultaLista('CentroCosto',document.getElementById('buscarCentroCosto'));" onclick="xajax_llenarCentroCosto(document.getElementById('filtroCentroCosto').innerHTML, document.getElementById('buscarCentroCosto').value.replace('*','%').replace('*','%'), '','', 1)"/>
                            </td>
                        </tr>
                        <tr>
                            <td>
                                &nbsp;
                            </td>
                        </tr>
                        
                        <?php 
require_once '../clases/db.class.php';
require_once '../clases/conf.class.php';
$conf = Conf::getInstance();
$sql = "select TABLE_NAME, TABLE_ROWS from INFORMATION_SCHEMA.TABLES \n                                where TABLE_NAME = 'Conectividad' and TABLE_SCHEMA= '" . $conf->getDB() . "' ";
//echo $sql;
/*Ejecutamos la query*/
$bd = Db::getInstance();
$query = $bd->ConsultarVista($sql);
if ($query[0]['TABLE_ROWS'] > 0) {
    ?>
                        <tr>
                            <td>
                                <label>Bases de Datos</label>
                            </td>
                            <td>
                                <input type="text" id="buscarConectividad" name="buscarConectividad" value="" style="width: 250px;" autocomplete="off" onfocus="llenarConsultaLista('Conectividad',document.getElementById('buscarConectividad'));" onclick="xajax_llenarConectividad(document.getElementById('filtroConectividad').innerHTML, document.getElementById('buscarConectividad').value.replace('*','%').replace('*','%'), '',1)">
                            </td>
                        </tr>
开发者ID:edu2576,项目名称:prueba,代码行数:31,代码来源:informecomercial.filtro.php

示例11: foreach

<?
require_once 'library/conf.php';
$menuItems="";
foreach(Conf::getInstance("main")->get("menu_names") as $id=>$name)
	$menuItems .= "<item id=\"$id\">$name</item>";
?>
开发者ID:pier22,项目名称:Band-Page-FB,代码行数:6,代码来源:top.php


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