Download the PHP package clagiordano/weblibs-mvc without Composer

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

BuildStatus License

weblibs-mvc

weblibs-mvc is an simple and lightweight php routing component. This component can have a RESTful support simply adding an .htaccess file, see below for more details.

SensioLabsInsight

Based on http://php-html.net/tutorials/model-view-controller-in-php/
Based on http://phpro.org/tutorials/Model-View-Controller-MVC.html#9

Description of the main components

Application

The application class is the main component wich handle and relates components between them.

Controller

The Controller is the C in MVC. The base controller is a simple abstract class that defines the structure of all controllers. By including the registry here, the registry is available to all class that extend from the base controller. An index() method has also been included in the base controller which means all controller classes that extend from it must have an index() method themselves.

Registry

The registry is an object where site wide variables can be stored without the use of globals. By passing the registry object to the controllers that need them, we avoid pollution of the global namespace and render our variables safe. We need to be able to set registry variables and to get them.

Routing

The router class is responsible for loading up the correct controller. It does nothing else. The value of the controller comes from the URL.

Template

The templates themselves are basically HTML files with a little PHP embedded. Do not let the separation Nazi's try to tell you that you need to have full separation of HTML and PHP. Remember, PHP is an embeddable scripting language. This is the sort of task it is designed for and makes an efficient templating language. The template files belong in the views directory.

Installation

The recommended way to install weblibs-mvc is through Composer.

Adding RESTful support to destination project

Simply add into yours project root a file named .htaccess
(webserver must be allow override) which contains the following lines:

this simple steps allow your application make RESTful calls like:

Usage

Legal

Copyright (C) Claudio Giordano [email protected]


All versions of weblibs-mvc with dependencies

PHP Build Version
Package Version
Requires php Version >=5.4
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 clagiordano/weblibs-mvc contains the following files

Loading the files please wait ....