Skip to content

Instantly share code, notes, and snippets.

@mavitm
Last active August 5, 2016 13:36
Show Gist options
  • Save mavitm/c13f0468dac3e11e44359a69f7e3555c to your computer and use it in GitHub Desktop.
Save mavitm/c13f0468dac3e11e44359a69f7e3555c to your computer and use it in GitHub Desktop.
<?php
$composer = require ("vendor/autoload.php");
$composerModuleDir = __DIR__.'/vendor/composer/../../modules';
$myPsr4 = [
'services\\models\\' => $composerModuleDir.'/services/models',
'services\\controller\\' => $composerModuleDir.'/services/controller',
];
foreach ($myPsr4 as $namespace => $path) {
$composer->setPsr4($namespace, $path);
}
use services\models\Emaildata;
$eModel = new Emaildata();
print_r($eModel); //yes
?>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment