本文整理汇总了PHP中Application::start方法的典型用法代码示例。如果您正苦于以下问题:PHP Application::start方法的具体用法?PHP Application::start怎么用?PHP Application::start使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类Application
的用法示例。
在下文中一共展示了Application::start方法的6个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: startApplication
/**
* Starting up aplication object
*
* @param string $name aplication name - aplication folder
*
*/
public static function startApplication($name = 'application')
{
$application = new Application($name);
// initialize database
if (isset($application->config['db'])) {
$application->db = new Db();
$application->db->connect($application->config['db']['user'], $application->config['db']['host'], $application->config['db']['pass'], $application->config['db']['db']);
}
self::$applicationName = $name;
spl_autoload_register(array($application, 'autoLoader'));
$application->start();
}
示例2: dirname
<?php
//error_reporting(E_ALL);
error_reporting(E_ALL & ~E_NOTICE);
define('DEBUG', true);
define('IN_DSXCMS', true);
define('ROOT_PATH', dirname(__FILE__) . '/');
define('DEFAULT_MODEL', 'post');
require ROOT_PATH . '/Library/class.Application.php';
$application = new Application();
$application->start();
示例3: glob
$glob = glob(MICROSITE_PATH . '/microsite/controllers/*.php');
$fnames = array_map(create_function('$a', 'return strtolower(basename($a, ".php") . "controller.php");'), $glob);
$files = array_merge($files, array_combine($fnames, $glob));
}
// Search in the available files for the undefined class file.
if (isset($files[$class_file])) {
require $files[$class_file];
// If the class has a static method named __static(), execute it now, on initial load.
if (class_exists($class_name, false) && method_exists($class_name, '__static')) {
call_user_func(array($class_name, '__static'));
}
$success = true;
}
if (!$success) {
var_dump($class_name);
var_dump($files);
debug_print_backtrace();
}
}
spl_autoload_register('__autoload');
/*
include 'classes/application.php';
include 'classes/view.php';
include 'classes/auth.php';
include 'classes/simple_html_dom.php';
include 'classes/dice.php';
include 'classes/utils.php';
include 'classes/plugin.php';
*/
Application::start();
示例4: AppView
}
}
class AppView extends View
{
function AppView($templateFile)
{
parent::View($templateFile);
}
function prepareModel(&$source, &$request, &$responseModel)
{
$responseModel->set('title', 'Application Controller');
$responseModel->set('page_header', 'Demonstration of new WACT Controller Architecture');
}
}
$app = new Application();
$app->start();
?>
The script block below automagically performs the linking of the textbox(ac1), the Ajax request and the response container(ac1update). When the value of the textbox changes, the onchange event will be triggered and the Prototype framework will compose a complete POST request to ‘/samples/controllers/application.php/search’. ‘application.php/search’ will direct the request to the CommandController named ‘search’ that’s been registered as the child of the root PathInfoDispatchController.
<script type="text/javascript" language="javascript">
// <![CDATA[
new Ajax.Autocompleter('ac1','ac1update','/samples/controllers/application.php/search');
// ]]>
</script>
The results array will be populated in results.html
<list:list from="results">
<ul>
<list:item>
<li>{$name}</li>
示例5: start
public function start()
{
parent::start();
ob_start();
}
示例6: error_reporting
<?php
/* bootstrap */
/* Error Reporting: */
error_reporting(E_ALL & ~E_NOTICE);
define("BASE_PATH", dirname(realpath(__FILE__)) . "\\");
define("APP_PATH", BASE_PATH . "application\\");
require_once APP_PATH . "config.php";
define("PATH", $_CONFIG['path']);
require_once APP_PATH . "registry.php";
require_once APP_PATH . "classloader.php";
// adding class directorys
ClassLoader::setClassPaths($__CLASSPATHS);
// binding ClassLoader
spl_autoload_register(array('ClassLoader', 'autoload'));
// linking settings to registry
Registry::$settings['config'] =& $__CONFIG;
Registry::$settings['classpaths'] =& $__CLASSPATHS;
Registry::$settings['database'] =& $__DATABASE;
ErrorReporter::logPageRequest();
session_start();
//starting main Application
$app = Application::start();
//include(APP_PATH . "view/phtml/default_view.phtml");