2017 © Pedro Peláez
 

library kaiser

The Kaiser framework for PHP

image

mclkim/kaiser

The Kaiser framework for PHP

  • Saturday, July 28, 2018
  • by mclkim
  • Repository
  • 1 Watchers
  • 1 Stars
  • 273 Installations
  • PHP
  • 0 Dependents
  • 0 Suggesters
  • 0 Forks
  • 0 Open issues
  • 9 Versions
  • 8 % Grown

The README.md

The Kaiser framework for PHP

Kaiser is a PHP simple framework that helps you quickly write simple web applications and APIs., (*1)

Description

It is a framework created by adding RoutingMiddleware to Slim Framework. All of the features work on the Slim Framework platform., (*2)

<?php
use Mcl\Kaiser\Middleware\AuthMiddleware;
use Mcl\Kaiser\Middleware\RoutingMiddleware;
use Mcl\Kaiser\Middleware\SessionMiddleware;
use Psr\Http\Message\ResponseInterface as Response;
use Psr\Http\Message\ServerRequestInterface as Request;
use Slim\Factory\AppFactory;

require __DIR__ . '/../vendor/autoload.php';

$app = AppFactory::create();

$app->get('/hello/{name}', function (Request $request, Response $response, array $args) {
    $name = $args['name'];
    $response->getBody()->write("Hello, $name");
    return $response;
});

//TODO::mclkim
$route = new RoutingMiddleware($app->getContainer(), __DIR__ . '/../app');
if ($route = $route()) {
    $app->map($route['methods'], $route['pattern'], $route['handler'])
        ->add(new SessionMiddleware())
        ->add(new AuthMiddleware($route['callable']));
}

$app->run();

Prerequisites

PHP, (*3)

$ php -v
PHP 7.3.8 (cli) (built: Jul 30 2019 12:44:06) ( ZTS MSVC15 (Visual C++ 2017) x64
 )
Copyright (c) 1997-2018 The PHP Group
Zend Engine v3.3.8, Copyright (c) 1998-2018 Zend Technologies
    with Zend OPcache v7.3.8, Copyright (c) 1999-2018, by Zend Technologies

Composer, (*4)

$ composer -v
   ______
  / ____/___  ____ ___  ____  ____  ________  _____
 / /   / __ \/ __ `__ \/ __ \/ __ \/ ___/ _ \/ ___/
/ /___/ /_/ / / / / / / /_/ / /_/ (__  )  __/ /
\____/\____/_/ /_/ /_/ .___/\____/____/\___/_/
                    /_/
Composer version 1.9.1 2019-11-01 17:20:17

1.Install

First, at the command line, make working directory:, (*5)

$ mkdir homepage
$ cd homepage

and require the necessary libraries:, (*6)

$ composer require mclkim/kaiser

2.Example copy on local development

The following is a working example., (*7)

$ cp -rf vendor/mclkim/kaiser/example/* .

3.Web brower

You can test the framework using the public/index.php example. You can run the demo using the internal web server of PHP with the following command:, (*8)

$ php -S localhost:8000 -t public public/index.php

... and point your browser to http://localhost:8000/, (*9)

http://localhost:8000/
http://localhost:8000/hello/world
http://localhost:8000/hello.world?p1=1&p2=2&p3=3

Reference

Released under the MIT License, (*10)

The Versions

28/07 2018

dev-master

9999999-dev http://mclkim.github.io

The Kaiser framework for PHP

  Sources   Download

MIT

The Requires

 

The Development Requires

by Kim myung chul

framework kaiser

16/07 2018

v1.5

1.5.0.0 http://mclkim.github.com

The Kaiser framework for PHP

  Sources   Download

MIT

The Requires

 

by Kim myung chul

framework kaiser

13/07 2018

v1.4

1.4.0.0 http://mclkim.github.com

The Kaiser framework for PHP

  Sources   Download

MIT

The Requires

 

by Kim myung chul

framework kaiser

31/05 2018

v1.2

1.2.0.0 http://mclkim.github.com

The Kaiser framework for PHP

  Sources   Download

MIT

The Requires

 

by Kim myung chul

framework kaiser

31/05 2018

v1.3

1.3.0.0 http://mclkim.github.com

The Kaiser framework for PHP

  Sources   Download

MIT

The Requires

 

by Kim myung chul

framework kaiser

18/05 2018

v1.1.x-dev

1.1.9999999.9999999-dev http://mclkim.github.com

The Kaiser framework for PHP

  Sources   Download

MIT

The Requires

 

by Kim myung chul

framework kaiser

18/05 2018

v1.2.x-dev

1.2.9999999.9999999-dev http://mclkim.github.com

The Kaiser framework for PHP

  Sources   Download

MIT

The Requires

 

by Kim myung chul

framework kaiser

08/02 2017

v1.0

1.0.0.0 http://mclkim.github.com

The Kaiser framework

  Sources   Download

MIT

The Requires

 

The Development Requires

by Kim myung chul

framework kaiser

08/02 2017

v1.1

1.1.0.0 http://mclkim.github.com

The Kaiser framework

  Sources   Download

MIT

The Requires

 

The Development Requires

by Kim myung chul

framework kaiser