summaryrefslogtreecommitdiff
path: root/lib/prado/framework/prado.php
diff options
context:
space:
mode:
authoremkael <emkael@tlen.pl>2016-02-24 23:18:07 +0100
committeremkael <emkael@tlen.pl>2016-02-24 23:18:07 +0100
commit6f7fdef0f500cd4bb540affd3bc1482243f337c1 (patch)
tree4853eecd0769a903e6130c1896e1d070848150dd /lib/prado/framework/prado.php
parent61f2ea48a4e11cb5fb941b3783e19c9e9ef38a45 (diff)
* Prado 3.3.0
Diffstat (limited to 'lib/prado/framework/prado.php')
-rw-r--r--lib/prado/framework/prado.php64
1 files changed, 64 insertions, 0 deletions
diff --git a/lib/prado/framework/prado.php b/lib/prado/framework/prado.php
new file mode 100644
index 0000000..e91b26c
--- /dev/null
+++ b/lib/prado/framework/prado.php
@@ -0,0 +1,64 @@
+<?php
+/**
+ * Prado bootstrap file.
+ *
+ * This file is intended to be included in the entry script of Prado applications.
+ * It defines Prado class by extending PradoBase, a static class providing globally
+ * available functionalities that enable PRADO component model and error handling mechanism.
+ *
+ * By including this file, the PHP error and exception handlers are set as
+ * PRADO handlers, and an __autoload function is provided that automatically
+ * loads a class file if the class is not defined.
+ *
+ * @author Qiang Xue <qiang.xue@gmail.com>
+ * @link https://github.com/pradosoft/prado
+ * @copyright Copyright &copy; 2005-2015 The PRADO Group
+ * @license https://github.com/pradosoft/prado/blob/master/COPYRIGHT
+ * @package System
+ */
+
+/**
+ * Includes the PradoBase class file
+ */
+require_once(dirname(__FILE__).'/PradoBase.php');
+
+/**
+ * Defines Prado class if not defined.
+ */
+if(!class_exists('Prado',false))
+{
+ /**
+ * Prado class.
+ *
+ * @author Qiang Xue <qiang.xue@gmail.com>
+ * @package System
+ * @since 3.0
+ */
+ class Prado extends PradoBase
+ {
+ }
+}
+
+/**
+ * Registers the autoload function.
+ * Since Prado::autoload will report a fatal error if the class file
+ * cannot be found, if you have multiple autoloaders, Prado::autoload
+ * should be registered in the last.
+ */
+spl_autoload_register(array('Prado','autoload'));
+
+/**
+ * Initializes error and exception handlers
+ */
+Prado::initErrorHandlers();
+
+/**
+ * Includes TApplication class file
+ */
+require_once(dirname(__FILE__).'/TApplication.php');
+
+/**
+ * Includes TShellApplication class file
+ */
+require_once(dirname(__FILE__).'/TShellApplication.php');
+