コード例 #1
0
ファイル: fm.php プロジェクト: nemis/Fm
 /**
  * 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
0
ファイル: index.php プロジェクト: xy113/XiangBaLaoServer
<?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
0
ファイル: index.php プロジェクト: amitchouhan004/barchat
        $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
0
ファイル: fromwact.php プロジェクト: TheProjecter/skeleton
    }
}
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
0
 public function start()
 {
     parent::start();
     ob_start();
 }
コード例 #6
0
<?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");