2017 © Pedro PelĂĄez
 

library httpstatus

Easy HTTP statuses.

image

mckay/httpstatus

Easy HTTP statuses.

  • Friday, May 8, 2015
  • by passcod
  • Repository
  • 9 Watchers
  • 1 Stars
  • 4,709 Installations
  • PHP
  • 0 Dependents
  • 0 Suggesters
  • 0 Forks
  • 0 Open issues
  • 8 Versions
  • 1 % Grown

The README.md

HttpStatus.php

Class constants for HTTP statuses., (*1)

Install

Add it to your composer.json:, (*2)

"mckay/httpstatus": "^1.0.4",

then run $ composer update., (*3)

Usage

use \McKay\HttpStatus;

if (!$user->isRoot()) {
    renderView(...);
    HttpStatus::set(HttpStatus::UNAUTHORIZED);
    return;
}

if (empty($resource)) {
    renderError(...);
    HttpStatus::set(HttpStatus::NOT_FOUND);
    return;
}

function renderError(...) {
    $code = HttpStatus::get();
    $description = HttpStatus::text();
    ...
}

See the source for the complete list of available HTTP status constants., (*4)

License

Copyright © McKay Software
MIT License
http://mckay.mit-license.org, (*5)

The Versions

08/05 2015

dev-master

9999999-dev

Easy HTTP statuses.

  Sources   Download

MIT

The Requires

  • php >=5.3.0

 

by McKay Software

http status

08/05 2015

v1.0.6

1.0.6.0

Easy HTTP statuses.

  Sources   Download

MIT

The Requires

  • php >=5.3.0

 

by McKay Software

http status

01/05 2015

v1.0.5

1.0.5.0

Easy HTTP statuses.

  Sources   Download

MIT

The Requires

  • php >=5.3.0

 

by McKay Software

http status

17/04 2015

v1.0.4

1.0.4.0

Easy HTTP statuses.

  Sources   Download

MIT

The Requires

  • php >=5.3.0

 

by McKay Software

http status

08/04 2015

v1.0.3

1.0.3.0

Easy HTTP statuses.

  Sources   Download

proprietary

The Requires

  • php >=5.3.0

 

by McKay Software

http status

08/04 2015

v1.0.2

1.0.2.0

Easy HTTP statuses.

  Sources   Download

proprietary

The Requires

  • php >=5.3.0

 

by McKay Software

http status

08/04 2015

v1.0.1

1.0.1.0

Easy HTTP statuses.

  Sources   Download

proprietary

The Requires

  • php >=5.3.0

 

by McKay Software

http status

08/04 2015

v1.0.0

1.0.0.0

Easy HTTP statuses.

  Sources   Download

proprietary

The Requires

  • php >=5.3.0

 

by McKay Software

http status