Download the PHP package richardgoldstein/fat-free-routes without Composer

On this page you can find all versions of the php package richardgoldstein/fat-free-routes. 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 fat-free-routes

FatFreeRoutes

Note:

This tool has been completely refactored into a plugable architecture to allow for future expansion. Note the following:

  1. The command line parameter names have changed
  2. The @routeJS tag is no longer supported, and has been replaced by the [js] modifier.
  3. The documentation is a work-in-progress.

PHP >= 7.0 (To use the tool), PHP >= 5.4 (For generated code)

This development tool allows one to specify routes in the Fat Free Framework in DocBlock format in the controller class. Furthermore, it is build with a pluggable interface to allow for future expansion beyond route generation.

Example

Adding the @route tag above is equivalent to calling

or specifying the route in a config file.

The tool, f3routes produces a php file suitable to be required in index.php and provides a method to install the routes.

Require the generated file in index.php and call installRoutes($includeDev); before calling $f3->run();

There is also the option to generate a JavaScript file so that routes can be easily built in Javascript for front-end use.

Tags

The following DocBlock tags can be used

@route Applies to a class method, and follows the same syntax as Fat Free Framework routes, using the syntax

Replaceable tokens can be used in the path. The alias is optional, as are the route modifiers in brackets [ ].

f3routes supports additional values in the route modifier portion surrounded by brackets [ ]. This can be a comma-separated list of the existing F3 modifiers (ajax, cli, or sync), and the following additional modifiers:

The order of the items in the modifier section in unimportant, except that only the last one of ajax, sync, or cli are preserved.

Here are some examples of @route tags using modifiers:

@devroute Same as @route but only installed if installRoutes() is called with true.

@routeBase Specified in the DocBlock for the class, this prepends a path fragment to all of the route paths specified in the methods by @route or @devroute.

@routeMap and @devrouteMap The equivalent of the F3 map function, these create routes for RESTful controllers. These also allow specification of an alias for exposure in the Javascript output, which is enabled by adding [js] at the end of the tag:

This is equivalent to

If a @routeBase is set, the map path will also be prepended.

Note that f3routes supports the proposed PSR-5 PHPDoc standard: all tags can be prefixed or namespaced with f3routes. The following are equivalent:

Command Line Parameters

One use case is to incorporate f3routes into a file watcher, and update the routes in real-time as the controller classes are modified.

Example

Installation

f3routes can be installed via composer:

You may need to specify the minimum stability as this is still in dev.

Once installed via composer, f3routes can be found in vendor/bin:

or

I include it in a gulp task:

TODO

  1. Elaborate on the JavaScript output
  2. Plug-In documentation
  3. Needs new unit tests since refactoring.
  4. More examples
  5. How to use the rendered PHP and JavaScript

All versions of fat-free-routes with dependencies

PHP Build Version
Package Version
Requires php Version >=7.0
phpdocumentor/reflection Version dev-develop#208cd4547c822ba40f13955122940553da73c0ce
phpdocumentor/reflection-common Version 1.0.1
phpdocumentor/reflection-docblock Version 4.2.0
phpdocumentor/type-resolver Version 0.4.0
ulrichsg/getopt-php Version 3.1
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 richardgoldstein/fat-free-routes contains the following files

Loading the files please wait ....