Skip to content
🌟 Instantiate PHP objects without constructors calls
Branch: master
Clone or download
Ocramius Merge pull request #20 from samsonasik/patch-1
add new line at .gitignore for eof
Latest commit 8b7e2eb Apr 12, 2015
Permalink
Type Name Latest commit message Commit time
Failed to load latest commit information.
src/Instantiator Backporting doctrine/instantiator#8 hotfix - uncloneable assets shoul… Oct 4, 2014
tests Adding exception tests and assets Jan 16, 2015
.gitignore add new line at .gitignore for eof Apr 10, 2015
.scrutinizer.yml Sending code coverage reports to scrutinizer-ci Jul 27, 2014
.travis.install.sh Installer should pick up dev autoloader also in 5.3.3 Jun 13, 2014
.travis.yml
CONTRIBUTING.md Changed old reference to `Instantiator` in CONTRIBUTING.md Jun 15, 2014
LICENSE Adding MIT license - fixes #9 Jul 17, 2014
README.md
composer.json
phpmd.xml.dist Using PHPMD 1.* rules class names for compatibility with scrutinizer-ci Jul 27, 2014
phpunit.xml.dist

README.md

Instantiator

This library provides a way of avoiding usage of constructors when instantiating PHP classes.

Deprecated in favour of doctrine/instantiator

This library has been donated to the doctrine organization and has been renamed to doctrine/instantiator. This repository/package is deprecated.

The library will still be maintained, but there won't be any new feature additions, and BC breaks will be refused, as no more future major versions are planned.

Bugs and security issues will still be fixed, and minor-, as well as patch- releases will be tagged if needed.

It is strongly suggested to use doctrine/instantiator instead.

Status

Build Status Code Coverage Scrutinizer Code Quality SensioLabsInsight Dependency Status HHVM Status

Latest Stable Version Latest Unstable Version

Installation

The suggested installation method is via composer:

php composer.phar require ocramius/instantiator:1.1.*

Usage

The instantiator is able to create new instances of any class without using the constructor of the class itself:

$instantiator = new \Instantiator\Instantiator();

$instance = $instantiator->instantiate('My\\ClassName\\Here');

Contributing

Please read the CONTRIBUTING.md contents if you wish to help out!

You can’t perform that action at this time.