Baike.dev
All toolsOnline toolsAI codingTrendingOpen sourceNewsSubmit
Log in
< Back to tools
I

instantiator

> 编程语言
Open source

Doctrine Instantiator This library provides a way of avoiding usage of constructors when instantiating PHP classes. Installation The sugges…

11.0K stars0 likes2 views
WebsiteGitHub

About

Doctrine Instantiator This library provides a way of avoiding usage of constructors when instantiating PHP classes. Installation The sugges…

Doctrine Instantiator

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

Installation

The suggested installation method is via composer:

bash
composer require doctrine/instantiator

Usage

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

php
$instantiator = new \Doctrine\Instantiator\Instantiator();

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

Contributing

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

Credits

This library was migrated from ocramius/instantiator, which has been donated to the doctrine organization, and which is now deprecated in favour of this package.

Issues· 1 open

View all issuesOpen on GitHub
  • #21

    What about to add the capability to set properties with given set of values?

    enhancementUpdated Aug 3, 2015

> Tags

PHP

No comments yet. Be the first to share.

> Details

PublishedAug 1, 2026
UpdatedSep 28, 2026
Category编程语言
PricingOpen source

> Related tools

T
TypeScript
JavaScript 的超集,为前端与全栈提供静态类型
P
Python
通用编程语言,广泛用于 Web、数据与 AI
G
Go
Google 推出的简洁高效系统语言