mirror of
https://github.com/jimeh/php-rack.git
synced 2026-02-19 11:56:38 +00:00
switched Api and Format middleware to extend RackMiddleware
This commit is contained in:
@@ -1,10 +1,6 @@
|
||||
<?php
|
||||
|
||||
class Api {
|
||||
|
||||
function __construct (&$app) {
|
||||
$this->app =& $app;
|
||||
}
|
||||
class Api extends RackMiddleware {
|
||||
|
||||
function call (&$env) {
|
||||
if ( preg_match("/^\/api\/([a-z]{1}[a-z0-9]*)/i", $env["PATH_INFO"], $match) ) {
|
||||
|
||||
@@ -1,10 +1,6 @@
|
||||
<?php
|
||||
|
||||
class Format {
|
||||
|
||||
function __construct (&$app) {
|
||||
$this->app =& $app;
|
||||
}
|
||||
class Format extends RackMiddleware {
|
||||
|
||||
function call (&$env) {
|
||||
|
||||
|
||||
Reference in New Issue
Block a user