comparison common-functions.inc @ 94:2370f4450983

Document functions and move a few functions to more appropriate places.
author Tom Fredrik Blenning Klaussen <bfg@blenning.no>
date Thu, 18 Oct 2012 17:33:34 +0200
parents 8aadd7a23b68
children 6b882fb6ea46
comparison
equal deleted inserted replaced
93:8aadd7a23b68 94:2370f4450983
9 $baseDir = dirname(__FILE__); 9 $baseDir = dirname(__FILE__);
10 10
11 $cache = ScriptIncludeCache::instance(__FILE__); 11 $cache = ScriptIncludeCache::instance(__FILE__);
12 $cache->includeOnce('StatusCodes.inc', $baseDir); 12 $cache->includeOnce('StatusCodes.inc', $baseDir);
13 /// @endcond 13 /// @endcond
14
15 class RequestException extends RuntimeException
16 {
17 private $_info;
18
19 function __construct($info)
20 {
21 $this->_info = $info;
22 if (array_key_exists('error', $info)) {
23 parent::__construct($info['error']);
24 }
25 }
26
27 function info()
28 {
29 return $this->_info;
30 }
31 }
32 14
33 /** 15 /**
34 * Generates a representation for an array of key => value pairs 16 * Generates a representation for an array of key => value pairs
35 * 17 *
36 * @note Behaviour is undefined if value is a composite structure. 18 * @note Behaviour is undefined if value is a composite structure.