Download the PHP package dcousineau/orlex without Composer

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

Orlex: Organized Silex

Build Status

Orlex attempts to give a mild amount of structure to Silex without extending, overwriting, or using any dirty hacks.

Setting up Orlex is as simple as registering a service provider and pointing it to a directory of controllers:

And then actually creating a controller:

Installation

Orlex is provided as a composer package and requires PHP 5.4 and up. To use Orlex, simply add:

Controller Traits

Since Orlex seeks to be an "Organized Silex", it provides several convenience traits for your controller classes. These traits include a Twig trait, a Form trait, a Session trait.

To use them, your controller MUST use the \Orlex\ContainerAwareTrait.

NOTE: Any controller classes that use the aforementioned ContainerAwareTrait will have their container automatically set by the route compiler.

For example:

Obviously each respective trait will require their companion service provider to be already registered with the Silex application.

Custom Annotations

Orlex will support custom annotations. If you give your Orlex manager a directory and a namespace it will look for annotations contained there within:

NOTE: The path key for annotation autoloading should be the root directory containing the entire namespace. If your annotation files are of the namespace app\Annotation and your annotation files are in /path/to/src/app/Annotation, the proper annotation configuration would be '/path/to/src' => 'app\Annotation'

If the annotation implements the Orlex\Annotation\RouteModifier interface, Orlex will allow it to alter the internal Silex controller created for that specific route/action:

For more information on how to define annotations, please see the Doctrine Annotations documentation.

Expect this interface to possibly change in the future, particularly where the modify(…) signature is concerned.

Annotation Caching

Orlex is setup for easy annotation caching via the Doctrine\Common\Annotations\CachedReader reader. Simply include a cache directory:

And Orlex will setup a Doctrine\Common\Cache\FilesystemCache pointed at that directory and use said cache with the CachedReader. Alternatively you can override the orlex.cache service in your application container to return a Doctrine\Common\Cache\Cache object and it will be used instead.

Internal Behavior

Orlex works by scanning controller directories and inspecting annotations on all classes contained therewithin. Each controller class has a Service Controller created for it (as seen in the above modify(…) example's parameter $serviceid).

Orlex automatically registers the ServiceControllerServiceProvider with the specified Silex application.

Then, each method with a @Route annotation is created by performing an $app->match($path, "$serviceid:$methodName"). The result of $app->match(…) is a Silex Controller, which is then passed in a chain through each annotation that implements the Orlex\Annotation\RouteModifier interface, allowing it to chain anything that is required to the Silex controller.

Want To Help?

Please do! Just remember this is early alpha under going "api stress testing" (meaning I'm using this internally on a project and new features are being implemented on demand and going through trial-by-fire).

To-Do


All versions of orlex with dependencies

PHP Build Version
Package Version
Requires php Version >=5.4.0
silex/silex Version 1.0.*
doctrine/annotations Version 1.0.*
symfony/config Version >=2.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 dcousineau/orlex contains the following files

Loading the files please wait ....