本文整理汇总了PHP中Site::instance方法的典型用法代码示例。如果您正苦于以下问题:PHP Site::instance方法的具体用法?PHP Site::instance怎么用?PHP Site::instance使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类Site
的用法示例。
在下文中一共展示了Site::instance方法的9个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: init
/**
* Initializing site
*
* @return Site
*/
public static function init()
{
if (!isset(self::$instance)) {
self::$instance = new Site();
}
return self::$instance;
}
示例2: gI
public static function gI()
{
if (self::$instance === null) {
self::$instance = new self();
}
return self::$instance;
}
示例3: getInstance
/**
* Create and return this class.
*/
public static function getInstance()
{
if (!self::$instance) {
self::$instance = new self();
}
return self::$instance;
}
示例4: _query
function _query($qry)
{
if (Site::instance()->debug()) {
echo 'Requete MySql : ' . htmlentities($qry);
}
return @mysql_query($qry, $this->dblink);
}
示例5: setInstance
private static function setInstance(Site $object)
{
self::$instance = $object;
$objectCache = ObjectCache::getInstance();
$objectCache->setEncryptedObject("EducaskSiteObject", $object, true);
}
示例6: htmlentities
if (is_string($erreur)) {
$body = htmlentities($erreur);
}
}
$footer = '</fieldset><p>Si cette erreur persiste, contactez un administrateur.<br /><br />@SimpleFramework, tous droits réservés.</p>';
die($header . $body . $footer);
}
}
///Anti MagicQuotes
if (get_magic_quotes_gpc()) {
foreach ($_GET as $k => $v) {
$_GET[$k] = stripslashes($v);
}
foreach ($_POST as $k => $v) {
$_POST[$k] = stripslashes($v);
}
}
require REP_RACINE . 'Config/Config.class.php';
_includeSite(REP_RACINE);
try {
Site::instance()->load(REP_RACINE);
} catch (Exception $e) {
$erreurHandler = null;
if (class_exists('FatalErrorRender')) {
$erreurHandler = new FatalErrorRender($e);
} else {
$erreurHandler = new FatalErrorRenderBasic($e);
}
}
Site::instance()->timeMgr->markTime('Fin du fichier init.php');
示例7: htmlentities
<?php
include 'init.php';
include 'changes.php';
$pr = Site::instance()->getNewRender();
$pr->useCache('index', 100);
if ($pr->afficherSiCache()) {
} else {
$pr->setVar('changelog', $changelog);
$pr->setVar('templateHtml', htmlentities(file_get_contents('Templates/default/index_example.tpl')));
$pr->afficher('index');
}
示例8: setExecTime
function setExecTime()
{
$this->setVar('generateTime', Site::instance()->getExecTime());
}
示例9: racine
function racine()
{
return Site::instance()->repRacine;
}