Skip to content

Commit 538e1ef

Browse files
author
Tino Ehrich
committed
some cleaning and PSR-4
1 parent d5afdcc commit 538e1ef

File tree

4 files changed

+237
-145
lines changed

4 files changed

+237
-145
lines changed

composer.json

+11-8
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,10 @@
22
"name": "iron-io/iron_core",
33
"type": "library",
44
"description": "Collection of common functions for all iron.io client libraries",
5-
"keywords": ["iron_core","iron"],
5+
"keywords": [
6+
"iron_core",
7+
"iron"
8+
],
69
"homepage": "http://github.com/iron-io/iron_core_php",
710
"license": "MIT",
811
"authors": [
@@ -17,18 +20,18 @@
1720
"email": "[email protected]",
1821
"homepage": "http://iron.io",
1922
"role": "Developer"
23+
},
24+
{
25+
"name": "Tino Ehrich",
26+
"email": "[email protected]"
2027
}
2128
],
2229
"require": {
2330
"php": ">=5.2.0"
2431
},
2532
"autoload": {
26-
"classmap": ["IronCore.class.php"]
27-
},
28-
"repositories":[
29-
{
30-
"type":"git",
31-
"url":"http://github.com/iron-io/iron_core_php"
33+
"psr-4": {
34+
"IronCore\\": "src/"
3235
}
33-
]
36+
}
3437
}

src/HttpException.php

+24
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,24 @@
1+
<?php
2+
3+
namespace IronCore;
4+
5+
/**
6+
* HttpException
7+
*
8+
* The Http_Exception class represents an HTTP response status that is not 200 OK.
9+
*
10+
* @package IronCore
11+
* @author Tino Ehrich ([email protected])
12+
*/
13+
class HttpException extends \Exception
14+
{
15+
const NOT_MODIFIED = 304;
16+
const BAD_REQUEST = 400;
17+
const NOT_FOUND = 404;
18+
const NOT_ALLOWED = 405;
19+
const CONFLICT = 409;
20+
const PRECONDITION_FAILED = 412;
21+
const INTERNAL_ERROR = 500;
22+
const SERVICE_UNAVAILABLE = 503;
23+
const GATEWAY_TIMEOUT = 504;
24+
}

0 commit comments

Comments
 (0)