> For the complete documentation index, see [llms.txt](https://playground.e107sk.com/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://playground.e107sk.com/plugin-dev-quick-notes/how-to/auto-class-loading.md).

# Auto class loading

* create subfolder *includes*  in plugin abc
* create there file with name xy
* create there class with name plugin\_abc\_xy&#x20;
* use  `new plugin_abc_xy();`

See the example in the download plugin.&#x20;

It works thanks to this in e107\_class.php :

```
$tmp = explode('_', $className);
// Handler check
$tmp[0] .= '/includes'; //folder 'includes' is not part of the class name
$filename = e_PLUGIN.implode('/', $tmp).'.php';
```

{% hint style="danger" %}
This is a reason why the plugin name shouldn't have underscores used! Autoload is not working then.
{% endhint %}
