Download the PHP package ellipse/dispatcher-controller without Composer

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

Controller resolver

This package provides a factory decorator for objects implementing Ellipse\DispatcherFactoryInterface from ellipse/dispatcher package. It allows to produce instances of Ellipse\Dispatcher using controller definitions.

Require php >= 7.0

Installation composer require ellipse/dispatcher-controller

Run tests ./vendor/bin/kahlan

Create a dispatcher factory resolving controller definitions

This package provides an Ellipse\Dispatcher\ControllerResolver class implementing Ellipse\DispatcherFactoryInterface which allows to decorate any other object implementing this interface.

It takes a container implementing Psr\Container\ContainerInterface as first parameter and the factory to decorate as second parameter.

Once decorated, the resulting dispatcher factory can be used to produce instances of Ellipse\Dispatcher by resolving ellipse/handlers-controller package.

Controller definitions

An instance of ControllerRequestHandler needs the container entry id of an object used as controller, a method name and an optional array of request attribute names. A controller definition defines which controller class, method name and request attributes should be used by the ControllerRequestHandler. It is an array with at least two string elements:

For example [SomeController::class, '@index'] and [SomeController::class, '@show', ['some_id']] are valid controller definitions. The first one execute the SomeController class ->index() method and the second one execute its ->show($id) method using the value of the request attribute named 'some_id' as parameter.

This array notation was prefered over a string like 'SomeController@index' so there is no need to deal with controller namespaces. Also the method name start with a '@' because [SomeController::class, 'index'] is considered as a callable by php, even when the index method is not static!

ControllerRequestHandler logic is described on the ellipse/handlers-controller documentation page.


All versions of dispatcher-controller with dependencies

PHP Build Version
Package Version
Requires php Version >=7.0
psr/container Version ^1.0
psr/http-message Version ^1.0
psr/http-server-handler Version ^1.0
psr/http-server-middleware Version ^1.0
ellipse/dispatcher Version ^1.6
ellipse/handlers-controller Version ^1.0
ellipse/container-overridden Version ^1.0
ellipse/resolvable-callable Version ^1.0.3
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 ellipse/dispatcher-controller contains the following files

Loading the files please wait ....