PageRenderTime 28ms CodeModel.GetById 18ms RepoModel.GetById 1ms app.codeStats 0ms

/public/docs/classes/Error.html

https://github.com/jralph/4520-325
HTML | 303 lines | 269 code | 31 blank | 3 comment | 0 complexity | 3f4ed2dbdedec7e46ffb06db213f91f7 MD5 | raw file
  1. <!DOCTYPE html>
  2. <html lang="en">
  3. <head>
  4. <meta name="viewport" content="width=device-width; initial-scale=1.0; maximum-scale=1.0; user-scalable=0;"/>
  5. <meta charset="utf-8"/>
  6. <title> &raquo; \Error
  7. </title>
  8. <meta name="author" content=""/>
  9. <meta name="description" content=""/>
  10. <!--[if lt IE 9]>
  11. <script src="http://html5shim.googlecode.com/svn/trunk/html5.js" type="text/javascript"></script>
  12. <![endif]-->
  13. <link href="../css/template.css" rel="stylesheet" media="all"/>
  14. <script src="../js/jquery-1.7.1.min.js" type="text/javascript"></script>
  15. <script src="../js/jquery-ui-1.8.2.custom.min.js" type="text/javascript"></script>
  16. <script src="../js/jquery.mousewheel.min.js" type="text/javascript"></script>
  17. <script src="../js/bootstrap.js" type="text/javascript"></script>
  18. <script src="../js/template.js" type="text/javascript"></script>
  19. <script src="../js/prettify/prettify.min.js" type="text/javascript"></script>
  20. <link rel="shortcut icon" href="../img/favicon.ico"/>
  21. <link rel="apple-touch-icon" href="../img/apple-touch-icon.png"/>
  22. <link rel="apple-touch-icon" sizes="72x72" href="../img/apple-touch-icon-72x72.png"/>
  23. <link rel="apple-touch-icon" sizes="114x114" href="../img/apple-touch-icon-114x114.png"/>
  24. </head>
  25. <body>
  26. <div class="navbar navbar-fixed-top">
  27. <div class="navbar-inner">
  28. <div class="container">
  29. <a class="btn btn-navbar" data-toggle="collapse" data-target=".nav-collapse">
  30. <span class="icon-bar"></span> <span class="icon-bar"></span>
  31. <span class="icon-bar"></span> </a>
  32. <a class="brand" href="../index.html">API Documentation</a>
  33. <div class="nav-collapse">
  34. <ul class="nav">
  35. <li class="dropdown">
  36. <a href="#api" class="dropdown-toggle" data-toggle="dropdown">
  37. API Documentation <b class="caret"></b>
  38. </a>
  39. <ul class="dropdown-menu">
  40. </ul>
  41. </li>
  42. <li class="dropdown" id="charts-menu">
  43. <a href="#charts" class="dropdown-toggle" data-toggle="dropdown">
  44. Charts <b class="caret"></b>
  45. </a>
  46. <ul class="dropdown-menu">
  47. <li>
  48. <a href="../graph_class.html">
  49. <i class="icon-list-alt"></i>&#160;Class hierarchy diagram
  50. </a>
  51. </li>
  52. </ul>
  53. </li>
  54. <li class="dropdown" id="reports-menu">
  55. <a href="#reports" class="dropdown-toggle" data-toggle="dropdown">
  56. Reports <b class="caret"></b>
  57. </a>
  58. <ul class="dropdown-menu">
  59. <li><a href="../errors.html"><i class="icon-list-alt"></i>&#160;Errors</a></li>
  60. <li><a href="../markers.html"><i class="icon-list-alt"></i>&#160;Markers</a></li>
  61. <li><a href="../deprecated.html"><i class="icon-list-alt"></i>&#160;Deprecated</a></li>
  62. </ul>
  63. </li>
  64. </ul>
  65. </div>
  66. </div>
  67. </div>
  68. <div class="go_to_top">
  69. <a href="#___" style="color: inherit">Back to top&#160;&#160;<i class="icon-upload icon-white"></i></a>
  70. </div>
  71. </div>
  72. <div id="___" class="container">
  73. <noscript>
  74. <div class="alert alert-warning">
  75. Javascript is disabled; several features are only available if Javascript is enabled.
  76. </div>
  77. </noscript>
  78. <div class="row">
  79. <div class="span4">
  80. <span class="btn-group visibility" data-toggle="buttons-checkbox"><button class="btn public active" title="Show public elements">Public</button><button class="btn protected" title="Show protected elements">Protected</button><button class="btn private" title="Show private elements">Private</button><button class="btn inherited active" title="Show inherited elements">Inherited</button></span><div class="btn-group view pull-right" data-toggle="buttons-radio">
  81. <button class="btn details" title="Show descriptions and method names"><i class="icon-list"></i></button><button class="btn simple" title="Show only method names"><i class="icon-align-justify"></i></button>
  82. </div>
  83. <ul class="side-nav nav nav-list">
  84. <li class="nav-header">
  85. <i class="icon-custom icon-method"></i> Methods
  86. <ul>
  87. <li class="method public">
  88. <a href="#method_check" title="check :: Function check, checks if an error has been set.">
  89. <span class="description">Function check, checks if an error has been set.</span><pre>check</pre>
  90. </a>
  91. </li>
  92. <li class="method public">
  93. <a href="#method_get" title="get :: Function get, will get the requested error message.">
  94. <span class="description">Function get, will get the requested error message.</span><pre>get</pre>
  95. </a>
  96. </li>
  97. <li class="method public">
  98. <a href="#method_set" title="set :: Function to set a cookie or session as an error. Returns true if successful, false if not.">
  99. <span class="description">Function to set a cookie or session as an error. Returns true if successful, false if not.</span><pre>set</pre>
  100. </a>
  101. </li>
  102. </ul>
  103. </li>
  104. <li class="nav-header protected">Âť Protected
  105. <ul>
  106. </ul>
  107. </li>
  108. <li class="nav-header private">Âť Private
  109. <ul>
  110. </ul>
  111. </li>
  112. <li class="nav-header">
  113. <i class="icon-custom icon-constant"></i> Constants
  114. <ul>
  115. </ul>
  116. </li>
  117. </ul>
  118. </div>
  119. <div class="span8">
  120. <div class="element class">
  121. <h1>Error</h1>
  122. <small style="display: block; text-align: right">
  123. </small>
  124. <p class="short_description">The errors class is used to check if any errors have been activated and display them.</p>
  125. <div class="details">
  126. <div class="long_description">
  127. <p>It also has a specific function to set an error to be displayed when the user next
  128. loads the page.</p>
  129. </div>
  130. <table class="table table-bordered">
  131. <tr>
  132. <th>
  133. author
  134. </th>
  135. <td>Joseph Ralph &lt;jralph@arrowvaleacademy.co.uk&gt;</td>
  136. </tr>
  137. </table>
  138. <h3><i class="icon-custom icon-method"></i> Methods</h3>
  139. <a id="method_check"></a>
  140. <div class="element clickable method public method_check" data-toggle="collapse" data-target=".method_check .collapse">
  141. <h2>Function check, checks if an error has been set.</h2>
  142. <pre>check(string $name, string $location = &#039;session&#039;) </pre>
  143. <div class="labels">
  144. <span class="label">static</span> </div>
  145. <div class="row collapse">
  146. <div class="detail-description">
  147. <div class="long_description"><p>Using this class, errors are stored using <em>error</em> as the prefix.
  148. This function will automatically use <em>error</em> as a prefix for any
  149. requested names.
  150. eg. _error_login or _error_register or _error_general</p>
  151. </div>
  152. <table class="table">
  153. <tr>
  154. <th>
  155. </th>
  156. <td>
  157. </td>
  158. </tr>
  159. </table>
  160. <h3>Arguments</h3>
  161. <div class="subelement argument">
  162. <h4>$name</h4>
  163. <code>string</code><p><p>The name of the error to be checked</p>
  164. </p>
  165. </div>
  166. <div class="subelement argument">
  167. <h4>$location</h4>
  168. <code>string</code><p><p>The location (eg, in session or cookie). Default as session.</p>
  169. </p>
  170. </div>
  171. </div>
  172. </div>
  173. </div>
  174. <a id="method_get"></a>
  175. <div class="element clickable method public method_get" data-toggle="collapse" data-target=".method_get .collapse">
  176. <h2>Function get, will get the requested error message.</h2>
  177. <pre>get(string $name, string $location = &#039;session&#039;) </pre>
  178. <div class="labels">
  179. <span class="label">static</span> </div>
  180. <div class="row collapse">
  181. <div class="detail-description">
  182. <div class="long_description"><p>Best used after Error::check();
  183. Example:
  184. <code>
  185. if( Error::check('general') ){
  186. echo Error::get('general');
  187. }
  188. </code></p>
  189. <p>Will return the value if available or false if not. If a value is returned
  190. the value will then be unset from the session or cookie so that it is only
  191. used once.</p>
  192. </div>
  193. <table class="table">
  194. <tr>
  195. <th>
  196. </th>
  197. <td>
  198. </td>
  199. </tr>
  200. </table>
  201. <h3>Arguments</h3>
  202. <div class="subelement argument">
  203. <h4>$name</h4>
  204. <code>string</code><p><p>The name of the error to be returned</p>
  205. </p>
  206. </div>
  207. <div class="subelement argument">
  208. <h4>$location</h4>
  209. <code>string</code><p><p>The location (eg, in session or cookie). Default as session.</p>
  210. </p>
  211. </div>
  212. </div>
  213. </div>
  214. </div>
  215. <a id="method_set"></a>
  216. <div class="element clickable method public method_set" data-toggle="collapse" data-target=".method_set .collapse">
  217. <h2>Function to set a cookie or session as an error. Returns true if successful, false if not.</h2>
  218. <pre>set(string $name, string $value, string $location = &#039;session&#039;) </pre>
  219. <div class="labels">
  220. <span class="label">static</span> </div>
  221. <div class="row collapse">
  222. <div class="detail-description">
  223. <div class="long_description">
  224. </div>
  225. <table class="table">
  226. <tr>
  227. <th>
  228. </th>
  229. <td>
  230. </td>
  231. </tr>
  232. </table>
  233. <h3>Arguments</h3>
  234. <div class="subelement argument">
  235. <h4>$name</h4>
  236. <code>string</code><p><p>The name of the error (excluding <em>error</em>).</p>
  237. </p>
  238. </div>
  239. <div class="subelement argument">
  240. <h4>$value</h4>
  241. <code>string</code><p><p>The error message or value.</p>
  242. </p>
  243. </div>
  244. <div class="subelement argument">
  245. <h4>$location</h4>
  246. <code>string</code><p><p>The location to store the error (session or cookie).</p>
  247. </p>
  248. </div>
  249. </div>
  250. </div>
  251. </div>
  252. </div>
  253. </div>
  254. <a id="\Error"></a>
  255. <ul class="breadcrumb">
  256. <li><a href="../index.html"><i class="icon-custom icon-class"></i></a></li>
  257. <li>
  258. <span class="divider">\</span><a href="../namespaces/default.html">\</a>
  259. </li>
  260. <li class="active"><span class="divider">\</span><a href="../classes/Error.html">Error</a></li>
  261. </ul>
  262. </div>
  263. </div>
  264. </div>
  265. <footer class="span12">
  266. Template is built using <a href="http://twitter.github.com/bootstrap/">Twitter Bootstrap 2</a> and icons provided by
  267. <a href="http://glyphicons.com/">Glyphicons</a>.<br/>
  268. Documentation is powered by <a href="http://www.phpdoc.org/">phpDocumentor </a> and<br/>
  269. generated on Fri, 14 Jun 2013 19:02:00 +0200.<br/>
  270. </footer>
  271. </body>
  272. </html>