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