Created
July 11, 2013 19:13
-
-
Save odiel/5978349 to your computer and use it in GitHub Desktop.
How to use \Phalcon\Loader to autoload namespace.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
define('ROOT_PATH', __DIR__.'/../'); | |
define('APP_PATH', ROOT_PATH.'app/'); | |
// Registering an auto-loader | |
$loader = new \Phalcon\Loader(); | |
$loader->registerNamespaces( | |
array( | |
'Controllers' => APP_PATH.'Controllers/', | |
) | |
); | |
$loader->register(); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment