Name | Date | Size | #Lines | LOC | ||
---|---|---|---|---|---|---|
.. | 28-Mar-2019 | - | ||||
docs/en/ | H | 28-Mar-2019 | - | 74 | 49 | |
src/Doctrine/Instantiator/ | H | 28-Mar-2019 | - | 320 | 196 | |
.doctrine-project.json | H A D | 27-Mar-2019 | 544 | 27 | 25 | |
CONTRIBUTING.md | H A D | 27-Mar-2019 | 1 KiB | 36 | 24 | |
LICENSE | H A D | 27-Mar-2019 | 1 KiB | 20 | 16 | |
README.md | H A D | 27-Mar-2019 | 1.8 KiB | 40 | 25 | |
composer.json | H A D | 27-Mar-2019 | 1.4 KiB | 48 | 47 | |
phpbench.json | H A D | 27-Mar-2019 | 101 | 5 | 4 | |
phpcs.xml.dist | H A D | 27-Mar-2019 | 1.6 KiB | 36 | 28 | |
phpstan.neon.dist | H A D | 27-Mar-2019 | 574 | 20 | 16 |
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://scrutinizer-ci.com/g/doctrine/instantiator/badges/coverage.png?b=master)](https://scrutinizer-ci.com/g/doctrine/instantiator/?branch=master) 7[![Scrutinizer Code Quality](https://scrutinizer-ci.com/g/doctrine/instantiator/badges/quality-score.png?b=master)](https://scrutinizer-ci.com/g/doctrine/instantiator/?branch=master) 8[![Dependency Status](https://www.versioneye.com/package/php--doctrine--instantiator/badge.svg)](https://www.versioneye.com/package/php--doctrine--instantiator) 9 10[![Latest Stable Version](https://poser.pugx.org/doctrine/instantiator/v/stable.png)](https://packagist.org/packages/doctrine/instantiator) 11[![Latest Unstable Version](https://poser.pugx.org/doctrine/instantiator/v/unstable.png)](https://packagist.org/packages/doctrine/instantiator) 12 13## Installation 14 15The suggested installation method is via [composer](https://getcomposer.org/): 16 17```sh 18php composer.phar require "doctrine/instantiator:~1.0.3" 19``` 20 21## Usage 22 23The instantiator is able to create new instances of any class without using the constructor or any API of the class 24itself: 25 26```php 27$instantiator = new \Doctrine\Instantiator\Instantiator(); 28 29$instance = $instantiator->instantiate(\My\ClassName\Here::class); 30``` 31 32## Contributing 33 34Please read the [CONTRIBUTING.md](CONTRIBUTING.md) contents if you wish to help out! 35 36## Credits 37 38This library was migrated from [ocramius/instantiator](https://github.com/Ocramius/Instantiator), which 39has been donated to the doctrine organization, and which is now deprecated in favour of this package. 40