Download the PHP package dasprid/dash without Composer

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


Build Status Scrutinizer Code Quality Coverage Status

Dash is a router which was initially meant to be a router for Zend Framework 3, but by now evolved into its very own package. It has a dependency on ZF's ServiceManager, but purely for its plugin manager implementation.

Installation

Dash is supposed to be used with a dependency container, but can in theory be used without one. In the average case where you are using Dash with another framework which supplies you a dependency container, there is a file placed in the config directory, which includes all factories which have to be registered. These factories assume that your container also supplies a config array via the name "config". For specific contents of it, refer to the examples below.

Withint your application, you can easily retrieve the dependency config by instantiating Dash\ConfigProvider. Since it implements an __invoke() method, it can be used with config managers like expressive-config-manager.

Route Configuration

Route configuration is greatly simplified from ZF2, routes now have an (optional) 3 key indexed array as the first 3 parameters, the format for the shortcut parameters are:

[path, defaults, methods]

This may feel counter intuitive, but the idea is that the most frequently changed parameter appears earliest in the order so that when defining child routes you can skip parameters you wish to inherit.

path, will expect a string, whereas defaults will expect an array and method will expect either an array of methods this route should match, a single method in a string, or a string of '*' for all methods. An empty string '' will match no methods. Currently, passing no method defaults to '*'.

Along with the indexed shortcut parameters, named configuration can also be passed using key value pairs:

Parameters and named values can be mixed, although the first 3 indexed items will always to be presumed to be the parameters as ordered above.

Child Routes

Child routes can be simply defined in the children key of the configuration of the parent route:

Route Types

The router no longer has mulitple route types, instead the Generic route handles all aspects of HTTP routing. Instead of specificing the route type in the configuration, the router now knows how to handle all routes based solely on the configuration.

For example, if you want a given route only to match a specific hostname, simply define the correct key value pair in that route's configuration:

Similarly, if a given route should only match the https protocol:

Overloading

One confusion that's anticipate to be a minor problem is the confusion of how to overload a given route parameter from within a different module. This is easily achieved by defining the relevant key\value in the configuration that is intended to override the route. Overwriting a route parameter by the shortcut key will not take effect because it will only be added to the end of the configuration array

/user now will no longer match, but /userinfo will match in it's place.

Development

When doing performance-dependent changes, make sure to compare the benchmarks between master and your branch. To run them, execute the following command:

php vendor/bin/athletic -p benchmark -b vendor/autoload.php


All versions of dash with dependencies

PHP Build Version
Package Version
Requires php Version ^5.5|^7.0
psr/http-message Version ^1.0
zendframework/zend-servicemanager Version ^3.0.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 dasprid/dash contains the following files

Loading the files please wait ....