buzzz/api

Fast api

Maintainers

Package info

github.com/dpmaster/buzzz-api

pkg:composer/buzzz/api

Statistics

Installs: 15

Dependents: 0

Suggesters: 0

Stars: 0

Open Issues: 0

1.0.4 2019-05-05 17:21 UTC

This package is auto-updated.

Last update: 2026-03-06 08:37:38 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]