Name | Date | Size | #Lines | LOC | ||
---|---|---|---|---|---|---|
.. | 22-Feb-2022 | - | ||||
.github/ | H | 10-Nov-2020 | - | 290 | 232 | |
src/Doctrine/Instantiator/ | H | 10-Nov-2020 | - | 370 | 201 | |
.doctrine-project.json | H A D | 10-Nov-2020 | 900 | 42 | 41 | |
CONTRIBUTING.md | H A D | 10-Nov-2020 | 1 KiB | 36 | 24 | |
LICENSE | H A D | 10-Nov-2020 | 1 KiB | 20 | 16 | |
README.md | H A D | 10-Nov-2020 | 1.6 KiB | 39 | 24 | |
composer.json | H A D | 10-Nov-2020 | 1.4 KiB | 43 | 42 | |
phpbench.json | H A D | 10-Nov-2020 | 101 | 5 | 4 | |
phpcs.xml.dist | H A D | 10-Nov-2020 | 2.1 KiB | 51 | 39 | |
phpstan.neon.dist | H A D | 10-Nov-2020 | 413 | 16 | 13 |
README.md
1# Instantiator 2 3This library provides a way of avoiding usage of constructors when instantiating PHP classes. 4 5[![Build Status](https://travis-ci.org/doctrine/instantiator.svg?branch=master)](https://travis-ci.org/doctrine/instantiator) 6[![Code Coverage](https://codecov.io/gh/doctrine/instantiator/branch/master/graph/badge.svg)](https://codecov.io/gh/doctrine/instantiator/branch/master) 7[![Dependency Status](https://www.versioneye.com/package/php--doctrine--instantiator/badge.svg)](https://www.versioneye.com/package/php--doctrine--instantiator) 8 9[![Latest Stable Version](https://poser.pugx.org/doctrine/instantiator/v/stable.png)](https://packagist.org/packages/doctrine/instantiator) 10[![Latest Unstable Version](https://poser.pugx.org/doctrine/instantiator/v/unstable.png)](https://packagist.org/packages/doctrine/instantiator) 11 12## Installation 13 14The suggested installation method is via [composer](https://getcomposer.org/): 15 16```sh 17php composer.phar require "doctrine/instantiator:~1.0.3" 18``` 19 20## Usage 21 22The instantiator is able to create new instances of any class without using the constructor or any API of the class 23itself: 24 25```php 26$instantiator = new \Doctrine\Instantiator\Instantiator(); 27 28$instance = $instantiator->instantiate(\My\ClassName\Here::class); 29``` 30 31## Contributing 32 33Please read the [CONTRIBUTING.md](CONTRIBUTING.md) contents if you wish to help out! 34 35## Credits 36 37This library was migrated from [ocramius/instantiator](https://github.com/Ocramius/Instantiator), which 38has been donated to the doctrine organization, and which is now deprecated in favour of this package. 39