Download the PHP package einstein/environmentalist without Composer
On this page you can find all versions of the php package einstein/environmentalist. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.
Download einstein/environmentalist
More information about einstein/environmentalist
Files in einstein/environmentalist
Package environmentalist
Short Description Cleans up your environment by managing include paths, error handlers, and autoloading
License MIT
Homepage https://github.com/einstein/environmentalist
Informations about the package environmentalist
Environmentalist
Cleans up your PHP environment by managing include paths, error handlers, and autoloading
Installation
If you're using composer
simply add the einstein/environmentalist
dependency to your composer.json
file.
Otherwise you can manually install it by cloning the repository somewhere in your php include_path
.
git clone [email protected]:einstein/environmentalist.git`
require 'environmentalist/environmentalist.php';
Usage
Enabling/disabling
Environmentalist::enable()
is called when loaded. If you'd like to disable its behavior, simply call Environmentalist::disable()
.
Autoload extensions
Environmentalist::autoload_extensions()
Environmentalist::append_autoload_extension($extension)
Environmentalist::prepend_autoload_extension($extension)
Environmentalist::set_autoload_extensions($extensions)
Error handlers
Environmentalist::error_handlers()
Environmentalist::append_error_handler($handler)
Environmentalist::prepend_error_handler($handler)
Environmentalist::set_error_handlers($handlers)
Include paths
Environmentalist::include_paths()
Environmentalist::append_include_path($path)
Environmentalist::prepend_include_path($path)
Environmentalist::set_include_paths($paths)
Testing
Environmentalist
tests require jaz303/ztest
Simply download it to environmentalist/test/ztest
(or anywhere else in your PHP include_path
), then run test/run
Todo
- Update README documentation
- Allow other filename naming conventions to be registered
- Standardize the return values of the set_* methods
- Update tests