PHPackages                             ulrack/object-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. ulrack/object-factory

Abandoned → [grizz-it/object-factory](/?search=grizz-it%2Fobject-factory)ArchivedLibrary[Utility &amp; Helpers](/categories/utility)

ulrack/object-factory
=====================

An object factory for PHP applications.

1.0.5(6y ago)190MITPHPPHP ^7.2

Since Nov 17Pushed 6y ago1 watchersCompare

[ Source](https://github.com/ulrack/object-factory)[ Packagist](https://packagist.org/packages/ulrack/object-factory)[ RSS](/packages/ulrack-object-factory/feed)WikiDiscussions master Synced today

READMEChangelog (6)Dependencies (3)Versions (7)Used By (0)

DEPRECATION NOTICE: this package has been moved and improved at [grizz-it/object-factory](https://github.com/grizz-it/object-factory)
=====================================================================================================================================

[](#deprecation-notice-this-package-has-been-moved-and-improved-at-grizz-itobject-factory)

[![Build Status](https://camo.githubusercontent.com/54f0caea672fe32fa9c46a1452bbef5cbeef800ff5013a455fe9fb9bfc902242/68747470733a2f2f7472617669732d63692e636f6d2f756c7261636b2f6f626a6563742d666163746f72792e7376673f6272616e63683d6d6173746572)](https://travis-ci.com/ulrack/object-factory)

Ulrack Object Factory
=====================

[](#ulrack-object-factory)

The Object Factory package contains an implementation for creating objects, based on configuration.

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

[](#installation)

To install the package run the following command:

```
composer require ulrack/object-factory

```

Usage
-----

[](#usage)

The package provides a [Analyser](src/Component/Analyser/ClassAnalyser.php)class, which retrieves an instantiation signature of a class. This analyser is used by the [ObjectFactory](src/Factory/ObjectFactory.php) to determine the order of the provided parameter from the configuration. The analyser expects an implementation of the StorageInterface from the `ulrack/storage` package. This implementation can be used to store previous analyses and retrieve them at a later point (caching mechanisms e.g.).

Creating an ObjectFactory can simply be done with the following snippet:

```
