Git Product home page Git Product logo

bandama-framework's Introduction

Bandama Framework

Latest Stable Version Build Status Total Downloads License

Bandama is a PHP micro-framework to create Web Applications and Web APIs

Installation

It's recommended that you use Composer to install Bandama.

$ composer require bandama/framework "^1.0"

This will install Bandama and all required dependencies. Bandama requires PHP 5.4 or newer.

Usage

Create an index.php file with the following contents:

<?php

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


$app = Bandama\App::getInstance(null, Bandama\App::APP_MODE_DEV);
$router = $app->get('router');

$router->get('/hello/:name', function($name) {
    echo "<pre> Hello, $name";
});

$app->run();

You may quickly test this using the built-in PHP server:

$ php -S localhost:8008

Going to http://localhost:8008/hello/world will now display "Hello, world".

Components

  • Router
  • Session
  • PDO Session Handler
  • Cookie
  • Controller
  • Dependency Injection Container
  • Database Connection
  • Query Builder

Tests

To execute the test suite, you'll need phpunit. If you are phpunit installed globally on your computer, type

$ phpunit --stderr

Else, run

$ bin/phpunit --stderr

Change log

  • 1.0.10
    • Improvement of App setup method
  • 1.0.9
    • Bug fixed in App class
  • 1.0.8
    • Adding base URI Management in App class
  • 1.0.7
    • Bug fixed in render method of Controller class
  • 1.0.6
    • Adding static method newInstance to container class
    • Adding addService method to App class
  • 1.0.5
    • Adding PDO Session Handler for relationnal database session management

Credits

License

The Bandama Framework is licensed under the MIT license. See License File for more information.

bandama-framework's People

Contributors

jfyoboue avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.