ocramius / instantiator
A small, lightweight utility to instantiate objects in PHP without invoking their constructors
Installs: 430 060
Dependents: 2
Suggesters: 0
Security: 0
Stars: 70
Watchers: 9
Forks: 8
Open Issues: 1
Requires
- php: ~5.3
- ocramius/lazy-map: 1.0.*
Requires (Dev)
- ext-pdo: *
- ext-phar: *
- athletic/athletic: ~0.1.8
- phpunit/phpunit: ~4.0
- squizlabs/php_codesniffer: 2.0.*@ALPHA
README
This library provides a way of avoiding usage of constructors when instantiating PHP classes.
Deprecated in favour of doctrine/instantiator
This library has been donated to the doctrine organization and has been renamed to doctrine/instantiator. This repository/package is deprecated.
The library will still be maintained, but there won't be any new feature additions, and BC breaks will be refused, as no more future major versions are planned.
Bugs and security issues will still be fixed, and minor-, as well as patch- releases will be tagged if needed.
It is strongly suggested to use doctrine/instantiator instead.
Status
Installation
The suggested installation method is via composer:
php composer.phar require ocramius/instantiator:1.1.*
Usage
The instantiator is able to create new instances of any class without using the constructor of the class itself:
$instantiator = new \Instantiator\Instantiator(); $instance = $instantiator->instantiate('My\\ClassName\\Here');
Contributing
Please read the CONTRIBUTING.md contents if you wish to help out!