README.md (1911B)
1 # Instantiator 2 3 This library provides a way of avoiding usage of constructors when instantiating PHP classes. 4 5 [](https://travis-ci.org/doctrine/instantiator) 6 [](https://scrutinizer-ci.com/g/doctrine/instantiator/?branch=master) 7 [](https://scrutinizer-ci.com/g/doctrine/instantiator/?branch=master) 8 [](https://www.versioneye.com/package/php--doctrine--instantiator) 9 [](http://hhvm.h4cc.de/package/doctrine/instantiator) 10 11 [](https://packagist.org/packages/doctrine/instantiator) 12 [](https://packagist.org/packages/doctrine/instantiator) 13 14 ## Installation 15 16 The suggested installation method is via [composer](https://getcomposer.org/): 17 18 ```sh 19 php composer.phar require "doctrine/instantiator:~1.0.3" 20 ``` 21 22 ## Usage 23 24 The instantiator is able to create new instances of any class without using the constructor or any API of the class 25 itself: 26 27 ```php 28 $instantiator = new \Doctrine\Instantiator\Instantiator(); 29 30 $instance = $instantiator->instantiate('My\\ClassName\\Here'); 31 ``` 32 33 ## Contributing 34 35 Please read the [CONTRIBUTING.md](CONTRIBUTING.md) contents if you wish to help out! 36 37 ## Credits 38 39 This library was migrated from [ocramius/instantiator](https://github.com/Ocramius/Instantiator), which 40 has been donated to the doctrine organization, and which is now deprecated in favour of this package.