2017 © Pedro Peláez
 

library raw-request

RawRequest is a simple request class used by RawPHP framework and other applications and provides a useful interface to the HTTP request.

image

rawphp/raw-request

RawRequest is a simple request class used by RawPHP framework and other applications and provides a useful interface to the HTTP request.

  • Wednesday, December 17, 2014
  • by rawphp
  • Repository
  • 1 Watchers
  • 0 Stars
  • 305 Installations
  • PHP
  • 1 Dependents
  • 1 Suggesters
  • 0 Forks
  • 0 Open issues
  • 1 Versions
  • 0 % Grown

The README.md

RawRequest - A Simple Http Request Interface Class for PHP Applications

Build Status Coverage Status Latest Stable Version Total Downloads Latest Unstable Version License, (*1)

SensioLabsInsight, (*2)

Package Features

  • Provides an interface to the current HTTP request
  • Help with creating relative and absolute site urls

Installation

Composer

RawRequest is available via Composer/Packagist., (*3)

Add "rawphp/raw-request": "0.*@dev" to the require block in your composer.json and then run composer install., (*4)

{
        "require": {
            "rawphp/raw-request": "0.*@dev"
        }
}

You can also simply run the following from the command line:, (*5)

composer require rawphp/raw-request "0.*@dev"

Tarball

Alternatively, just copy the contents of the RawRequest folder into somewhere that's in your PHP include_path setting. If you don't speak git or just want a tarball, click the 'zip' button at the top of the page in GitHub., (*6)

Basic Usage

<?php

defined( 'BASE_URL' ) || define( 'BASE_URL', 'http://rawphp.org/' );

use RawPHP\RawRequest\Request;

// create new request instance
$request = new Request( );

// initialise request
$request->init( );

// get current route and params
$route = $request->route;
$params = $request->params;

// create a new relative url
$url = $request->createUrl( 'users/get', array( 1 ) );

// or absolute url
$url = $request->createUrl( 'users/get', array( 1 ), TRUE );

License

This package is licensed under the MIT. Read LICENSE for information on the software availability and distribution., (*7)

Contributing

Please submit bug reports, suggestions and pull requests to the GitHub issue tracker., (*8)

Changelog

22-09-2014

  • Tested to PHP 5.3.

20-09-2014

  • Replaced php array configuration with yaml

12-09-2014

  • Initial Code Commit

The Versions

17/12 2014

dev-master

9999999-dev http://rawphp.org

RawRequest is a simple request class used by RawPHP framework and other applications and provides a useful interface to the HTTP request.

  Sources   Download

MIT

The Requires

  • php >=5.3.0

 

The Development Requires

by Tom Kaczocha

http request