Skip to content

Instantly share code, notes, and snippets.

@chartjes
Created November 24, 2011 14:04
Show Gist options
  • Save chartjes/1391422 to your computer and use it in GitHub Desktop.
Save chartjes/1391422 to your computer and use it in GitHub Desktop.
I'm using an autoloader with namespaces...
// Does not work
$container['franchise_mapper'] = function ($c) {
return new IBL\FranchiseMappper($c['db_connection']);
};
$mapper = $container['franchise_mapper'];
generates "PHP Fatal error: Class 'IBL\FranchiseMappper' not found
// Works
$mapper = new IBL\FranchiseMapper($container['db_connection']);
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment