-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
1 changed file
with
3 additions
and
31 deletions.
There are no files selected for viewing
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,33 +1,5 @@ | ||
Namespace Autoload for Drupal 7.x | ||
======================== | ||
Drupal module which adds support for autoloading namespaced classes. | ||
|
||
Requirements | ||
-------------------------------- | ||
|
||
* Drupal 7.x | ||
* PHP 5.3.2 or higher | ||
|
||
Setup / Initial Installation | ||
-------------------------------- | ||
|
||
Install it as a normal Drupal module. This means downloading (or git clone'ing) it to site/all/modules and enabling it on "admin/modules/list". | ||
|
||
If you're using voiture (http://voiture.hoppinger.com) just add "nsautoload" to cnf/shared/modules.php | ||
|
||
# Namespace Autoload for Drupal 7.x | ||
|
||
Usage | ||
-------------------------------- | ||
|
||
In order for the autoloading to work one of the following conventions should be followed: | ||
|
||
* `Foo\Bar` to `foo/class/bar.class.inc` | ||
|
||
Name of namespace should be the same as the name of the module it's used in (not case sensitive) | ||
|
||
Classes should be put in <module>/class/<classname>.class.inc (all lower case). | ||
|
||
* `FooBar\Crux\Class` to `foo_bar/FooBar/Crux/Class.php` (PSR-0) | ||
|
||
The module's name is determined by converting CamelCase to camel_case | ||
Drupal module which adds support for autoloading namespaced classes. | ||
|
||
[![Build Status](https://secure.travis-ci.org/korstiaan/nsautoload.png?branch=refactoring)](http://travis-ci.org/korstiaan/nsautoload) |