Download the PHP package peterujah/php-router-template without Composer

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

php-router-template

A simple php class to help render template in routers and fix additional slash issue.

IMPORTANT

You do not have to install, download nor use this class, i wrote the class for my personal needs, the first time i starting using router in my project instead of old ways. The only important the about this class is deep method which fixed the issue with extra shlash as posted on stackoverflow question here style disappear when i add slash / after route

And making it easy for me to access any defined global variables within the template since am not using any php framework. So please just ignore the project, even though i have claerly documented the class and showed usage sample, it because i like wasing my time on beautiful usles codes and likes to wrap all my ever writing functions is a class because i might need it again. What about composer installation? Yah i know, it free so i used.

Installation is super-easy via Composer:

USAGES

Initialize RouterTemplate with the necessary parameters and register your custom classes.

Render template by passing the directory deep method as the first parameter while optional options array will be the second parameter.

A shorthand to the above method should be using withDept method and only passing the directory dept integer as the first parameter while optional options array will be the second parameter.

Using the class with Bramus Router or any other php router as you wish. Initialize your router instance

Render hompage template using with and deep method.

Render hompage template using view method.

Render update product template with product id as the second url parameter.

Render update product template with product id as second url parameter and passing additional options to the template.

Accessing all global variables within a template file /router/product.php.


All versions of php-router-template with dependencies

PHP Build Version
Package Version
Requires php Version >=5.3.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 peterujah/php-router-template contains the following files

Loading the files please wait ....