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
|
<?php
|
||||||
|
|
||||||
class Api {
|
class Api extends RackMiddleware {
|
||||||
|
|
||||||
function __construct (&$app) {
|
|
||||||
$this->app =& $app;
|
|
||||||
}
|
|
||||||
|
|
||||||
function call (&$env) {
|
function call (&$env) {
|
||||||
if ( preg_match("/^\/api\/([a-z]{1}[a-z0-9]*)/i", $env["PATH_INFO"], $match) ) {
|
if ( preg_match("/^\/api\/([a-z]{1}[a-z0-9]*)/i", $env["PATH_INFO"], $match) ) {
|
||||||
|
|||||||
@@ -1,10 +1,6 @@
|
|||||||
<?php
|
<?php
|
||||||
|
|
||||||
class Format {
|
class Format extends RackMiddleware {
|
||||||
|
|
||||||
function __construct (&$app) {
|
|
||||||
$this->app =& $app;
|
|
||||||
}
|
|
||||||
|
|
||||||
function call (&$env) {
|
function call (&$env) {
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user