Skip to content
Snippets Groups Projects
Commit 5c24df45 authored by Sean Madsen's avatar Sean Madsen
Browse files

Add example of PSR-4 autoloading within extensions

parent 7aa9556d
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