2017 © Pedro Peláez
 

library chiron

Chiron is a PHP micro framework

image

chiron/chiron

Chiron is a PHP micro framework

  • Friday, July 27, 2018
  • by ncou
  • Repository
  • 1 Watchers
  • 0 Stars
  • 30 Installations
  • PHP
  • 1 Dependents
  • 0 Suggesters
  • 0 Forks
  • 0 Open issues
  • 21 Versions
  • 15 % Grown

The README.md

Build Status Coverage Status CodeCov, (*1)

Latest Stable Version Total Downloads Monthly Downloads, (*2)

StyleCI PHP-Eye PHPStan, (*3)

Micro-Framework

Chiron is a PHP micro framework that helps you quickly write simple yet powerful web applications and APIs. All that is needed to get access to the Framework is to include the autoloader., (*4)

<?php
use \Psr\Http\Message\ServerRequestInterface as Request;
use \Psr\Http\Message\ResponseInterface as Response;

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

$app = new Chiron\Application();
$app->get('/hello/[:name]', function (Request $request, Response $response, string $name) {
    $response->getBody()->write('Hello ' . $name);
    return $response;
});
$app->run();

Next we define a route to /hello/[:name] that matches for GET http requests. When the route matches, the function is executed and the return value is sent back to the client as an http response., (*5)

Installation

If you want to get started fast, use the Chiron Skeleton as a base by running this bash command :, (*6)

$ composer create-project chiron/chiron-skeleton [my-app-name]

Replace [my-app-name] with the desired directory name for your new application., (*7)

You can then run it with PHP's built-in webserver:, (*8)

$ cd [my-app-name]; php -S localhost:8080 -t public public/index.php

Or using the Composer shortcut :, (*9)

$ composer start, (*10)

If you want more flexibility, and install only the framework, use this Composer command instead:, (*11)

$ composer require chiron/chiron

Description

About Chiron

Features

Motivation

Chiron was built with the purpose of understanding how major PHP frameworks operate under the hood. Most frameworks like Laravel implement techniques that can seem like "magic" unless you actually implement them yourself, an example being utilizing reflection API to plug in dependencies. Chiron has helped me so much with familarizing myself with quite a few advanced concepts in the PHP & OOP world., (*12)

Skeletons

| App Type | Current Status | Install
| --- | --- | --- chiron/app | Latest Stable Version | https://github.com/chironphp/app chiron/app-cli | Latest Stable Version | https://github.com/chironphp/app-cli, (*13)

License:

MIT License (MIT). Please see LICENSE for more information., (*14)

The Versions

29/04 2018
29/04 2018
29/04 2018
29/04 2018
29/04 2018
28/04 2018
27/04 2018
26/04 2018
18/03 2018