Download the PHP package rawebone/micro without Composer

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

Micro

Build Status

Micro is a web framework designed for professionals needing to quick build small, reliable applications. Its goals are to:

Please be aware that I am lowering my support for this project in favor of Wilson which is in part based off of this project but is more performant and has an overall better design. If anyone is interested in taking joint ownership of the project then feel free to get in contact, or send in PR's and I'll merge.

Usage

The basic usage of the application is:

The attached Controller must implement the Micro\ControllerInterface; the recommended approach to building controllers is via extension of the Micro\DefaultController class:

Handling Errors and Bad Requests

There are two special controller interfaces which can affect the handling of your application - Micro\ErrorControllerInterface and Micro\NotFoundControllerInterface. You can implement these interfaces on an object and attach them, as above, to the application instance.

In the case that an Exception is encountered, the Error Controller will be invoked and as expected to return a Response object. Similarly if a Controller for the Request is not found, the Not Found Controller will be invoked to provide a response for the Client.

Micro will not try and handle any errors or 404's beyond this provisioning.

Testing

Micro contains a base test case for use in conjunction with PHPUnit that allows you to run requests in your tests; you can do this by:

Micro ships with a concept called Browsers. These are classes which mimic requests made against your application and return the results which allows you to test your product in a simple, automated fashion. There are three browsers:

Standard Browser

The standard Browser is the root of the browser stack, and can be used to make basic requests against your application.

Tracing Browser

Micro has the ability to trace requests as they progress through the application; this exists to help you get to the route of a problem quickly. After every request made by this browser, a Micro\Testing\TraceResult will be available by calling $browser->lastTrace(). This can be printed straight to output or interrogated.

Profiling Browser

This provides the ability to profile a request for execution time and memory usage- this is, primarily, for use to help measure and improve the performance of the framework but can be useful to end users as well. It is important to note that the execution time/memory usage of the controllers is not the only data captured.

Tracing Your Controller Behaviour

As explained in the Tracing Browser section, requests can be traced through the system and this functionality is optionally available to controllers.

By implementing the Micro\TraceableInterface, you can receive a PSR-3 logger to capture any debug information:

General Approach

Micro, as I hope you will have seen from the above, is designed to be as simple and testable as possible however, in the case you need to change frameworks later on down the line, the suggestion is that the Controllers do the least amount of work possible. For example:

Is preferrable to:

For two reasons:

  1. This allows you to separate out your business logic from your web logic; the two can then change independently
  2. You are then only testing for correctness of input/output from the web, and not the overall function of your application

This has the additional payoff of allowing you to change systems down the line without major rewrites.

License

MIT License, go hog wild.


All versions of micro with dependencies

PHP Build Version
Package Version
Requires php Version >=5.3.0
symfony/http-foundation Version 2.5.*
psr/log Version 1.0.*
shrikeh/teapot Version 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 rawebone/micro contains the following files

Loading the files please wait ....