本文整理汇总了PHP中Application::initialize方法的典型用法代码示例。如果您正苦于以下问题:PHP Application::initialize方法的具体用法?PHP Application::initialize怎么用?PHP Application::initialize使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类Application
的用法示例。
在下文中一共展示了Application::initialize方法的7个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1:
<?php
require_once __DIR__ . "/application/index.php";
Application::initialize("text/html");
require_once __DIR__ . "/language/ru/index.php";
?>
<!DOCTYPE html>
<html>
<head>
<meta charset="UTF-8" />
<meta http-equiv="content-type" content="text/html; charset=UTF-8" />
<link rel="icon" href="favicon.ico" type="image/x-icon" />
<link rel="shortcut icon" href="favicon.ico" type="image/x-icon" />
<title><?php
echo LANG_TITLE;
?>
</title>
<link rel="stylesheet" type="text/css" href="application/default.css" />
<link rel="stylesheet" type="text/css" href="application/style.css" />
<script type="text/javascript" language="JavaScript" src="http://code.jquery.com/jquery-1.11.3.min.js"></script>
<script type="text/javascript" language="JavaScript" src="http://code.jquery.com/jquery-migrate-1.2.1.min.js"></script>
<script type="text/javascript" language="JavaScript" src="application/script.js"></script>
<script type="text/javascript" language="JavaScript">
this.lang =
{
feed:
{
update: '<?php
echo LANG_FEED_UPDATE;
?>
',
示例2:
<?php
require_once __DIR__ . "/application/index.php";
Application::initialize("application/json");
switch ($_GET["method"]) {
case "observer.initialize":
print Application::api_observer_initialize();
break;
case "observer.reset":
print Application::api_observer_reset();
break;
case "observer.url":
print Application::api_observer_url((string) $_GET["url"]);
break;
case "feed.updateAll":
print Application::api_feed_updateAll();
break;
case "feed.clear":
print Application::api_feed_clear();
break;
case "feed.update":
print Application::api_feed_update((int) $_GET["id"]);
break;
case "feed.delete":
print Application::api_feed_delete((int) $_GET["id"]);
break;
case "feed.load":
print Application::api_feed_load((int) $_GET["feed"], (int) $_GET["story"]);
break;
case "preview.updateAll":
print Application::api_preview_updateAll();
示例3: importexport
$app->output .= "Domain export ediliyor: {$domainname}";
exportDomain($domainname);
$app->output .= "<pre>{$dosyacikti}</pre>";
}
function importexport()
{
global $app, $domainname, $dosyacikti, $impexp;
$app->output .= __FUNCTION__ . " basliyor.. <br>";
$app->getVariable(array("domainname", 'impexp'));
$domainname = $app->chooseDomain(__FUNCTION__, $domainname);
$app->requireMyDomain($domainname);
if ($impexp == '') {
$app->output .= "<a href='?impexp=import'>import</a><br><a href='?impexp=export'>export</a><br>";
} elseif ($impexp == 'import') {
import();
} elseif ($impexp == 'export') {
export();
}
}
$app = new Application();
$app->cerceve = "standartcerceve";
$app->usertable = "domainusers";
$app->userfields = array("id", "domainname", "username", "email", "quota");
$app->op = $op;
if ($op == 'login' or $op == 'logout') {
$app->run();
} else {
$app->initialize();
importexport();
$app->show();
}
示例4:
<?php
require_once __DIR__ . "/application/index.php";
Application::initialize("text/plain", false);
print Application::install();
Application::finalize();
示例5: array
/**************************************************
* APPLICATION
**************************************************/
/**************************************************
* @package application
* @version 2.01 $Revision: 617 $
* @build 924
**************************************************/
/**************************************************
* @author: Roman Matthias Keil
* @copyright: Roman Matthias Keil
**************************************************/
Application::$classpath = $_SERVER['DOCUMENT_ROOT'] . '/_app';
Application::$cache = $_SERVER['DOCUMENT_ROOT'] . '/_cache/packages.cache.php';
Application::initialize();
class Application
{
public static $classpath = '';
public static $cache = '';
private static $include = array();
/**
*
*/
static function initialize()
{
if (file_exists(Application::$cache)) {
Application::$include = Application::read();
} else {
Application::$include = Application::scan(Application::$classpath);
Application::write(Application::$include);
示例6: getApplicationModel
public function getApplicationModel()
{
$model = new Application();
return $model->initialize($this->getParameters());
}
示例7: dirname
<?php
/*
Load the Keret framework
This assumes that the framework is installed into 'vendor/keret'.
If it is not, adjust this path accordingly.
*/
require dirname(__FILE__) . "/vendor/keret/framework/boot.php";
/*
Initialize and run the application
We pass the path of the 'app' folder to 'initialize' so that the
framework knows where the application files are located.
Once initialized, this path can be retrieved using Application::root().
*/
Application::initialize(dirname(__FILE__) . "/app");
Application::run();