• Home
  • History
  • Annotate
Name Date Size #Lines LOC

..28-Mar-2019-

docs/en/H28-Mar-2019-7449

src/Doctrine/Instantiator/H28-Mar-2019-320196

.doctrine-project.jsonH A D27-Mar-2019544 2725

CONTRIBUTING.mdH A D27-Mar-20191 KiB3624

LICENSEH A D27-Mar-20191 KiB2016

README.mdH A D27-Mar-20191.8 KiB4025

composer.jsonH A D27-Mar-20191.4 KiB4847

phpbench.jsonH A D27-Mar-2019101 54

phpcs.xml.distH A D27-Mar-20191.6 KiB3628

phpstan.neon.distH A D27-Mar-2019574 2016

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