Download the PHP package mattferris/application without Composer

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

Application

Build Status

A PHP application bootstrapping framework.

The framework is built on the concept of components. Each component is responsible for configuring itself, registering services, subscribing to events, etc. This means you just add the components you want to your application and run it! The only thing that is required to configure an application is a dependency injection container that implements MattFerris\Di\ContainerInterface (which in turn extends Interop\Container\ContainerInterface)

A simple HTTP application might look something like:

The HttpRoutingComponent has a static method called run() that provides some additional bootstrapping to start the request handling process. You could also supply your own callable to $app->run() if you wanted.

Components

A component might be anything from an individual function to an entire library. In Application terms, a project (i.e. the code) only becomes a component when the projects's configuration and initialization are wrapped into a neat package, represented as an class implementing MattFerris\Component\ComponentInterface. Typically, this component class would live in the top-most namespace of your project.

For simplicity, your component class can just extend MattFerris\Application\Component.

When extending MattFerris\Application\Component you get a component that will automatically load providers from within the same namespace. So given the above component, you can just create providers that live within the My\Project namespace.

This EventsProvider will now be automatically loaded at application boot.

Providers

A components only real job is to plug providers into the framework. Providers are where the heavy-lifting happens, and are responsible for registering services with service containers, registering event listeners with event dispatchers, supplying routing information to HTTP request dispatchers, etc. A provider must implement MattFerris\Provider\ProviderInterface which requires a single method be present called provides().

Be default, there are no provider types. Components must register provider types during initialization.

DiComponent registers a Services provider type. You could now defined a ServicesProvider in order to register services.

ServicesProvider::provides() is always passed an instance of the configured service container. Likewise, EventsProviders will be passed an instance of the event dispatcher, and so on.

Provider Types

So far, we've talked about global provider types. Global provider types can be registered by components in two way. For components extending MattFerris\Application\Components, it's as easy as defining the $provides property in the component's class definition.

The consumer is the type of instance that will be passed to a providers provides() method. In this case, it will be an instance of My\Project\MyProjectConsumer. Because scope is set to global, the component will automatically register the provider.

For standalone components (those not extending MattFerris\Application\Component), registration of provider types is done by having the component class implement MattFerris\Provider\ProviderInterface, and using provides() to manually register the types.

For components extending MattFerris\Application\Component, you can also define local providers for use within the scope of the component. This gives you some flexibility in isolating intialization of your component as required.

Advanced Component Initialization

In some cases, components may have dependencies on each other. It's possible to defined different intialization passes so that components can be initialized in such a way that these dependencies can be satisfied.

By simply passing an array of arrays, you can break down component intializtion into as many passes as is required to successfully bootstrap your application.


All versions of application with dependencies

PHP Build Version
Package Version
Requires mattferris/di Version ^1.0
mattferris/events Version ~0.4
mattferris/provider Version ~0.3
mattferris/component Version ^1.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 mattferris/application contains the following files

Loading the files please wait ....