本文整理匯總了PHP中Autoload::setExt方法的典型用法代碼示例。如果您正苦於以下問題:PHP Autoload::setExt方法的具體用法?PHP Autoload::setExt怎麽用?PHP Autoload::setExt使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在類Autoload
的用法示例。
在下文中一共展示了Autoload::setExt方法的1個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的PHP代碼示例。
示例1: Autoload
*/
/**
* Starts the $_SESSION variable, usable alot at this project as
* flah() messages, user control, etc
*/
session_start();
/**
* The next lines describes minimal stuff required on index of project
* Don't change this block unless you REALLY KNOW what you are doing
*/
require 'definitions.php';
require 'lib' . DS . 'designetecnologia' . DS . 'main' . DS . 'Autoload.php';
use designetecnologia\main\Router;
$autoLoad = new Autoload();
$autoLoad->setPath(ROOT);
$autoLoad->setExt('php');
spl_autoload_register(array($autoLoad, 'loadApp'));
// Load files from app
spl_autoload_register(array($autoLoad, 'loadModules'));
// Load files from app/modules directly
spl_autoload_register(array($autoLoad, 'loadCore'));
// Load files from lib folder
spl_autoload_register(array($autoLoad, 'load'));
// Load files from root folder
/**
* Do not change the next lines
* they are necessary to interpreting routes and render the results of requests
* Instantiating designetecnologia\main\Router for handling URIs
*/
$router = Router::getInstance();
include_once 'routes.php';