Download the PHP package coapsyfactor/objectfactory without Composer

On this page you can find all versions of the php package coapsyfactor/objectfactory. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.

FAQ

After the download, you have to make one include require_once('vendor/autoload.php');. After that you have to import the classes with use statements.

Example:
If you use only one package a project is not needed. But if you use more then one package, without a project it is not possible to import the classes with use statements.

In general, it is recommended to use always a project to download your libraries. In an application normally there is more than one library needed.
Some PHP packages are not free to download and because of that hosted in private repositories. In this case some credentials are needed to access such packages. Please use the auth.json textarea to insert credentials, if a package is coming from a private repository. You can look here for more information.

  • Some hosting areas are not accessible by a terminal or SSH. Then it is not possible to use Composer.
  • To use Composer is sometimes complicated. Especially for beginners.
  • Composer needs much resources. Sometimes they are not available on a simple webspace.
  • If you are using private repositories you don't need to share your credentials. You can set up everything on our site and then you provide a simple download link to your team member.
  • Simplify your Composer build process. Use our own command line tool to download the vendor folder as binary. This makes your build process faster and you don't need to expose your credentials for private repositories.
Please rate this library. Is it a good library?

Informations about the package objectfactory

Object Factory

In this document you can find proper usage of this library.

About

This library is used to easily retrieve instance of certain object without the need to provide all of its dependencies.

Requirements

Overview

This library ensure to provide proper instance of object implementing certain interface, or being certain type of a class. Dependencies are required to be complex type as primitive ones (string, int, float, bool) cannot be exactly auto determined. There are two ways of defining "provider" for certain interface.

Usage

First approach is providing simple map between interface and class itself, to do so we need to call registerInterfaceClass method.

Note: Use this only when providing class has complex typed dependencies, providing class with primitive types will cause exception to be thrown.
Note: Library handle circular dependencies by throwing exception when one is detected.

Another approach is using provider callback- function that is called when instance is requested, to achieve this we need to call registerInterfaceInstanceProvider. This approach is usually useful when object depends on primitive types.

There are two ways to retrieve instance of certain type. One is getInstance which always returns new instance of requested type.

And there is also another way by using getSharedInstance which always return signleton instance of requested model.


All versions of objectfactory with dependencies

PHP Build Version
Package Version
Requires php Version >=7.4
Composer command for our command line client (download client) This client runs in each environment. You don't need a specific PHP version etc. The first 20 API calls are free. Standard composer command

The package coapsyfactor/objectfactory contains the following files

Loading the files please wait ....