Skip to content
This repository was archived by the owner on Feb 17, 2022. It is now read-only.

7.x 2.x autoload

Andy Truong edited this page Jan 29, 2014 · 2 revisions

Autoload — [7.x 2.x]

Support PSR-4 autloading for Drupal 7 modules.

Module that defines dependencies[] = at_base in info file, can autoload the classes:

/path/to/module/lib/Class.php -> \Drupal\module_name\Class
/path/to/module/lib/Controller/PageX.php -> \Drupal\module_name\Controller\PageX

Load your own packages

at_id(new Drupal\at_base\Autoloader('Your\Name\Space', '/path/to/your/package/'))
  ->register();

Clone this wiki locally