Recommend this page to a friend! |
![]() ![]() |
Info | ![]() |
![]() ![]() |
Reputation | Support forum (1) | Blog | Links |
Last Updated | Ratings | Unique User Downloads | Download Rankings | |||||
2012-06-12 (4 years ago) ![]() | Not enough user ratings | Total: 332 | All time: 6,759 This week: 1,123![]() |
Version | License | PHP version | Categories | |||
galaxy-loader 1.1 | MIT/X Consortium ... | 5.3 | PHP 5, Language |
Description | Author | |
This class can register class loaders based on file path rules. |
Galaxy Loader v0.3 ================ This package contains loaders classes and interfaces and abstractions, which will help you implement your own loader class. There are two built-in loaders: gfLoader ------- * Registering library directories * Registering class files extensions * Creates full path changing namespace into relative file path * Manual finding and laoding clsses * Saving and loading classes maps gfLoaderExtended -------------- * Extends gfLoader, so has all it's features, excluding way it finds classes * Registering namespaces and it's paths * Creates full path checking available namespace paths Example ------ <?php require_once 'lib/gf/Loader/Exception.php'; require_once 'lib/gf/Loader/gfLoaderInterface.php'; require_once 'lib/gf/Loader/gfLoaderManualInterface.php'; require_once 'lib/gf/Loader/gfLoaderMappableInterface.php'; require_once 'lib/gf/Loader/gfLoaderAbstraction.php'; require_once 'lib/gf/Loader/gfLoader.php'; use \gf\Loader\gfLoader; use \gf\Loader\gfLoaderExtended; $Loader = new gfLoader(); $Loader->registerDirectory('lib') ->registerExtension('php') ->register(); $Extended = new gfLoaderExtended(); $Extended->registerDirectory('lib') ->registerExtension('php') ->registerNamespace('gf\\Loader', 'gf/Loader/') ->register(); In this example you can see all of the basic functionalities of _Galaxy Loader_. For more, look at comments in code. Loaders are stacked in SPL autoload handlers stack, so when you are registering a new loader, the old one is not unregistered. To unregister loader use: $Loader->unregister(); More information about every class and developing your own implementations comming soon. |
![]() |
/ | lib | / | gf | / | Loader |
File | Role | Description |
---|---|---|
![]() |
Class | Exception class for Galaxy Loader |
![]() |
Class | Default loader class |
![]() |
Class | Loader class abstraction |
![]() |
Class | Extended default loader class |
![]() |
Class | Loader class interface |
![]() |
Class | Manual loading interface |
![]() |
Class | Class mapping interface |
Version Control | Unique User Downloads | Download Rankings | |||||||||||||||
100% |
|
|
Applications that use this package |
If you know an application of this package, send a message to the author to add a link here.
Related pages |
GitHub repository Galaxy Loader at GitHub |