buzzz/api

Fast api

Installs: 15

Dependents: 0

Suggesters: 0

Security: 0

Stars: 0

Watchers: 1

Forks: 0

Open Issues: 0

pkg:composer/buzzz/api

1.0.4 2019-05-05 17:21 UTC

This package is auto-updated.

Last update: 2026-01-06 08:17:05 UTC


README

Skeleton

https://github.com/dpmaster/buzzz-api-skeleton

Install

composer require buzzz/api

index.php

<?php
include "vendor/autoload.php";

use Buzzz\Api\Api;

$api = new Api();

$api->add([
    'pattern' => '/:controller/:action/',
    'controller_namespace' => '\\App\\Controller\\',
]);

$api->run();

.htaccess

RewriteEngine On
RewriteCond %{REQUEST_FILENAME} !-d
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_METHOD} !OPTIONS
RewriteRule ^(.*)$ index.php [L]