Skip to content

Instantly share code, notes, and snippets.

@harikt
Created March 27, 2013 00:56
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
Star You must be signed in to star a gist
Save harikt/5250686 to your computer and use it in GitHub Desktop.
Package Autoloader
<?php
namespace Vendor\Package;
class FirstException extends \Exception
{
// some code that does the functionality
}
class SecondException extends \Exception
{
// some code that does the functionality
}
// by default all
$loader->addPackage('Vendor\Package' => 'vendor/package/src');
// Specified files exceptions. mostly not much code for exceptions
$loader->addPackage('Vendor\Package' => 'vendor/package/src/exceptions.php');
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment