Skip to content
Snippets Groups Projects
Commit b3ba3b98 authored by Seamus Lee's avatar Seamus Lee Committed by GitHub
Browse files

Merge pull request #331 from seanmadsen/psr4

Add example of PSR-4 autoloading within extensions
parents 7aa9556d 5c24df45
No related branches found
No related tags found
No related merge requests found
......@@ -84,6 +84,14 @@ Elements acceptable within `<classloader>`
| -- | -- |
| [`<psr4>`](#psr4) | 1+ |
For example, if you want to write PHP classes in the `Civi` namespace and autoload those classes within your extension, you'll need to use the following XML:
```xml
<classloader>
<psr4 prefix="Civi\" path="Civi"/>
</classloader>
```
### `<comments>` {:#comments}
* Containing element: [`<extension>`](#extension)
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment