Download the PHP package tyler/envase without Composer

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

Envase

Codecov Build License Version Downloads

Very tiny PHP implementation of the PSR-11 Container.

"Envase" is Spanish for Container.

About

Envase container is extremely easy to configure and use. It features a static registry as well as the ability to resolve classes and their dependencies using autowiring. Like a lot of container implementations when you call get it will only resolve the instance the first time and any future call will return the original resolved instance.

Installation

Usage

Basic

Closures

So we can lazy load class instances at the time of first use you can add definitions as Closures that will be invoked the first time get is called.

Note: The next time get is called for 'foo' the resolved instance will be returned

Autowiring

By default (might change later) if you ask the container for an object it will resolve all of the __construct dependencies recursively with the container. IF a constructor argument is a primitive type it will attempt to resolve it by name from the container;

In this case $foo will be an instance of class Foo and will have the properties $bar = instance of Bar and $dirToSomething = '/path/to/somewhere'

Injectable Properties

If a property on a class being resolved by the container has the #[Inject] attribute, the container will use that to set that properties value.

If you set this property form the constructor, Injected properties will override the constructor set

If a key or object can't be resovled the container will throw a NotFoundException

Making objects

IF you need to make a new instance of a class you can call the containers make method. Note, this will only make a new instance of that class, all dependencies will be resolved from the container;


All versions of envase with dependencies

PHP Build Version
Package Version
Requires php Version ^8.1
psr/container Version ^2.0
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 tyler/envase contains the following files

Loading the files please wait ....