Download the PHP package monomelodies/disclosure without Composer

On this page you can find all versions of the php package monomelodies/disclosure. 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 disclosure

Disclosure

PHP5 dependency injection and service locator framework. Most existing DI or Inversion of Control (IoC) solutions depend on extensive configuration files to define dependencies. This sucks; Disclosure is better and simpler (we think).

As of version 2.0, Disclosure is fully compatible with the (upcoming) PSR recommendation for Container objects. A copy of the as-yet unrealeased PSR\Container interface is included in the package (until they finally realease it...).

Installation

Composer (recommended)

Manual installation

  1. Get or clonse the code;
  2. Register /path/to/disclosure/src for the namespace Disclosure\\ in your PSR-4 autoloader;
  3. Register /path/to/disclosure/psr for the namespace Psr\\Container\\ in your PSR-4 autoloader

Usage

Add your dependencies to a Container object somewhere. It often makes sense to do this in a central file (e.g. src/dependencies.php), but it's also perfectly fine to do it alongside your class definitions.

The container will now assosiate the foo key with an object of instance Foo. The naming of the key is irrelevant; just remember that they must be unique.

Tell your classes what they should depend on using the inject method supplied by the Injector trait:

inject accepts a random number of arguments, where each argument is their a string with a depedency name, or a callable with dependency names as arguments. Which style you use is up to your own preference.

Whoah! Why not simply do $this->foo = new MyDependency;?

There's plenty of reasons for using a Container instead of the new keyword all over the place, but the main ones are:

No, in the above example it doesn't add much, but see the complete documentation for real-world, practical examples of why dependency injection is generally a good idea.


All versions of disclosure with dependencies

PHP Build Version
Package Version
Requires php Version >=5.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 monomelodies/disclosure contains the following files

Loading the files please wait ....