| 1 |
lars |
1 |
<?php
|
|
|
2 |
/**
|
|
|
3 |
* Prado bootstrap file.
|
|
|
4 |
*
|
|
|
5 |
* This file is intended to be included in the entry script of Prado applications.
|
|
|
6 |
* It defines Prado class by extending PradoBase, a static class providing globally
|
|
|
7 |
* available functionalities that enable PRADO component model and error handling mechanism.
|
|
|
8 |
*
|
|
|
9 |
* By including this file, the PHP error and exception handlers are set as
|
|
|
10 |
* PRADO handlers, and an __autoload function is provided that automatically
|
|
|
11 |
* loads a class file if the class is not defined.
|
|
|
12 |
*
|
|
|
13 |
* @author Qiang Xue <qiang.xue@gmail.com>
|
|
|
14 |
* @link http://www.pradosoft.com/
|
|
|
15 |
* @copyright Copyright © 2005-2008 PradoSoft
|
|
|
16 |
* @license http://www.pradosoft.com/license/
|
|
|
17 |
* @version $Id: prado.php 2541 2008-10-21 15:05:13Z qiang.xue $
|
|
|
18 |
* @package System
|
|
|
19 |
*/
|
|
|
20 |
|
|
|
21 |
/**
|
|
|
22 |
* Includes the PradoBase class file
|
|
|
23 |
*/
|
|
|
24 |
require_once(dirname(__FILE__).'/PradoBase.php');
|
|
|
25 |
|
|
|
26 |
/**
|
|
|
27 |
* Defines Prado class if not defined.
|
|
|
28 |
*/
|
|
|
29 |
if(!class_exists('Prado',false))
|
|
|
30 |
{
|
|
|
31 |
class Prado extends PradoBase
|
|
|
32 |
{
|
|
|
33 |
}
|
|
|
34 |
}
|
|
|
35 |
|
|
|
36 |
/**
|
|
|
37 |
* Registers the autoload function.
|
|
|
38 |
* Since Prado::autoload will report a fatal error if the class file
|
|
|
39 |
* cannot be found, if you have multiple autoloaders, Prado::autoload
|
|
|
40 |
* should be registered in the last.
|
|
|
41 |
*/
|
|
|
42 |
spl_autoload_register(array('Prado','autoload'));
|
|
|
43 |
|
|
|
44 |
/**
|
|
|
45 |
* Initializes error and exception handlers
|
|
|
46 |
*/
|
|
|
47 |
Prado::initErrorHandlers();
|
|
|
48 |
|
|
|
49 |
/**
|
|
|
50 |
* Includes TApplication class file
|
|
|
51 |
*/
|
|
|
52 |
require_once(dirname(__FILE__).'/TApplication.php');
|
|
|
53 |
|
|
|
54 |
/**
|
|
|
55 |
* Includes TShellApplication class file
|
|
|
56 |
*/
|
|
|
57 |
require_once(dirname(__FILE__).'/TShellApplication.php');
|
|
|
58 |
|