PHPackages                             sorciulus/simple-factory - PHPackages - PHPackages  [Skip to content](#main-content)[PHPackages](/)[Directory](/)[Categories](/categories)[Trending](/trending)[Leaderboard](/leaderboard)[Changelog](/changelog)[Analyze](/analyze)[Collections](/collections)[Log in](/login)[Sign up](/register)

1. [Directory](/)
2. /
3. [Utility &amp; Helpers](/categories/utility)
4. /
5. sorciulus/simple-factory

ActiveLibrary[Utility &amp; Helpers](/categories/utility)

sorciulus/simple-factory
========================

This library generate object from class name

2.1.8(6y ago)04.9k↓54.4%MITPHP

Since May 1Pushed 6y ago1 watchersCompare

[ Source](https://github.com/sorciulus/simpleFactory)[ Packagist](https://packagist.org/packages/sorciulus/simple-factory)[ RSS](/packages/sorciulus-simple-factory/feed)WikiDiscussions master Synced 2d ago

READMEChangelog (10)Dependencies (1)Versions (15)Used By (0)

Simple Factory
==============

[](#simple-factory)

[![Packagist](https://camo.githubusercontent.com/db8380888e7ec3f606d0c8068ec73eeeee31e3d19e268735989ef80e79830f4e/68747470733a2f2f696d672e736869656c64732e696f2f62616467652f7061636b61676973742d322e312e382d6c69676874677265792e737667)](https://packagist.org/packages/sorciulus/simpleFactory) [![Scrutinizer Code Quality](https://camo.githubusercontent.com/222bf8fc6ad46f9e0ced7067e2cad3a5dd383b559c7fb8927d813a508062831d/68747470733a2f2f7363727574696e697a65722d63692e636f6d2f672f736f726369756c75732f73696d706c65466163746f72792f6261646765732f7175616c6974792d73636f72652e706e673f623d6d6173746572)](https://scrutinizer-ci.com/g/sorciulus/simpleFactory/?branch=master) [![Code Intelligence Status](https://camo.githubusercontent.com/3f11696fc1582f52500facdb08ca86b690fb8a0bf02cd879ffb5e327c6ba9d77/68747470733a2f2f7363727574696e697a65722d63692e636f6d2f672f736f726369756c75732f73696d706c65466163746f72792f6261646765732f636f64652d696e74656c6c6967656e63652e7376673f623d6d6173746572)](https://scrutinizer-ci.com/code-intelligence) [![Maintainability](https://camo.githubusercontent.com/f60b56bcbd503d304b81f54b7093ec84cb8cc7751dccbdc0d4aaa0b4bea9825c/68747470733a2f2f6170692e636f6465636c696d6174652e636f6d2f76312f6261646765732f36353333333635363530613632353563373865352f6d61696e7461696e6162696c697479)](https://codeclimate.com/github/sorciulus/simpleFactory/maintainability) [![Software License](https://camo.githubusercontent.com/55c0218c8f8009f06ad4ddae837ddd05301481fcf0dff8e0ed9dadda8780713e/68747470733a2f2f696d672e736869656c64732e696f2f62616467652f6c6963656e73652d4d49542d627269676874677265656e2e7376673f7374796c653d666c61742d737175617265)](LICENSE) [![Build Status](https://camo.githubusercontent.com/8cce728089534c7734845015acb75734c0a9c5f8ec3853ef5b1472c3f54ebc3e/68747470733a2f2f7363727574696e697a65722d63692e636f6d2f672f736f726369756c75732f73696d706c65466163746f72792f6261646765732f6275696c642e706e673f623d6d6173746572)](https://scrutinizer-ci.com/g/sorciulus/simpleFactory/build-status/master)

This library has been designed to make it easy to generate value objects. You can set the parameters of the object without knowing in what order it is passed to the constructor. This library will be useful if you have so many parameters to pass to the constructor. By default all parameter will be set to null. If parameter is class (dependency injection) this library will attempt to create an empty object and pass it as a parameter.

Installation
------------

[](#installation)

Via [Composer](http://getcomposer.org/):

```
composer require sorciulus/simple-factory

```

Usage
-----

[](#usage)

```
