Skip to content

Instantly share code, notes, and snippets.

@rsanchez
Created May 16, 2014 14:04
Show Gist options
  • Save rsanchez/15f9fc43778c0e8f9c5c to your computer and use it in GitHub Desktop.
Save rsanchez/15f9fc43778c0e8f9c5c to your computer and use it in GitHub Desktop.
Using the EE PSR-4 autoloader
<?php
$plugin_info = array(
'pi_name' => 'My Addon',
'pi_version' => '1.0.0',
'pi_author' => 'Rob Sanchez',
'pi_author_url' => 'https://github.com/rsanchez',
'pi_description'=> '',
'pi_usage' => ''
);
class My_addon
{
public function __construct()
{
global $AUTO;
$AUTO->addPrefix('MyAddon', PATH_THIRD.'my_addon/src/MyAddon/');
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment