2017 © Pedro Peláez
 

library zend-httperrors

image

phphacks/zend-httperrors

  • Friday, July 20, 2018
  • by 0x3175633435
  • Repository
  • 0 Watchers
  • 0 Stars
  • 63 Installations
  • PHP
  • 0 Dependents
  • 0 Suggesters
  • 0 Forks
  • 0 Open issues
  • 3 Versions
  • 0 % Grown

The README.md

zend-httperrors

Http compliant error reporting structure for zend framework., (*1)

composer require phphacks/zend-httperrors, (*2)

Add to your modules.config.php

return [
  'Zend\HttpErrors',
  'My\Other\Modules'
];

Then throw an HttpErrorException

class MyController
{
   private $auth;

   public function __construct(AuthorizationService $auth)
   {
      $this->auth = $auth;
   }

   public function doSomethingAction()
   {
      if(!$auth->isAuthorized()) {
         throw new HttpUnauthorizedException();
      }
   }
}

That's just it., (*3)

The Versions

20/07 2018

dev-master

9999999-dev

  Sources   Download

MIT

The Requires

 

The Development Requires

by Lucas A. de Araújo

20/07 2018

v1.0.1

1.0.1.0

  Sources   Download

MIT

The Requires

 

The Development Requires

by Lucas A. de Araújo

19/07 2018

v1.0.0

1.0.0.0

  Sources   Download

MIT

The Requires

 

The Development Requires

by Lucas A. de Araújo