2017 © Pedro Peláez
 

library scabbia2-lightstack

Scabbia2 LightStack Component

image

eserozvataf/scabbia2-lightstack

Scabbia2 LightStack Component

  • Sunday, January 3, 2016
  • by eserozvataf
  • Repository
  • 1 Watchers
  • 4 Stars
  • 8 Installations
  • PHP
  • 0 Dependents
  • 0 Suggesters
  • 0 Forks
  • 2 Open issues
  • 2 Versions
  • 14 % Grown

The README.md

Scabbia2 LightStack Component

This component is a simple abstraction layer which constructs Middleware, Request and Response concepts will be shared with other components or codes. It's lighter alternative for smyfony's HttpKernel and HttpFoundation., (*1)

Build Status Scrutinizer Code Quality Total Downloads Latest Stable Version Latest Unstable Version Documentation Status, (*2)

Usage

Request Object

use Scabbia\LightStack\Request;

$request = Request::generateFromGlobals();

// full url in scheme://host:port/directory/ format
echo $request->getEndpoint();

// http method
echo $request->getFormat();

// path info
echo $request->getPathInfo();

// remote ip
echo $request->getRemoteIp();

// is ajax request?
var_dump($request->isAsynchronous());

// instead of $_GET['p']
echo $request->get('p');

// or $_POST['p']
echo $request->post('p');

// or $_FILES['p']
var_dump($request->file('p'));

// or $_GET['p'] || $_POST['p'] || $_FILES['p']
echo $request->data('p');

// or $_SERVER['REQUEST_METHOD'];
echo $request->server('REQUEST_METHOD');

// or $_SESSION['p']
echo $request->session('p');

// or $_COOKIE['p']
echo $request->cookie('p');

// from http headers
echo $request->header('Accept-Language');

// check if a value with key 'p' is posted
var_dump($request->has('post', 'p'));

// check if a file with key 'p' is uploaded
var_dump($request->has('file', 'p'));

// retrieve all posted values
print_r($request->all('post'));

// retrieve all values in request
print_r($request->all());

Contributing

It is publicly open for any contribution. Bugfixes, new features and extra modules are welcome. All contributions should be filed on the eserozvataf/scabbia2-lightstack repository., (*3)

  • To contribute to code: Fork the repo, push your changes to your fork, and submit a pull request.
  • To report a bug: If something does not work, please report it using GitHub issues.
  • To support: Donate

The Versions

03/01 2016

dev-master

9999999-dev https://github.com/eserozvataf/scabbia2

Scabbia2 LightStack Component

  Sources   Download

Apache-2.0

The Requires

  • php >=5.6.0

 

The Development Requires

stack scabbia eserozvataf scabbia2 scabbiafw lightstack

19/09 2015

v0.1.2

0.1.2.0 http://www.scabbiafw.com/

Scabbia2 LightStack Component

  Sources   Download

Apache-2.0

The Requires

  • php >=5.6.0

 

The Development Requires

stack scabbia larukedi scabbia2 scabbiafw lightstack