2017 © Pedro Peláez
 

library php-library-api

PHP Library API

image

sinevia/php-library-api

PHP Library API

  • Friday, January 26, 2018
  • by sinevia
  • Repository
  • 1 Watchers
  • 0 Stars
  • 132 Installations
  • PHP
  • 0 Dependents
  • 0 Suggesters
  • 0 Forks
  • 0 Open issues
  • 2 Versions
  • 1100 % Grown

The README.md

PHP Library API

Tests Gitpod Ready-to-Code, (*1)

A package to quickly set a PHP webservice, (*2)

Background

Installation

  • Install via Composer
composer require sinevia/php-library-api

Usage

  1. The lines bellow create an API service, which serves commands mapped to middleware and class methods:
$commands = [
    'ping' => 'PingController@ping',

    'auth/login' => 'AuthController@login',
    'auth/register' => 'AuthController@register',
    'auth/password-restore' => 'AuthController@passwordRestore',

    'account/password-change' => ['MiddlewareController@verifyUser','AccountController@passwordChange'],

];

$api = new Sinevia\ApiService;
$api->addCommands($commands);
die($api->run());
  1. Example controller with response:
class PingController{
    function ping(){
        return (new Sinevia\ApiResponse)->success('pong');
    }
}

The Versions

26/01 2018

dev-master

9999999-dev http://github.com/sinevia/php-library-api

PHP Library API

  Sources   Download

proprietary

api php library sinevia

06/01 2018

v1.0.0

1.0.0.0 http://github.com/sinevia/php-library-api

PHP Library API

  Sources   Download

commercial

api php library sinevia