Skip to content

Instantly share code, notes, and snippets.

@odiel
Created July 11, 2013 19:13
Show Gist options
  • Save odiel/5978349 to your computer and use it in GitHub Desktop.
Save odiel/5978349 to your computer and use it in GitHub Desktop.
How to use \Phalcon\Loader to autoload namespace.
<?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