From 5230f8f8a86fc1ae5d90f8c74ae65c93e197502b Mon Sep 17 00:00:00 2001 From: Fabio Bas Date: Thu, 22 Jan 2015 09:14:12 +0100 Subject: Apply namespaces to class inheritances (pt1) --- framework/prado.php | 26 ++++---------------------- 1 file changed, 4 insertions(+), 22 deletions(-) (limited to 'framework/prado.php') diff --git a/framework/prado.php b/framework/prado.php index a9298756..e619c398 100644 --- a/framework/prado.php +++ b/framework/prado.php @@ -19,10 +19,7 @@ namespace Prado; -/** - * Includes the PradoBase class file - */ -require_once(dirname(__FILE__).'/PradoBase.php'); +require_once __DIR__ . '/../vendor/autoload.php'; /** * Defines Prado class if not defined. @@ -41,26 +38,11 @@ if(!class_exists('Prado',false)) } } -/** - * 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'); - +class_alias('\Prado\TApplication', 'TApplication', true); +class_alias('\Prado\Web\Services\TPageService', 'TPageService', true); +class_alias('\Prado\Web\UI\TPage', 'TPage', true); -- cgit v1.2.3