Download the PHP package thecodingmachine/yaco without Composer

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

Scrutinizer Code Quality Build Status Coverage Status

YACO - Yet another compiler

YACO (Yet Another COmpiler) is a PHP tool that generates a PHP container based on entry definitions. It is fully compatible with entry definitions from definition-interop.

Installation

You can install this package through Composer:

The packages adheres to the SemVer specification, and there will be full backward compatibility between minor versions.

Usage

This package contains a Compiler class. The goal of this class is to take a number of "entry definitions" (as defined in definition-interop) and to transform those into a PHP class that implements the ContainerInterface

Now, you can instantiate your container using this code:

Note: Yaco is consuming container definitions (implementing Interop\Container\Definition\DefinitionInterface). Out of the box, Yaco does not provide any classes implementing this interface. However, you can find such classes in a package like mnapoli/assembly.

Here is a complete sample using Yaco and Assembly:

Compile phase:

Usage:

Note: the My\Container class implements the Interop\Container\ContainerInterface. Therefore, it can be used with any framework compatible with container-interop.

Service provider support

This package supports container agnostic service providers as defined in container-interop/service-provider.

To register service providers, you must pass to the compiler a TheCodingMachine\ServiceProvider\Registry object.

Here is a sample:

Important! When you want to use the compiled container, you have to pass a registry containing the same service providers, in the same order.

Below is an instantiation of the container generated by the code above:

Miscellaneous

Delegate lookup support

Containers generated by Yaco support the "delegate lookup" feature of container-interop.

If you pass a container as the second argument to the generated container, all dependency lookups will be done on the passed container rather than on the generated container.

Here is a sample:

Definition providers

You can directly register a definition provider using the register method:

Definition providers are classes implementing the Interop\Container\Definition\DefinitionProviderInterface. They provide a list of container definitions to be compiled by the compiler.


All versions of yaco with dependencies

PHP Build Version
Package Version
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 thecodingmachine/yaco contains the following files

Loading the files please wait ....