axelitus/acre-net-http

This package is abandoned and no longer maintained. No replacement package was suggested.

axelitus's Acre Net Http classes.

v0.5.0 2012-12-08 00:37 UTC

This package is auto-updated.

Last update: 2020-01-23 19:08:03 UTC


README

Acre Net Http is a sub-package of Acre. It contains classes for the network protocol HTTP such as Response and Request. For more information about the Acre initiative please visit this link.

Package Information

Standards

As a code reuse initiative, this package should follow some standards so it can be easily used by anyone who wants to. Recently there has been an initiative to standardize the chunks of code everyone is building so the wheel must not be reinvented everytime someone needs to do something. There's a group PHP-FIG (Framework Interop Group) that's behind this initiative of allowing the built libraries to be interchangeable between frameworks and systems.

There are already some standards marked as accepted (final): PSR-0, PSR-1 and PSR-2.

This package is PSR-2 compliant.

Being PSR-2 compliant means this package can be easily installed by using Composer from the Packagist package archive. Just follow the instructions in section How to install.

Contents

  • Method: The HTTP protocol available methods.
  • Parser: A parser for HTTP messages.
  • Request: An object that represents an HTTP request.
  • Response: An object that represents an HTTP response.
  • Status: The HTTP protocol status codes.
  • UserAgent: A user-agent that can handle HTTP messages.

How to install

To install this package and use it in your app just follow these instructions (if you haven't read the documentation from Composer please do so before you continue):

  1. Download composer if you haven't already done so (use your preferred method):
curl -s https://getcomposer.org/installer | php
  1. Place a require statement inside your composer.json file replacing <version> with the desired version:
"require": {
    "axelitus/acre-net-http": "<version>"
}
  1. Run the composer installer to resolve dependencies and download the packages:
php composer.phar install
  1. In order to use the packages you have to load the autoloader that was generated by composer:
require 'vendor/autoload.php';
  1. Finally just use the package classes as needed:
axelitus\Acre\Net\Http\<class>::<function>(<params>);