akaaafk commited on
Commit
b9b173e
·
verified ·
1 Parent(s): f51973f

Add files using upload-large-folder tool

Browse files
Files changed (20) hide show
  1. benchmark/NYU_CTF_Bench/development/2013/CSAW-Finals/web/historypeats/csaw/docs/classes/migrate.html +210 -0
  2. benchmark/NYU_CTF_Bench/development/2013/CSAW-Finals/web/historypeats/csaw/docs/classes/module.html +261 -0
  3. benchmark/NYU_CTF_Bench/development/2013/CSAW-Finals/web/historypeats/csaw/docs/classes/num.html +616 -0
  4. benchmark/NYU_CTF_Bench/development/2013/CSAW-Finals/web/historypeats/csaw/docs/classes/package.html +211 -0
  5. benchmark/NYU_CTF_Bench/development/2013/CSAW-Finals/web/historypeats/csaw/docs/classes/pagination.html +885 -0
  6. benchmark/NYU_CTF_Bench/development/2013/CSAW-Finals/web/historypeats/csaw/docs/classes/profiler.html +195 -0
  7. benchmark/NYU_CTF_Bench/development/2013/CSAW-Finals/web/historypeats/csaw/docs/classes/redis.html +190 -0
  8. benchmark/NYU_CTF_Bench/development/2013/CSAW-Finals/web/historypeats/csaw/docs/classes/response.html +518 -0
  9. benchmark/NYU_CTF_Bench/development/2013/CSAW-Finals/web/historypeats/csaw/docs/classes/router.html +334 -0
  10. benchmark/NYU_CTF_Bench/development/2013/CSAW-Finals/web/historypeats/csaw/docs/classes/security.html +595 -0
  11. benchmark/NYU_CTF_Bench/development/2013/CSAW-Finals/web/historypeats/csaw/docs/classes/str.html +782 -0
  12. benchmark/NYU_CTF_Bench/development/2013/CSAW-Finals/web/historypeats/csaw/docs/classes/uri.html +561 -0
  13. benchmark/NYU_CTF_Bench/development/2013/CSAW-Finals/web/historypeats/csaw/docs/classes/view.html +713 -0
  14. benchmark/NYU_CTF_Bench/development/2013/CSAW-Finals/web/historypeats/csaw/docs/general/classes.html +123 -0
  15. benchmark/NYU_CTF_Bench/development/2013/CSAW-Finals/web/historypeats/csaw/docs/general/coding_standards.html +370 -0
  16. benchmark/NYU_CTF_Bench/development/2013/CSAW-Finals/web/historypeats/csaw/docs/general/configuration.html +518 -0
  17. benchmark/NYU_CTF_Bench/development/2013/CSAW-Finals/web/historypeats/csaw/docs/general/constants.html +120 -0
  18. benchmark/NYU_CTF_Bench/development/2013/CSAW-Finals/web/historypeats/csaw/docs/general/environments.html +168 -0
  19. benchmark/NYU_CTF_Bench/development/2013/CSAW-Finals/web/historypeats/csaw/docs/general/error.html +217 -0
  20. benchmark/NYU_CTF_Bench/development/2013/CSAW-Finals/web/historypeats/csaw/docs/general/extending_core.html +174 -0
benchmark/NYU_CTF_Bench/development/2013/CSAW-Finals/web/historypeats/csaw/docs/classes/migrate.html ADDED
@@ -0,0 +1,210 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <!doctype html>
2
+ <html lang="en">
3
+ <head>
4
+ <meta charset="UTF-8">
5
+ <meta name="viewport" content="width=device-width, initial-scale=1.0">
6
+ <link rel="stylesheet" href="./../assets/css/combined.css">
7
+ <link rel="shortcut icon" href="./../favicon.ico" />
8
+ <script src="http://www.google.com/jsapi" type="text/javascript"></script>
9
+ <script type="text/javascript">
10
+ var path = './../';
11
+ var class_prefix = "Migrate::";
12
+ </script>
13
+ <script src="./../assets/js/combined.js"></script>
14
+ <title>Migrate - Classes - FuelPHP Documentation</title>
15
+ </head>
16
+ <body>
17
+ <div id="container">
18
+ <header id="header">
19
+ <div class="table">
20
+ <h1>
21
+ <strong>FuelPHP, a PHP 5.3 Framework</strong>
22
+ Documentation
23
+ </h1>
24
+
25
+ <form id="google_search">
26
+ <p>
27
+ <span id="search_clear">&nbsp;</span>
28
+ <input type="submit" name="search_submit" id="search_submit" value="search" />
29
+ <input type="text" value="" id="search_input" name="search_input" />
30
+ </p>
31
+ </form>
32
+ </div>
33
+ <nav>
34
+
35
+ <div class="clear"></div>
36
+ </nav>
37
+ <a href="#" id="toc_handle">table of contents</a>
38
+ <div class="clear"></div>
39
+ </header>
40
+
41
+ <div id="cse">
42
+ <div id="cse_point"></div>
43
+ <div id="cse_content"></div>
44
+ </div>
45
+
46
+ <div id="main">
47
+
48
+ <h2>Migrate Class</h2>
49
+
50
+ <p>
51
+ The migrate class allows you to run, walk through and revert <a href="../general/migrations.html">Migrations</a> from your controllers.
52
+ Migrations are supported in the application, in modules and in packages.
53
+ </p>
54
+
55
+ <article>
56
+ <h4 class="method" id="method_current">current($name = 'default', $type = 'app')</h4>
57
+ <p>Migrates to the current schema set in the migration config.</p>
58
+ <table class="method">
59
+ <tbody>
60
+ <tr>
61
+ <th>Static</th>
62
+ <td>Yes</td>
63
+ </tr>
64
+ <tr>
65
+ <th>Parameters</th>
66
+ <td>
67
+ <table class="parameters">
68
+ <tr>
69
+ <th>Param</th>
70
+ <th>Default</th>
71
+ <th>Description</th>
72
+ </tr>
73
+ <tr>
74
+ <th><kbd>$name</kbd></th>
75
+ <td><pre class="php"><code>'default'</code></pre></td>
76
+ <td>Name of the package or module. In case of app, 'default' is used.</td>
77
+ </tr>
78
+ <tr>
79
+ <th><kbd>$type</kbd></th>
80
+ <td><pre class="php"><code>'app'</code></pre></td>
81
+ <td>Type of migration. Valid values are 'app', 'module' and 'package'.</td>
82
+ </tr>
83
+ </table>
84
+ </td>
85
+ </tr>
86
+ <tr>
87
+ <th>Returns</th>
88
+ <td>bool</td>
89
+ </tr>
90
+ <tr>
91
+ <th>Example</th>
92
+ <td>
93
+ <pre class="php"><code>// run the migrations of the application, up to the current schema.
94
+ Migrate::current('default', 'app');
95
+ </code></pre>
96
+ </td>
97
+ </tr>
98
+ </tbody>
99
+ </table>
100
+ </article>
101
+
102
+ <article>
103
+ <h4 class="method" id="method_latest">latest($name = 'default', $type = 'app')</h4>
104
+ <p>Migrates to the latest schema set in the migration config.</p>
105
+ <table class="method">
106
+ <tbody>
107
+ <tr>
108
+ <th>Static</th>
109
+ <td>Yes</td>
110
+ </tr>
111
+ <tr>
112
+ <th>Parameters</th>
113
+ <td>
114
+ <table class="parameters">
115
+ <tr>
116
+ <th>Param</th>
117
+ <th>Default</th>
118
+ <th>Description</th>
119
+ </tr>
120
+ <tr>
121
+ <th><kbd>$name</kbd></th>
122
+ <td><pre class="php"><code>'default'</code></pre></td>
123
+ <td>Name of the package or module. In case of app, 'default' is used.</td>
124
+ </tr>
125
+ <tr>
126
+ <th><kbd>$type</kbd></th>
127
+ <td><pre class="php"><code>'app'</code></pre></td>
128
+ <td>Type of migration. Valid values are 'app', 'module' and 'package'.</td>
129
+ </tr>
130
+ </table>
131
+ </td>
132
+ </tr>
133
+ <tr>
134
+ <th>Returns</th>
135
+ <td>bool</td>
136
+ </tr>
137
+ <tr>
138
+ <th>Example</th>
139
+ <td>
140
+ <pre class="php"><code>// run the migrations of the 'mypackage' package, up to the latest schema.
141
+ Migrate::latest('mypackage', 'package');
142
+ </code></pre>
143
+ </td>
144
+ </tr>
145
+ </tbody>
146
+ </table>
147
+ </article>
148
+
149
+ <article>
150
+ <h4 class="method" id="method_version">version($version, $name = 'default', $type = 'app')</h4>
151
+ <p>The <strong>version</strong> method will move the migrations up or down to set the schema at a specific migration version.</p>
152
+ <table class="method">
153
+ <tbody>
154
+ <tr>
155
+ <th>Static</th>
156
+ <td>Yes</td>
157
+ </tr>
158
+ <tr>
159
+ <th>Parameters</th>
160
+ <td>
161
+ <table class="parameters">
162
+ <tr>
163
+ <th>Param</th>
164
+ <th>Default</th>
165
+ <th>Description</th>
166
+ </tr>
167
+ <tr>
168
+ <th><kbd>$version</kbd></th>
169
+ <td><i>required</i></td>
170
+ <td>The version you are migrating to. If you specify <strong>null</strong>, it will migrate to the latest version.</td>
171
+ </tr>
172
+ <tr>
173
+ <th><kbd>$name</kbd></th>
174
+ <td><pre class="php"><code>'default'</code></pre></td>
175
+ <td>Name of the package or module. In case of app, 'default' is used.</td>
176
+ </tr>
177
+ <tr>
178
+ <th><kbd>$type</kbd></th>
179
+ <td><pre class="php"><code>'app'</code></pre></td>
180
+ <td>Type of migration. Valid values are 'app', 'module' and 'package'.</td>
181
+ </tr>
182
+ </table>
183
+ </td>
184
+ </tr>
185
+ <tr>
186
+ <th>Returns</th>
187
+ <td>mixed - The number of the version migrated to, or <strong>false</strong> in case the requested version was the current version.</td>
188
+ </tr>
189
+ <tr>
190
+ <th>Example</th>
191
+ <td>
192
+ <pre class="php"><code>// migrate the module 'mymodule' to version 10
193
+ Migrate::version(10, 'mymodule', 'module');
194
+ </code></pre>
195
+ </td>
196
+ </tr>
197
+ </tbody>
198
+ </table>
199
+ </article>
200
+
201
+ </div>
202
+
203
+ <footer>
204
+ <p>
205
+ &copy; FuelPHP Development Team 2010-2013 - <a href="http://fuelphp.com">FuelPHP</a> is released under the MIT license.
206
+ </p>
207
+ </footer>
208
+ </div>
209
+ </body>
210
+ </html>
benchmark/NYU_CTF_Bench/development/2013/CSAW-Finals/web/historypeats/csaw/docs/classes/module.html ADDED
@@ -0,0 +1,261 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <!doctype html>
2
+ <html lang="en">
3
+ <head>
4
+ <meta charset="UTF-8">
5
+ <meta name="viewport" content="width=device-width, initial-scale=1.0">
6
+ <link rel="stylesheet" href="./../assets/css/combined.css">
7
+ <link rel="shortcut icon" href="./../favicon.ico" />
8
+ <script src="http://www.google.com/jsapi" type="text/javascript"></script>
9
+ <script type="text/javascript">
10
+ var path = './../';
11
+ var class_prefix = "Module::";
12
+ </script>
13
+ <script src="./../assets/js/combined.js"></script>
14
+ <title>Module - Classes - FuelPHP Documentation</title>
15
+ </head>
16
+ <body>
17
+ <div id="container">
18
+ <header id="header">
19
+ <div class="table">
20
+ <h1>
21
+ <strong>FuelPHP, a PHP 5.3 Framework</strong>
22
+ Documentation
23
+ </h1>
24
+
25
+ <form id="google_search">
26
+ <p>
27
+ <span id="search_clear">&nbsp;</span>
28
+ <input type="submit" name="search_submit" id="search_submit" value="search" />
29
+ <input type="text" value="" id="search_input" name="search_input" />
30
+ </p>
31
+ </form>
32
+ </div>
33
+ <nav>
34
+
35
+ <div class="clear"></div>
36
+ </nav>
37
+ <a href="#" id="toc_handle">table of contents</a>
38
+ <div class="clear"></div>
39
+ </header>
40
+
41
+ <div id="cse">
42
+ <div id="cse_point"></div>
43
+ <div id="cse_content"></div>
44
+ </div>
45
+
46
+ <div id="main">
47
+
48
+ <h2>Module Class</h2>
49
+
50
+ <p>The <kbd>Module</kbd> class allows you to easily load, unload, check if a module exists or if it is loaded, or get a list of all modules loaded.</p>
51
+
52
+ <article>
53
+ <h4 class="method" id="method_load">load($module, $path = null)</h4>
54
+ <p>The <strong>load</strong> method allows you to load one or more modules at runtime. If the module cannot be found a <kbd>ModuleNotFoundException</kbd> will be thrown.</p>
55
+ <table class="method">
56
+ <tbody>
57
+ <tr>
58
+ <th class="legend">Static</th>
59
+ <td>Yes</td>
60
+ </tr>
61
+ <tr>
62
+ <th>Parameters</th>
63
+ <td>
64
+ <table class="parameters">
65
+ <tr>
66
+ <th>Param</th>
67
+ <th>Default</th>
68
+ <th class="description">Description</th>
69
+ </tr>
70
+ <tr>
71
+ <th><kbd>$module</kbd></th>
72
+ <td><i>required</i></td>
73
+ <td>Name of the module to be loaded, or an array of modules.</td>
74
+ </tr>
75
+ <tr>
76
+ <th><kbd>$path</kbd></th>
77
+ <td><code>null</code></td>
78
+ <td>Path to the given module. You can use this to load modules from outside the defined module paths.</td>
79
+ </tr>
80
+ </table>
81
+ </td>
82
+ </tr>
83
+ <tr>
84
+ <th>Returns</th>
85
+ <td><i>void</i></td>
86
+ </tr>
87
+ <tr>
88
+ <th>Example</th>
89
+ <td>
90
+ <pre class="php"><code>// load a users module
91
+ Module::load('users');
92
+
93
+ // load the users module from a specific directory
94
+ Module::load('users', '/path/to/modules/users/');
95
+
96
+ // load multiple modules from a single module installation
97
+ Module::load( array('Users' => '/path/to/modules/users/', 'Groups' => '/path/to/modules/groups/') );
98
+
99
+ // load the non-existent module
100
+ Module::load('awesome'); // Throws a ModuleNotFoundException
101
+ </code></pre>
102
+ </td>
103
+ </tr>
104
+ </tbody>
105
+ </table>
106
+ </article>
107
+
108
+ <article>
109
+ <h4 class="method" id="method_unload">unload($module)</h4>
110
+ <p>The <strong>unload</strong> method allows you to unload a module at runtime.</p>
111
+ <table class="method">
112
+ <tbody>
113
+ <tr>
114
+ <th class="legend">Static</th>
115
+ <td>Yes</td>
116
+ </tr>
117
+ <tr>
118
+ <th>Parameters</th>
119
+ <td>
120
+ <table class="parameters">
121
+ <tr>
122
+ <th>Param</th>
123
+ <th>Default</th>
124
+ <th class="description">Description</th>
125
+ </tr>
126
+ <tr>
127
+ <th><kbd>$module</kbd></th>
128
+ <td><i>required</i></td>
129
+ <td>Name of the module to be unloaded.</td>
130
+ </tr>
131
+ </table>
132
+ </td>
133
+ </tr>
134
+ <tr>
135
+ <th>Returns</th>
136
+ <td><i>void</i></td>
137
+ </tr>
138
+ <tr>
139
+ <th>Example</th>
140
+ <td>
141
+ <pre class="php"><code>// unload the users module
142
+ Module::unload('users');
143
+ </code></pre>
144
+ </td>
145
+ </tr>
146
+ </tbody>
147
+ </table>
148
+
149
+ <p class="note">This will remove all loaded routes that point to this module!</p>
150
+ </article>
151
+
152
+ <article>
153
+ <h4 class="method" id="method_loaded">loaded($module = null)</h4>
154
+ <p>The <strong>loaded</strong> method allows you to check if a module is currently loaded. If no module name is given then all loaded module are returned.</p>
155
+ <table class="method">
156
+ <tbody>
157
+ <tr>
158
+ <th class="legend">Static</th>
159
+ <td>Yes</td>
160
+ </tr>
161
+ <tr>
162
+ <th>Parameters</th>
163
+ <td>
164
+ <table class="parameters">
165
+ <tr>
166
+ <th>Param</th>
167
+ <th>Default</th>
168
+ <th class="description">Description</th>
169
+ </tr>
170
+ <tr>
171
+ <th><kbd>$module</kbd></th>
172
+ <td><kbd>null</kbd></td>
173
+ <td>Name of the module to be checked.</td>
174
+ </tr>
175
+ </table>
176
+ </td>
177
+ </tr>
178
+ <tr>
179
+ <th>Returns</th>
180
+ <td><kbd>bool|array</kbd></td>
181
+ </tr>
182
+ <tr>
183
+ <th>Example</th>
184
+ <td>
185
+ <pre class="php"><code>// Check if the users module is loaded
186
+ $loaded = Module::loaded('users');
187
+
188
+ // Get all loaded modules
189
+ $loaded = Module::loaded();
190
+ /*
191
+ Returns something like:
192
+ array(
193
+ 'users' => '/path/to/users',
194
+ 'groups' => '/path/to/groups',
195
+ )
196
+ */
197
+ </code></pre>
198
+ </td>
199
+ </tr>
200
+ </tbody>
201
+ </table>
202
+ </article>
203
+
204
+ <article>
205
+ <h4 class="method" id="method_exists">exists($module)</h4>
206
+ <p>
207
+ The <strong>exists</strong> method allows you to check if a module exists, i.e. if it can be found in one of the configured module paths.
208
+ If found, it returns the path to the module. If not, it returns <strong>false</strong>.
209
+ </p>
210
+ <table class="method">
211
+ <tbody>
212
+ <tr>
213
+ <th class="legend">Static</th>
214
+ <td>Yes</td>
215
+ </tr>
216
+ <tr>
217
+ <th>Parameters</th>
218
+ <td>
219
+ <table class="parameters">
220
+ <tr>
221
+ <th>Param</th>
222
+ <th>Default</th>
223
+ <th class="description">Description</th>
224
+ </tr>
225
+ <tr>
226
+ <th><kbd>$module</kbd></th>
227
+ <td><kbd>null</kbd></td>
228
+ <td>Name of the module to be checked.</td>
229
+ </tr>
230
+ </table>
231
+ </td>
232
+ </tr>
233
+ <tr>
234
+ <th>Returns</th>
235
+ <td><kbd>bool|string</kbd></td>
236
+ </tr>
237
+ <tr>
238
+ <th>Example</th>
239
+ <td>
240
+ <pre class="php"><code>// Optionally load the comments module
241
+ if (Module::exists('comments'))
242
+ {
243
+ Module::load('comments');
244
+ }
245
+ </code></pre>
246
+ </td>
247
+ </tr>
248
+ </tbody>
249
+ </table>
250
+ </article>
251
+
252
+ </div>
253
+
254
+ <footer>
255
+ <p>
256
+ &copy; FuelPHP Development Team 2010-2013 - <a href="http://fuelphp.com">FuelPHP</a> is released under the MIT license.
257
+ </p>
258
+ </footer>
259
+ </div>
260
+ </body>
261
+ </html>
benchmark/NYU_CTF_Bench/development/2013/CSAW-Finals/web/historypeats/csaw/docs/classes/num.html ADDED
@@ -0,0 +1,616 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <!doctype html>
2
+ <html lang="en">
3
+ <head>
4
+ <meta charset="UTF-8">
5
+ <meta name="viewport" content="width=device-width, initial-scale=1.0">
6
+ <link rel="stylesheet" href="./../assets/css/combined.css">
7
+ <link rel="shortcut icon" href="./../favicon.ico" />
8
+ <script src="http://www.google.com/jsapi" type="text/javascript"></script>
9
+ <script type="text/javascript">
10
+ var path = './../';
11
+ var class_prefix = "Num::";
12
+ </script>
13
+ <script src="./../assets/js/combined.js"></script>
14
+ <title>Num - Classes - FuelPHP Documentation</title>
15
+ </head>
16
+ <body>
17
+ <div id="container">
18
+ <header id="header">
19
+ <div class="table">
20
+ <h1>
21
+ <strong>FuelPHP, a PHP 5.3 Framework</strong>
22
+ Documentation
23
+ </h1>
24
+
25
+ <form id="google_search">
26
+ <p>
27
+ <span id="search_clear">&nbsp;</span>
28
+ <input type="submit" name="search_submit" id="search_submit" value="search" />
29
+ <input type="text" value="" id="search_input" name="search_input" />
30
+ </p>
31
+ </form>
32
+ </div>
33
+ <nav>
34
+
35
+ <div class="clear"></div>
36
+ </nav>
37
+ <a href="#" id="toc_handle">table of contents</a>
38
+ <div class="clear"></div>
39
+ </header>
40
+
41
+ <div id="cse">
42
+ <div id="cse_point"></div>
43
+ <div id="cse_content"></div>
44
+ </div>
45
+
46
+ <div id="main">
47
+
48
+ <h2 id="num_class">Num Class</h2>
49
+
50
+ <p>The Num class provides additional formatting methods for working with numeric values</p>
51
+
52
+ <h3 id="config">Configuration</h3>
53
+
54
+ <p>
55
+ The Num class provides different methods to format certain types of numbers.
56
+ Formats are strings where zero's represent the numeric parts of the returned value.
57
+ </p>
58
+
59
+ <p class="note">
60
+ <strong>Note:</strong> when changing the num config, copy the file to app/config/num.php and change
61
+ the settings there to allow easy upgrading without loosing your custom settings.
62
+ </p>
63
+
64
+ <table class="config">
65
+ <tbody>
66
+ <tr class="header">
67
+ <th>Key</th>
68
+ <th>Type</th>
69
+ <th>Default</th>
70
+ <th>Description</th>
71
+ </tr>
72
+ <tr>
73
+ <th>phone</th>
74
+ <td>string</td>
75
+ <td><pre class="php"><code>'(000) 000-0000'</code></pre></td>
76
+ <td>
77
+ The default phone number formatting.
78
+ </td>
79
+ </tr>
80
+ <tr>
81
+ <th>smart_phone</th>
82
+ <td>array</td>
83
+ <td><pre class="php"><code>array(
84
+ 7 => '000-0000',
85
+ 10 => '(000) 000-0000',
86
+ 11 => '0 (000) 000-0000',
87
+ ),</code></pre></td>
88
+ <td>
89
+ Phone number formatting based on the length of the phonenumber. array(length => formatting)
90
+ </td>
91
+ </tr>
92
+ <tr>
93
+ <th>exp</th>
94
+ <td>string</td>
95
+ <td><pre class="php"><code>'00-00'</code></pre></td>
96
+ <td>
97
+ Default formatting for credit card expiration date.
98
+ </td>
99
+ </tr>
100
+ <tr>
101
+ <th>credit_card</th>
102
+ <td>string</td>
103
+ <td><pre class="php"><code>'00-00'</code></pre></td>
104
+ <td>
105
+ Default formatting for credit card number masking.
106
+ </td>
107
+ </tr>
108
+ </tbody>
109
+ </table>
110
+
111
+ <article>
112
+ <h4 class="method" id="method_bytes">bytes($size = 0)</h4>
113
+ <p>
114
+ The <strong>bytes</strong> method converts a (file size) number to a byte value. File sizes are
115
+ defined in the format: SB, where S is the size (1, 8.5, 300, etc.) and B is the byte unit
116
+ (K, MiB, GB, etc.). All valid byte units are defined in <em>core/lang/en/byte_units.php</em>
117
+ </p>
118
+ <table class="method">
119
+ <tbody>
120
+ <tr>
121
+ <th class="legend">Static</th>
122
+ <td>Yes</td>
123
+ </tr>
124
+ <tr>
125
+ <th>Parameters</th>
126
+ <td>
127
+ <table class="parameters">
128
+ <tr>
129
+ <th>Param</th>
130
+ <th>Type</th>
131
+ <th>Default</th>
132
+ <th class="description">Description</th>
133
+ </tr>
134
+ <tr>
135
+ <th><kbd>$size</kbd></th>
136
+ <th><em>string|int|float</em></th>
137
+ <td><pre class="php"><code>0</code></pre></td>
138
+ <td>The string to convert.</td>
139
+ </tr>
140
+ </table>
141
+ </td>
142
+ </tr>
143
+ <tr>
144
+ <th>Returns</th>
145
+ <td>float</td>
146
+ </tr>
147
+ <tr>
148
+ <th>Example</th>
149
+ <td>
150
+ <pre class="php"><code>echo Num::bytes('200K'); // 204800
151
+ echo Num::bytes('5MiB'); // 5242880
152
+ echo Num::bytes('1000'); // 1000
153
+ echo Num::bytes('2.5GB'); // 2684354560</code></pre>
154
+ </td>
155
+ </tr>
156
+ </tbody>
157
+ </table>
158
+ </article>
159
+
160
+ <article>
161
+ <h4 class="method" id="method_format_bytes">format_bytes($bytes = 0, $decimals = 0)</h4>
162
+ <p>
163
+ The <strong>format_bytes</strong> method converts a number of bytes to a human readable format.
164
+ </p>
165
+ <table class="method">
166
+ <tbody>
167
+ <tr>
168
+ <th class="legend">Static</th>
169
+ <td>Yes</td>
170
+ </tr>
171
+ <tr>
172
+ <th>Parameters</th>
173
+ <td>
174
+ <table class="parameters">
175
+ <tr>
176
+ <th>Param</th>
177
+ <th>Type</th>
178
+ <th>Default</th>
179
+ <th class="description">Description</th>
180
+ </tr>
181
+ <tr>
182
+ <th><kbd>$bytes</kbd></th>
183
+ <th><em>int</em></th>
184
+ <td><pre class="php"><code>0</code></pre></td>
185
+ <td>The number to format.</td>
186
+ </tr>
187
+ <tr>
188
+ <th><kbd>$decimals</kbd></th>
189
+ <th><em>int</em></th>
190
+ <td><pre class="php"><code>0</code></pre></td>
191
+ <td>The number of decimals to round up to.</td>
192
+ </tr>
193
+ </table>
194
+ </td>
195
+ </tr>
196
+ <tr>
197
+ <th>Returns</th>
198
+ <td>string|false</td>
199
+ </tr>
200
+ <tr>
201
+ <th>Example</th>
202
+ <td>
203
+ <pre class="php"><code>echo Num::format_bytes('204800'); // 200 kB
204
+ echo Num::format_bytes('214901', 1); // 209.9 kB
205
+ echo Num::format_bytes('2249010', 1); // 2.1 MB
206
+ echo Num::format_bytes('badbytes'); // false
207
+ </code></pre>
208
+ </td>
209
+ </tr>
210
+ </tbody>
211
+ </table>
212
+ </article>
213
+
214
+ <article>
215
+ <h4 class="method" id="method_quantity">quantity($num, $decimals = 0)</h4>
216
+ <p>
217
+ The <strong>quantity</strong> method converts a number to a human readable format.
218
+ </p>
219
+ <table class="method">
220
+ <tbody>
221
+ <tr>
222
+ <th class="legend">Static</th>
223
+ <td>Yes</td>
224
+ </tr>
225
+ <tr>
226
+ <th>Parameters</th>
227
+ <td>
228
+ <table class="parameters">
229
+ <tr>
230
+ <th>Param</th>
231
+ <th>Type</th>
232
+ <th>Default</th>
233
+ <th class="description">Description</th>
234
+ </tr>
235
+ <tr>
236
+ <th><kbd>$num</kbd></th>
237
+ <th><em>int</em></th>
238
+ <td><em>required</em></td>
239
+ <td>The number to format.</td>
240
+ </tr>
241
+ <tr>
242
+ <th><kbd>$decimals</kbd></th>
243
+ <th><em>int</em></th>
244
+ <td><pre class="php"><code>0</code></pre></td>
245
+ <td>The number of decimals to round up to.</td>
246
+ </tr>
247
+ </table>
248
+ </td>
249
+ </tr>
250
+ <tr>
251
+ <th>Returns</th>
252
+ <td>string|false</td>
253
+ </tr>
254
+ <tr>
255
+ <th>Example</th>
256
+ <td>
257
+ <pre class="php"><code>echo Num::quantity(7000); // 7K
258
+ echo Num::quantity(7500); // 8K
259
+ echo Num::quantity(7500, 1); // 7.5K
260
+ echo Num::quantity('badnumber'); // false
261
+ </code></pre>
262
+ </td>
263
+ </tr>
264
+ </tbody>
265
+ </table>
266
+ </article>
267
+
268
+ <article>
269
+ <h4 class="method" id="method_format">format($string = '', $format = '')</h4>
270
+ <p>
271
+ The <strong>format</strong> method converts a number to a given format.
272
+ </p>
273
+ <table class="method">
274
+ <tbody>
275
+ <tr>
276
+ <th class="legend">Static</th>
277
+ <td>Yes</td>
278
+ </tr>
279
+ <tr>
280
+ <th>Parameters</th>
281
+ <td>
282
+ <table class="parameters">
283
+ <tr>
284
+ <th>Param</th>
285
+ <th>Type</th>
286
+ <th>Default</th>
287
+ <th class="description">Description</th>
288
+ </tr>
289
+ <tr>
290
+ <th><kbd>$string</kbd></th>
291
+ <th><em>string</em></th>
292
+ <td><pre class="php"><code>''</code></pre></td>
293
+ <td>The number to format.</td>
294
+ </tr>
295
+ <tr>
296
+ <th><kbd>$format</kbd></th>
297
+ <th><em>string</em></th>
298
+ <td><pre class="php"><code>''</code></pre></td>
299
+ <td>The format.</td>
300
+ </tr>
301
+ </table>
302
+ </td>
303
+ </tr>
304
+ <tr>
305
+ <th>Returns</th>
306
+ <td>string</td>
307
+ </tr>
308
+ <tr>
309
+ <th>Example</th>
310
+ <td>
311
+ <pre class="php"><code>echo Num::format('1234567890', '(000) 000-0000'); // (123) 456-7890
312
+ echo Num::format('1234567890', '000.000.0000'); // 123.456.7890
313
+ echo Num::format('1234567890', '000.000.0000'); // 123.456.7890
314
+ echo Num::format('1', '000.000.000'); // 1..
315
+ </code></pre>
316
+ </td>
317
+ </tr>
318
+ </tbody>
319
+ </table>
320
+ </article>
321
+
322
+ <article>
323
+ <h4 class="method" id="method_mask_string">mask_string($string = '', $format = '', $ignore = ' ')</h4>
324
+ <p>
325
+ The <strong>mask_string</strong> method converts a number to a given format.
326
+ </p>
327
+ <table class="method">
328
+ <tbody>
329
+ <tr>
330
+ <th class="legend">Static</th>
331
+ <td>Yes</td>
332
+ </tr>
333
+ <tr>
334
+ <th>Parameters</th>
335
+ <td>
336
+ <table class="parameters">
337
+ <tr>
338
+ <th>Param</th>
339
+ <th>Type</th>
340
+ <th>Default</th>
341
+ <th class="description">Description</th>
342
+ </tr>
343
+ <tr>
344
+ <th><kbd>$string</kbd></th>
345
+ <th><em>string</em></th>
346
+ <td><pre class="php"><code>''</code></pre></td>
347
+ <td>The number to format.</td>
348
+ </tr>
349
+ <tr>
350
+ <th><kbd>$format</kbd></th>
351
+ <th><em>string</em></th>
352
+ <td><pre class="php"><code>''</code></pre></td>
353
+ <td>The format.</td>
354
+ </tr>
355
+ <tr>
356
+ <th><kbd>$ignore</kbd></th>
357
+ <th><em>string</em></th>
358
+ <td><pre class="php"><code>''</code></pre></td>
359
+ <td>Characters to ignore.</td>
360
+ </tr>
361
+ </table>
362
+ </td>
363
+ </tr>
364
+ <tr>
365
+ <th>Returns</th>
366
+ <td>string</td>
367
+ </tr>
368
+ <tr>
369
+ <th>Example</th>
370
+ <td>
371
+ <pre class="php"><code>echo Num::mask_string('1234567812345678', '************0000');
372
+ // ************5678
373
+
374
+ echo Num::mask_string('1234567812345678', '**** **** **** 0000');
375
+ // **** **** **** 5678
376
+
377
+ echo Num::mask_string('1234567812345678', '**** - **** - **** - 0000', ' -');
378
+ // **** - **** - **** - 5678
379
+ </code></pre>
380
+ </td>
381
+ </tr>
382
+ </tbody>
383
+ </table>
384
+ </article>
385
+
386
+ <article>
387
+ <h4 class="method" id="method_format_phone">format_phone($string = '', $format = null)</h4>
388
+ <p>
389
+ The <strong>format_phone</strong> method converts a number to a phone number format.
390
+ </p>
391
+ <table class="method">
392
+ <tbody>
393
+ <tr>
394
+ <th class="legend">Static</th>
395
+ <td>Yes</td>
396
+ </tr>
397
+ <tr>
398
+ <th>Parameters</th>
399
+ <td>
400
+ <table class="parameters">
401
+ <tr>
402
+ <th>Param</th>
403
+ <th>Type</th>
404
+ <th>Default</th>
405
+ <th class="description">Description</th>
406
+ </tr>
407
+ <tr>
408
+ <th><kbd>$string</kbd></th>
409
+ <th><em>string</em></th>
410
+ <td><pre class="php"><code>''</code></pre></td>
411
+ <td>The number to format.</td>
412
+ </tr>
413
+ <tr>
414
+ <th><kbd>$format</kbd></th>
415
+ <th><em>string</em></th>
416
+ <td><pre class="php"><code>null</code></pre></td>
417
+ <td>The format. When <em>null</em> it defaults to the <strong>format_phone</strong> config setting.</td>
418
+ </tr>
419
+ </table>
420
+ </td>
421
+ </tr>
422
+ <tr>
423
+ <th>Returns</th>
424
+ <td>string</td>
425
+ </tr>
426
+ <tr>
427
+ <th>Example</th>
428
+ <td>
429
+ <pre class="php"><code>echo Num::format_phone('0612345678');
430
+ // (061) 234 5678
431
+
432
+ echo Num::format_phone('0612345678', '(00) 000 000 00');
433
+ // (06) 123 456 78
434
+ </code></pre>
435
+ </td>
436
+ </tr>
437
+ </tbody>
438
+ </table>
439
+ </article>
440
+
441
+ <article>
442
+ <h4 class="method" id="method_smart_format_phone">smart_format_phone($string)</h4>
443
+ <p>
444
+ The <strong>smart_format_phone</strong> method converts a number
445
+ to a phone number format based on the length of the number.
446
+ </p>
447
+ <p class="note">
448
+ <strong>Note:</strong> the numbers are formatted based on length,
449
+ these are defined in the <a href="#config">num config</a>.
450
+ </p>
451
+ <table class="method">
452
+ <tbody>
453
+ <tr>
454
+ <th class="legend">Static</th>
455
+ <td>Yes</td>
456
+ </tr>
457
+ <tr>
458
+ <th>Parameters</th>
459
+ <td>
460
+ <table class="parameters">
461
+ <tr>
462
+ <th>Param</th>
463
+ <th>Type</th>
464
+ <th>Default</th>
465
+ <th class="description">Description</th>
466
+ </tr>
467
+ <tr>
468
+ <th><kbd>$string</kbd></th>
469
+ <th><em>string</em></th>
470
+ <td><em>required</em></td>
471
+ <td>The number to format.</td>
472
+ </tr>
473
+ </table>
474
+ </td>
475
+ </tr>
476
+ <tr>
477
+ <th>Returns</th>
478
+ <td>string</td>
479
+ </tr>
480
+ <tr>
481
+ <th>Example</th>
482
+ <td>
483
+ <pre class="php"><code>echo Num::smart_format_phone('1234567');
484
+ // 123-4567
485
+
486
+ echo Num::smart_format_phone('01234567890');
487
+ // 0 (123) 456-7890
488
+ </code></pre>
489
+ </td>
490
+ </tr>
491
+ </tbody>
492
+ </table>
493
+ </article>
494
+
495
+ <article>
496
+ <h4 class="method" id="method_format_exp">format_exp($string, $format = null)</h4>
497
+ <p>
498
+ The <strong>format_exp</strong> method converts a number to a credit card expiration string.
499
+ </p>
500
+ <p class="note">
501
+ <strong>Note:</strong> this method expects 4 digits to be supplied.
502
+ </p>
503
+ <table class="method">
504
+ <tbody>
505
+ <tr>
506
+ <th class="legend">Static</th>
507
+ <td>Yes</td>
508
+ </tr>
509
+ <tr>
510
+ <th>Parameters</th>
511
+ <td>
512
+ <table class="parameters">
513
+ <tr>
514
+ <th>Param</th>
515
+ <th>Type</th>
516
+ <th>Default</th>
517
+ <th class="description">Description</th>
518
+ </tr>
519
+ <tr>
520
+ <th><kbd>$string</kbd></th>
521
+ <th><em>string</em></th>
522
+ <td><em>required</em></td>
523
+ <td>The number to format.</td>
524
+ </tr>
525
+ <tr>
526
+ <th><kbd>$format</kbd></th>
527
+ <th><em>string</em></th>
528
+ <td><pre class="php"><code>null</code></pre></td>
529
+ <td>The format. When <em>null</em> it defaults to the <strong>exp</strong> config setting.</td>
530
+ </tr>
531
+ </table>
532
+ </td>
533
+ </tr>
534
+ <tr>
535
+ <th>Returns</th>
536
+ <td>string</td>
537
+ </tr>
538
+ <tr>
539
+ <th>Example</th>
540
+ <td>
541
+ <pre class="php"><code>echo Num::format_exp('1234');
542
+ // 12-34
543
+
544
+ echo Num::format_exp('1234', '00/00');
545
+ // 12/34
546
+ </code></pre>
547
+ </td>
548
+ </tr>
549
+ </tbody>
550
+ </table>
551
+ </article>
552
+
553
+ <article>
554
+ <h4 class="method" id="method_mask_credit_card">mask_credit_card($string, $format = null)</h4>
555
+ <p>
556
+ The <strong>mask_credit_card</strong> method masks a credit card number.
557
+ </p>
558
+ <table class="method">
559
+ <tbody>
560
+ <tr>
561
+ <th class="legend">Static</th>
562
+ <td>Yes</td>
563
+ </tr>
564
+ <tr>
565
+ <th>Parameters</th>
566
+ <td>
567
+ <table class="parameters">
568
+ <tr>
569
+ <th>Param</th>
570
+ <th>Type</th>
571
+ <th>Default</th>
572
+ <th class="description">Description</th>
573
+ </tr>
574
+ <tr>
575
+ <th><kbd>$string</kbd></th>
576
+ <th><em>string</em></th>
577
+ <td><pre class="php"><code>''</code></pre></td>
578
+ <td>The number to format.</td>
579
+ </tr>
580
+ <tr>
581
+ <th><kbd>$format</kbd></th>
582
+ <th><em>string</em></th>
583
+ <td><pre class="php"><code>null</code></pre></td>
584
+ <td>The format. When <em>null</em> it defaults to the <strong>credit_card</strong> config setting.</td>
585
+ </tr>
586
+ </table>
587
+ </td>
588
+ </tr>
589
+ <tr>
590
+ <th>Returns</th>
591
+ <td>string</td>
592
+ </tr>
593
+ <tr>
594
+ <th>Example</th>
595
+ <td>
596
+ <pre class="php"><code>echo Num::mask_credit_card('1234263583742938');
597
+ // **** **** **** 2938
598
+
599
+ echo Num::mask_credit_card('1234123412341234', '0000 **** **** ****');
600
+ // 1234 **** **** ****</code></pre>
601
+ </td>
602
+ </tr>
603
+ </tbody>
604
+ </table>
605
+ </article>
606
+
607
+ </div>
608
+
609
+ <footer>
610
+ <p>
611
+ &copy; FuelPHP Development Team 2010-2013 - <a href="http://fuelphp.com">FuelPHP</a> is released under the MIT license.
612
+ </p>
613
+ </footer>
614
+ </div>
615
+ </body>
616
+ </html>
benchmark/NYU_CTF_Bench/development/2013/CSAW-Finals/web/historypeats/csaw/docs/classes/package.html ADDED
@@ -0,0 +1,211 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <!doctype html>
2
+ <html lang="en">
3
+ <head>
4
+ <meta charset="UTF-8">
5
+ <meta name="viewport" content="width=device-width, initial-scale=1.0">
6
+ <link rel="stylesheet" href="./../assets/css/combined.css">
7
+ <link rel="shortcut icon" href="./../favicon.ico" />
8
+ <script src="http://www.google.com/jsapi" type="text/javascript"></script>
9
+ <script type="text/javascript">
10
+ var path = './../';
11
+ var class_prefix = "Package::";
12
+ </script>
13
+ <script src="./../assets/js/combined.js"></script>
14
+ <title>Package - Classes - FuelPHP Documentation</title>
15
+ </head>
16
+ <body>
17
+ <div id="container">
18
+ <header id="header">
19
+ <div class="table">
20
+ <h1>
21
+ <strong>FuelPHP, a PHP 5.3 Framework</strong>
22
+ Documentation
23
+ </h1>
24
+
25
+ <form id="google_search">
26
+ <p>
27
+ <span id="search_clear">&nbsp;</span>
28
+ <input type="submit" name="search_submit" id="search_submit" value="search" />
29
+ <input type="text" value="" id="search_input" name="search_input" />
30
+ </p>
31
+ </form>
32
+ </div>
33
+ <nav>
34
+
35
+ <div class="clear"></div>
36
+ </nav>
37
+ <a href="#" id="toc_handle">table of contents</a>
38
+ <div class="clear"></div>
39
+ </header>
40
+
41
+ <div id="cse">
42
+ <div id="cse_point"></div>
43
+ <div id="cse_content"></div>
44
+ </div>
45
+
46
+ <div id="main">
47
+
48
+ <h2>Package Class</h2>
49
+
50
+ <p>The <kbd>Package</kbd> class allows you to easily load, unload, check if a package is loaded, or get all packages loaded.</p>
51
+
52
+ <article>
53
+ <h4 class="method" id="method_load">load($package, $path = null)</h4>
54
+ <p>The <strong>load</strong> method allows you to load one or more packages at runtime. If the package cannot be found a <kbd>PackageNotFoundException</kbd> will be thrown.</p>
55
+ <table class="method">
56
+ <tbody>
57
+ <tr>
58
+ <th class="legend">Static</th>
59
+ <td>Yes</td>
60
+ </tr>
61
+ <tr>
62
+ <th>Parameters</th>
63
+ <td>
64
+ <table class="parameters">
65
+ <tr>
66
+ <th>Param</th>
67
+ <th>Default</th>
68
+ <th class="description">Description</th>
69
+ </tr>
70
+ <tr>
71
+ <th><kbd>$package</kbd></th>
72
+ <td><i>required</i></td>
73
+ <td>Name of the package to be loaded, or an array of packages and package paths.</td>
74
+ </tr>
75
+ <tr>
76
+ <th><kbd>$path</kbd></th>
77
+ <td><code>PKGPATH</code></td>
78
+ <td>Path to the folder in which the package is installed.</td>
79
+ </tr>
80
+ </table>
81
+ </td>
82
+ </tr>
83
+ <tr>
84
+ <th>Returns</th>
85
+ <td><i>void</i></td>
86
+ </tr>
87
+ <tr>
88
+ <th>Example</th>
89
+ <td>
90
+ <pre class="php"><code>// load the orm package
91
+ Package::load('orm');
92
+
93
+ // load the parser package from a specific directory
94
+ Package::load('parser', '/path/to/packages/dir/');
95
+
96
+ // load multiple packages from a single package installation
97
+ Package::load( array('First' => PKGPATH.'my'.DS.'first'.DS, 'Last' => PKGPATH.'my'.DS.'last'.DS) );
98
+
99
+ // load the non-existent package
100
+ Package::load('awesome'); // Throws a PackageNotFoundException
101
+ </code></pre>
102
+ </td>
103
+ </tr>
104
+ </tbody>
105
+ </table>
106
+ </article>
107
+
108
+ <article>
109
+ <h4 class="method" id="method_unload">unload($package)</h4>
110
+ <p>The <strong>unload</strong> method allows you to unload a package at runtime.</p>
111
+ <table class="method">
112
+ <tbody>
113
+ <tr>
114
+ <th class="legend">Static</th>
115
+ <td>Yes</td>
116
+ </tr>
117
+ <tr>
118
+ <th>Parameters</th>
119
+ <td>
120
+ <table class="parameters">
121
+ <tr>
122
+ <th>Param</th>
123
+ <th>Default</th>
124
+ <th class="description">Description</th>
125
+ </tr>
126
+ <tr>
127
+ <th><kbd>$package</kbd></th>
128
+ <td><i>required</i></td>
129
+ <td>Name of the package to be unloaded.</td>
130
+ </tr>
131
+ </table>
132
+ </td>
133
+ </tr>
134
+ <tr>
135
+ <th>Returns</th>
136
+ <td><i>void</i></td>
137
+ </tr>
138
+ <tr>
139
+ <th>Example</th>
140
+ <td>
141
+ <pre class="php"><code>// unload the orm package
142
+ Package::unload('orm');
143
+ </code></pre>
144
+ </td>
145
+ </tr>
146
+ </tbody>
147
+ </table>
148
+ </article>
149
+
150
+ <article>
151
+ <h4 class="method" id="method_loaded">loaded($package = null)</h4>
152
+ <p>The <strong>loaded</strong> method allows you to check if a package is currently loaded. If no package name is given then all loaded packages are returned.</p>
153
+ <table class="method">
154
+ <tbody>
155
+ <tr>
156
+ <th class="legend">Static</th>
157
+ <td>Yes</td>
158
+ </tr>
159
+ <tr>
160
+ <th>Parameters</th>
161
+ <td>
162
+ <table class="parameters">
163
+ <tr>
164
+ <th>Param</th>
165
+ <th>Default</th>
166
+ <th class="description">Description</th>
167
+ </tr>
168
+ <tr>
169
+ <th><kbd>$package</kbd></th>
170
+ <td><kbd>null</kbd></td>
171
+ <td>Name of the package to be checked.</td>
172
+ </tr>
173
+ </table>
174
+ </td>
175
+ </tr>
176
+ <tr>
177
+ <th>Returns</th>
178
+ <td><kbd>bool|array</kbd></td>
179
+ </tr>
180
+ <tr>
181
+ <th>Example</th>
182
+ <td>
183
+ <pre class="php"><code>// Check if the orm package is loaded
184
+ $loaded = Package::loaded('orm');
185
+
186
+ // Get all loaded packages
187
+ $loaded = Package::loaded();
188
+ /*
189
+ Returns something like:
190
+ array(
191
+ 'orm' => '/path/to/orm',
192
+ 'parser' => '/path/to/parser',
193
+ )
194
+ */
195
+ </code></pre>
196
+ </td>
197
+ </tr>
198
+ </tbody>
199
+ </table>
200
+ </article>
201
+
202
+ </div>
203
+
204
+ <footer>
205
+ <p>
206
+ &copy; FuelPHP Development Team 2010-2013 - <a href="http://fuelphp.com">FuelPHP</a> is released under the MIT license.
207
+ </p>
208
+ </footer>
209
+ </div>
210
+ </body>
211
+ </html>
benchmark/NYU_CTF_Bench/development/2013/CSAW-Finals/web/historypeats/csaw/docs/classes/pagination.html ADDED
@@ -0,0 +1,885 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <!doctype html>
2
+ <html lang="en">
3
+ <head>
4
+ <meta charset="UTF-8">
5
+ <meta name="viewport" content="width=device-width, initial-scale=1.0">
6
+ <link rel="stylesheet" href="./../assets/css/combined.css">
7
+ <link rel="shortcut icon" href="./../favicon.ico" />
8
+ <script src="http://www.google.com/jsapi" type="text/javascript"></script>
9
+ <script type="text/javascript">
10
+ var path = './../';
11
+ var class_prefix = "Pagination::";
12
+ </script>
13
+ <script src="./../assets/js/combined.js"></script>
14
+ <title>Pagination - Classes - FuelPHP Documentation</title>
15
+ </head>
16
+ <body>
17
+ <div id="container">
18
+ <header id="header">
19
+ <div class="table">
20
+ <h1>
21
+ <strong>FuelPHP, a PHP 5.3 Framework</strong>
22
+ Documentation
23
+ </h1>
24
+
25
+ <form id="google_search">
26
+ <p>
27
+ <span id="search_clear">&nbsp;</span>
28
+ <input type="submit" name="search_submit" id="search_submit" value="search" />
29
+ <input type="text" value="" id="search_input" name="search_input" />
30
+ </p>
31
+ </form>
32
+ </div>
33
+ <nav>
34
+
35
+ <div class="clear"></div>
36
+ </nav>
37
+ <a href="#" id="toc_handle">table of contents</a>
38
+ <div class="clear"></div>
39
+ </header>
40
+
41
+ <div id="cse">
42
+ <div id="cse_point"></div>
43
+ <div id="cse_content"></div>
44
+ </div>
45
+
46
+ <div id="main">
47
+
48
+ <h2>Pagination Class</h2>
49
+
50
+ <p>The pagination class allows you to easily setup pagination for records you display.</p>
51
+
52
+ <section>
53
+ <h3 id="how_to">How To</h3>
54
+ <p>A simple example on how to use the Pagination class. You can put this inside your action methods in your controller.</p>
55
+
56
+ <pre class="php"><code>$config = array(
57
+ 'pagination_url' => 'http://localhost/fuel/welcome/index/',
58
+ 'total_items' => 10,
59
+ 'per_page' => 5,
60
+ 'uri_segment' => 3,
61
+ // or if you prefer pagination by query string
62
+ //'uri_segment' => 'page',
63
+ );
64
+
65
+ // Create a pagination instance named 'mypagination'
66
+ $pagination = Pagination::forge('mypagination', $config);
67
+
68
+ $data['example_data'] = DB::select('id', 'value')
69
+ ->from('pagination')
70
+ ->limit($pagination->per_page)
71
+ ->offset($pagination->offset)
72
+ ->execute()
73
+ ->as_array();
74
+
75
+ // we pass the object, it will be rendered when echo'd in the view
76
+ $data['pagination'] = $pagination;
77
+
78
+ // return the view
79
+ return \View::forge('welcome/index', $data);</code></pre>
80
+ </section>
81
+
82
+ <section>
83
+ <h3 id="configuration">Configuration</h3>
84
+
85
+ <p>
86
+ You can configure the pagination instance in several ways. You can pass an array with the configuration when you
87
+ <kbd>forge</kbd> the instance, or you can update the properties directly on the instance.
88
+ </p>
89
+ <p>The following configuration settings can be defined:</p>
90
+ <table class="config">
91
+ <tbody>
92
+ <tr class="header">
93
+ <th>Param</th>
94
+ <th>Type</th>
95
+ <th>Default</th>
96
+ <th>Description</th>
97
+ </tr>
98
+ <tr>
99
+ <th>pagination_url</th>
100
+ <td>string</td>
101
+ <td><pre class="php"><code>null</code></pre></td>
102
+ <td>
103
+ The URL of page where you have pagination. If null, Fuel tries to detect it from the current URL.
104
+ </td>
105
+ </tr>
106
+ <tr>
107
+ <th>uri_segment</th>
108
+ <td>integer|string</td>
109
+ <td><pre class="php"><code>3</code></pre></td>
110
+ <td>
111
+ The URI segment containing the page number (if integer). The query string field containing the page number (if string).
112
+ </td>
113
+ </tr>
114
+ <tr>
115
+ <th>num_links</th>
116
+ <td>integer</td>
117
+ <td><pre class="php"><code>5</code></pre></td>
118
+ <td>
119
+ The total number of links to show.
120
+ </td>
121
+ </tr>
122
+ <tr>
123
+ <th>total_items</th>
124
+ <td>integer</td>
125
+ <td><pre class="php"><code>0</code></pre></td>
126
+ <td>
127
+ The total number of items. Usually this is the result of a count() query.
128
+ </td>
129
+ </tr>
130
+ <tr>
131
+ <th>per_page</th>
132
+ <td>integer</td>
133
+ <td><pre class="php"><code>10</code></pre></td>
134
+ <td>
135
+ The number of items per page.
136
+ </td>
137
+ </tr>
138
+ <tr>
139
+ <th>current_page</th>
140
+ <td>integer</td>
141
+ <td><pre class="php"><code>null</code></pre></td>
142
+ <td>
143
+ The page to load if no page number is present in the URI. If not given, it defaults to 1.
144
+ </td>
145
+ </tr>
146
+ <tr>
147
+ <th>show_first</th>
148
+ <td>bool</td>
149
+ <td><pre class="php"><code>false</code></pre></td>
150
+ <td>
151
+ Generates a 'to the first page' link if true and not already on the first page.
152
+ </td>
153
+ </tr>
154
+ <tr>
155
+ <th>show_last</th>
156
+ <td>bool</td>
157
+ <td><pre class="php"><code>false</code></pre></td>
158
+ <td>
159
+ Generates a 'to the last page' link if true and not already on the last page.
160
+ </td>
161
+ </tr>
162
+ </tbody>
163
+ </table>
164
+ </section>
165
+
166
+ <section>
167
+ <h3 id="templating">Templating</h3>
168
+
169
+ <p>
170
+ Every pagination instance uses a template to generate the HTML needed to create the pagination markup.
171
+ You can store your standard templates in the <em>config/pagination.php</em> file. Copy the file from the
172
+ core config folder to your app config folder before you make any modifications. The default configuration
173
+ file comes with two templates, the FuelPHP default, and a Twitter Bootstrap v2 compatible template.
174
+ </p>
175
+ <p>The following template entries must be defined:</p>
176
+ <table class="config">
177
+ <tbody>
178
+ <tr>
179
+ <th>wrapper</th>
180
+ <td>string</td>
181
+ <td><pre class="html"><code>&lt;div class="pagination"&gt;\n\t{pagination}\n&lt;/div&gt;\n</code></pre></td>
182
+ <td>
183
+ Markup that will wrap the generated pagination markup.
184
+ </td>
185
+ </tr>
186
+ <tr>
187
+ <th>first</th>
188
+ <td>string</td>
189
+ <td><pre class="html"><code>&lt;span class="first"&gt;\n\t{link}\n&lt;/span&gt;\n</code></pre></td>
190
+ <td>
191
+ Markup that will be used to generate the first page markup.
192
+ </td>
193
+ </tr>
194
+ <tr>
195
+ <th>first-inactive</th>
196
+ <td>string</td>
197
+ <td>none</td>
198
+ <td>
199
+ Markup that will be used to generate the first page markup, if this page is first or single.
200
+ </td>
201
+ </tr>
202
+ <tr>
203
+ <th>first-inactive-link</th>
204
+ <td>string</td>
205
+ <td>none</td>
206
+ <td>
207
+ Markup that will be used to generate the first page link, if this page is first or single.
208
+ </td>
209
+ </tr>
210
+ <tr>
211
+ <th>first-marker</th>
212
+ <td>string</td>
213
+ <td><pre class="html"><code>&amp;laquo;&amp;laquo;</code></pre></td>
214
+ <td>
215
+ Markup that will be used to generate the marker of first page.
216
+ </td>
217
+ </tr>
218
+ <tr>
219
+ <th>first-link</th>
220
+ <td>string</td>
221
+ <td><pre class="html"><code>\t\t&lt;a href="{uri}"&gt;{page}&lt;/a&gt;\n</code></pre></td>
222
+ <td>
223
+ Markup that will be used to generate the first page link.
224
+ </td>
225
+ </tr>
226
+ <tr>
227
+ <th>previous</th>
228
+ <td>string</td>
229
+ <td><pre class="html"><code>&lt;span class="previous"&gt;\n\t{link}\n&lt;/span&gt;\n</code></pre></td>
230
+ <td>
231
+ Markup that will be used to generate the previous page markup.
232
+ </td>
233
+ </tr>
234
+ <tr>
235
+ <th>previous-marker</th>
236
+ <td>string</td>
237
+ <td><pre class="html"><code>&amp;laquo;</code></pre></td>
238
+ <td>
239
+ Markup that will be used to generate the marker of previous page.
240
+ </td>
241
+ </tr>
242
+ <tr>
243
+ <th>previous-link</th>
244
+ <td>string</td>
245
+ <td><pre class="html"><code>\t\t&lt;a href="{uri}" rel="prev"&gt;{page}&lt;/a&gt;\n</code></pre></td>
246
+ <td>
247
+ Markup that will be used to generate the previous page link.
248
+ </td>
249
+ </tr>
250
+ <tr>
251
+ <th>previous-inactive</th>
252
+ <td>string</td>
253
+ <td><pre class="html"><code>&lt;span class="previous-inactive"&gt;\n\t{link}\n&lt;/span&gt;\n</code></pre></td>
254
+ <td>
255
+ Markup that will be used to generate the previous page markup for inactive links.
256
+ </td>
257
+ </tr>
258
+ <tr>
259
+ <th>previous-inactive-link</th>
260
+ <td>string</td>
261
+ <td><pre class="html"><code>\t\t&lt;a href="{uri}" rel="prev"&gt;{page}&lt;/a&gt;\n</code></pre></td>
262
+ <td>
263
+ Markup that will be used to generate the previous page markup for inactive links.
264
+ </td>
265
+ </tr>
266
+ <tr>
267
+ <th>regular</th>
268
+ <td>string</td>
269
+ <td><pre class="html"><code>&lt;span&gt;\n\t{link}\n&lt;/span&gt;\n</code></pre></td>
270
+ <td>
271
+ Markup that will be used to generate the markup for other pages.
272
+ </td>
273
+ </tr>
274
+ <tr>
275
+ <th>regular-link</th>
276
+ <td>string</td>
277
+ <td><pre class="html"><code>\t\t&lt;a href="{uri}"&gt;{page}&lt;/a&gt;\n</code></pre></td>
278
+ <td>
279
+ Markup that will be used to generate the markup for other page links.
280
+ </td>
281
+ </tr>
282
+ <tr>
283
+ <th>active</th>
284
+ <td>string</td>
285
+ <td><pre class="html"><code>&lt;span class="active"&gt;\n\t{link}\n&lt;/span&gt;\n</code></pre></td>
286
+ <td>
287
+ Markup that will be used to generate the markup for the current page.
288
+ </td>
289
+ </tr>
290
+ <tr>
291
+ <th>active-link</th>
292
+ <td>string</td>
293
+ <td><pre class="html"><code>\t\t&lt;a href="{uri}"&gt;{page}&lt;/a&gt;\n</code></pre></td>
294
+ <td>
295
+ Markup that will be used to generate the markup for the link to the current page.
296
+ </td>
297
+ </tr>
298
+ <tr>
299
+ <th>next</th>
300
+ <td>string</td>
301
+ <td><pre class="html"><code>&lt;span class="next"&gt;\n\t{link}\n&lt;/span&gt;\n</code></pre></td>
302
+ <td>
303
+ Markup that will be used to generate the next page markup.
304
+ </td>
305
+ </tr>
306
+ <tr>
307
+ <th>next-marker</th>
308
+ <td>string</td>
309
+ <td><pre class="html"><code>&amp;raquo;</code></pre></td>
310
+ <td>
311
+ Markup that will be used to generate the marker of next page.
312
+ </td>
313
+ </tr>
314
+ <tr>
315
+ <th>next-link</th>
316
+ <td>string</td>
317
+ <td><pre class="html"><code>\t\t&lt;a href="{uri}" rel="next"&gt;{page}&lt;/a&gt;\n</code></pre></td>
318
+ <td>
319
+ Markup that will be used to generate the next page link.
320
+ </td>
321
+ </tr>
322
+ <tr>
323
+ <th>next-inactive</th>
324
+ <td>string</td>
325
+ <td><pre class="html"><code>&lt;span class="next-inactive"&gt;\n\t{link}\n&lt;/span&gt;\n</code></pre></td>
326
+ <td>
327
+ Markup that will be used to generate the next page markup for inactive links.
328
+ </td>
329
+ </tr>
330
+ <tr>
331
+ <th>next-inactive-link</th>
332
+ <td>string</td>
333
+ <td><pre class="html"><code>\t\t&lt;a href="{uri}" rel="next"&gt;{page}&lt;/a&gt;\n</code></pre></td>
334
+ <td>
335
+ Markup that will be used to generate the next page link for inactive links.
336
+ </td>
337
+ </tr>
338
+ <tr>
339
+ <th>last</th>
340
+ <td>string</td>
341
+ <td><pre class="html"><code>&lt;span class="last"&gt;\n\t{link}\n&lt;/span&gt;\n</code></pre></td>
342
+ <td>
343
+ Markup that will be used to generate the last page markup.
344
+ </td>
345
+ </tr>
346
+ <tr>
347
+ <th>last-marker</th>
348
+ <td>string</td>
349
+ <td><pre class="html"><code>&amp;raquo;&amp;raquo;</code></pre></td>
350
+ <td>
351
+ Markup that will be used to generate the marker of last page.
352
+ </td>
353
+ </tr>
354
+ <tr>
355
+ <th>last-link</th>
356
+ <td>string</td>
357
+ <td><pre class="html"><code>\t\t&lt;a href="{uri}"&gt;{page}&lt;/a&gt;\n</code></pre></td>
358
+ <td>
359
+ Markup that will be used to generate the last page link.
360
+ </td>
361
+ </tr>
362
+ <tr>
363
+ <th>last-inactive</th>
364
+ <td>string</td>
365
+ <td>none</td>
366
+ <td>
367
+ Markup that will be used to generate the last page markup, if this page is last or single.
368
+ </td>
369
+ </tr>
370
+ <tr>
371
+ <th>last-inactive-link</th>
372
+ <td>string</td>
373
+ <td>none</td>
374
+ <td>
375
+ Markup that will be used to generate the last page link, if this page is last or single.
376
+ </td>
377
+ </tr>
378
+ </tbody>
379
+ </table>
380
+ <p>
381
+ In the template, <strong>{uri}</strong> will be replaced by the generated pagination link
382
+ (by <strong>#</strong> if inactive template), and <strong>{page}</strong> by the page number
383
+ or the previous / next marker. If you want to use an image for these markers, just modify the corresponding
384
+ link definitions in the template, replacing <strong>{page}</strong> by the markup for the image.
385
+ </p>
386
+ <p class="note">
387
+ The configuration you pass when you forge the pagination instance will be merged with the default
388
+ template defined in your configuration file. This will allow you to only pass the values you want
389
+ to override. If your template in the configuration file is not complete, the default values as
390
+ mentioned above will be used.
391
+ </p>
392
+ </section>
393
+
394
+ <section>
395
+ <article>
396
+ <h4 class="method" id="method_forge">forge($name = 'default', $config = array())</h4>
397
+ <p>The <strong>forge</strong> method allows you to create a new pagination instance, and configure it by passing an array.</p>
398
+ <table class="method">
399
+ <tbody>
400
+ <tr>
401
+ <th class="legend">Static</th>
402
+ <td>Yes</td>
403
+ </tr>
404
+ <tr>
405
+ <th>Parameters</th>
406
+ <td>
407
+ <table class="parameters">
408
+ <tr>
409
+ <th>Param</th>
410
+ <th>Default</th>
411
+ <th class="description">Description</th>
412
+ </tr>
413
+ <tr>
414
+ <th><kbd>$name</kbd></th>
415
+ <td><i>Required</i></td>
416
+ <td>The name of the instance to be created. If no name is given, the 'default' instance is created.</td>
417
+ </tr>
418
+ <tr>
419
+ <th><kbd>$config</kbd></th>
420
+ <td><pre class="php"><code>array()</code></pre></td>
421
+ <td>The configuration array.</td>
422
+ </tr>
423
+ </table>
424
+ </td>
425
+ </tr>
426
+ <tr>
427
+ <th>Returns</th>
428
+ <td>Pagination</td>
429
+ </tr>
430
+ <tr>
431
+ <th>Example</th>
432
+ <td>
433
+ <pre class="php"><code>// create a new pagination instance
434
+ $pagination = Pagination::forge('mypagination', array(
435
+ 'pagination_url' => 'http://docs.fuelphp.com/',
436
+ 'uri_segment' => 2,
437
+ 'total_items' => 10,
438
+ 'per_page' => 20,
439
+ ));</code></pre>
440
+ </td>
441
+ </tr>
442
+ </tbody>
443
+ </table>
444
+ </article>
445
+
446
+ <article>
447
+ <h4 class="method" id="method_instance">instance($name = null)</h4>
448
+ <p>The <strong>instance</strong> method allows you retrieve a previously forged instance, or return the default instance if no name was given.</p>
449
+ <table class="method">
450
+ <tbody>
451
+ <tr>
452
+ <th class="legend">Static</th>
453
+ <td>Yes</td>
454
+ </tr>
455
+ <tr>
456
+ <th>Parameters</th>
457
+ <td>
458
+ <table class="parameters">
459
+ <tr>
460
+ <th>Param</th>
461
+ <th>Default</th>
462
+ <th class="description">Description</th>
463
+ </tr>
464
+ <tr>
465
+ <th><kbd>$name</kbd></th>
466
+ <td><pre class="php"><code>null</code></pre></td>
467
+ <td>The name of the instance to be returned. If no name is given, the 'default' instance is created.</td>
468
+ </tr>
469
+ </table>
470
+ </td>
471
+ </tr>
472
+ <tr>
473
+ <th>Returns</th>
474
+ <td>mixed. a Pagination object, or false if the requested instance does not exist.</td>
475
+ </tr>
476
+ <tr>
477
+ <th>Example</th>
478
+ <td>
479
+ <pre class="php"><code>// fetch the previously forged instance
480
+ $pagination = Pagination::instance('mypagination');</code></pre>
481
+ </td>
482
+ </tr>
483
+ </tbody>
484
+ </table>
485
+ </article>
486
+
487
+ <article>
488
+ <h4 class="method" id="method_render">render($raw = false)</h4>
489
+ <p>The <strong>render</strong> method generates the markup to display the pagination links in the view.</p>
490
+ <table class="method">
491
+ <tbody>
492
+ <tr>
493
+ <th class="legend">Static</th>
494
+ <td>No</td>
495
+ </tr>
496
+ <tr>
497
+ <th>Parameters</th>
498
+ <td>
499
+ <table class="parameters">
500
+ <tr>
501
+ <th>Param</th>
502
+ <th>Default</th>
503
+ <th class="description">Description</th>
504
+ </tr>
505
+ <tr>
506
+ <th><kbd>$raw</kbd></th>
507
+ <td><pre class="php"><code>false</code></pre></td>
508
+ <td>If true, an array with raw pagination data is returned instead of the rendered pagination markup.</td>
509
+ </tr>
510
+ </table>
511
+ </td>
512
+ </tr>
513
+ <tr>
514
+ <th>Returns</th>
515
+ <td>string</td>
516
+ </tr>
517
+ <tr>
518
+ <th>Example</th>
519
+ <td>
520
+ <pre class="php"><code>// fetch a previously forged instance, and render it
521
+ echo Pagination::instance('mypagination')->render();</code></pre>
522
+ </td>
523
+ </tr>
524
+ </tbody>
525
+ </table>
526
+
527
+ <p class="note">
528
+ The pagination object contains an __toString() method, that will cause the render() method to be called
529
+ when you echo the object, or cast it to string.
530
+ </p>
531
+ </article>
532
+
533
+ <article>
534
+ <h4 class="method" id="method_first">first($marker = null)</h4>
535
+ <p>
536
+ The <strong>first</strong> method generates the markup to display a "First page" link for pagination.
537
+ If no string is given to be used as marker, the "first-marker" value from the template will be used.
538
+ </p>
539
+ <table class="method">
540
+ <tbody>
541
+ <tr>
542
+ <th class="legend">Static</th>
543
+ <td>No</td>
544
+ </tr>
545
+ <tr>
546
+ <th>Parameters</th>
547
+ <td>
548
+ <table class="parameters">
549
+ <tr>
550
+ <th>Param</th>
551
+ <th>Default</th>
552
+ <th class="description">Description</th>
553
+ </tr>
554
+ <tr>
555
+ <th><kbd>$marker</kbd></th>
556
+ <td><pre class="php"><code>null</code></pre></td>
557
+ <td>The text to be displayed in the link. Defaults to the 'first-marker' template value.</td>
558
+ </tr>
559
+ </table>
560
+ </td>
561
+ </tr>
562
+ <tr>
563
+ <th>Returns</th>
564
+ <td>string</td>
565
+ </tr>
566
+ <tr>
567
+ <th>Example</th>
568
+ <td>
569
+ <pre class="php"><code>// fetch a previously forged instance, and render the "first page" link
570
+ echo Pagination::instance('mypagination')->first();</code></pre>
571
+ </td>
572
+ </tr>
573
+ </tbody>
574
+ </table>
575
+ <p class="note">
576
+ The "First page" link will only be shown if there is a first page, and you're not already on it.
577
+ Note that by default there is no inactive link defined for 'first'.
578
+ </p>
579
+ </article>
580
+
581
+ <article>
582
+ <h4 class="method" id="method_previous">previous($marker = null)</h4>
583
+ <p>
584
+ The <strong>previous</strong> method generates the markup to display a "Previous" link for pagination.
585
+ If no string is given to be used as marker, the "previous-marker" value from the template will be used.
586
+ </p>
587
+ <table class="method">
588
+ <tbody>
589
+ <tr>
590
+ <th class="legend">Static</th>
591
+ <td>No</td>
592
+ </tr>
593
+ <tr>
594
+ <th>Parameters</th>
595
+ <td>
596
+ <table class="parameters">
597
+ <tr>
598
+ <th>Param</th>
599
+ <th>Default</th>
600
+ <th class="description">Description</th>
601
+ </tr>
602
+ <tr>
603
+ <th><kbd>$marker</kbd></th>
604
+ <td><pre class="php"><code>null</code></pre></td>
605
+ <td>The text to be displayed in the link. Defaults to the 'previous-marker' template value.</td>
606
+ </tr>
607
+ </table>
608
+ </td>
609
+ </tr>
610
+ <tr>
611
+ <th>Returns</th>
612
+ <td>string</td>
613
+ </tr>
614
+ <tr>
615
+ <th>Example</th>
616
+ <td>
617
+ <pre class="php"><code>// fetch a previously forged instance, and render the "previous page" link
618
+ echo Pagination::instance('mypagination')->previous();</code></pre>
619
+ </td>
620
+ </tr>
621
+ </tbody>
622
+ </table>
623
+ </article>
624
+
625
+ <article>
626
+ <h4 class="method" id="method_next">next($marker = null)</h4>
627
+ <p>
628
+ The <strong>next</strong> method generates the markup to display a "Next" link for pagination.
629
+ If no string is given to be used as marker, the "next-marker" value from the template will be used.
630
+ </p>
631
+ <table class="method">
632
+ <tbody>
633
+ <tr>
634
+ <th class="legend">Static</th>
635
+ <td>No</td>
636
+ </tr>
637
+ <tr>
638
+ <th>Parameters</th>
639
+ <td>
640
+ <table class="parameters">
641
+ <tr>
642
+ <th>Param</th>
643
+ <th>Default</th>
644
+ <th class="description">Description</th>
645
+ </tr>
646
+ <tr>
647
+ <th><kbd>$marker</kbd></th>
648
+ <td><pre class="php"><code>null</code></pre></td>
649
+ <td>The text to be displayed in the link. Defaults to the 'next-marker' template value.</td>
650
+ </tr>
651
+ </table>
652
+ </td>
653
+ </tr>
654
+ <tr>
655
+ <th>Returns</th>
656
+ <td>string</td>
657
+ </tr>
658
+ <tr>
659
+ <th>Example</th>
660
+ <td>
661
+ <pre class="php"><code>// fetch a previously forged instance, and render the "next page" link
662
+ echo Pagination::instance('mypagination')->next();</code></pre>
663
+ </td>
664
+ </tr>
665
+ </tbody>
666
+ </table>
667
+ </article>
668
+
669
+ <article>
670
+ <h4 class="method" id="method_last">last($marker = null)</h4>
671
+ <p>
672
+ The <strong>last</strong> method generates the markup to display a "Last page" link for pagination.
673
+ If no string is given to be used as marker, the "last-marker" value from the template will be used.
674
+ </p>
675
+ <table class="method">
676
+ <tbody>
677
+ <tr>
678
+ <th class="legend">Static</th>
679
+ <td>No</td>
680
+ </tr>
681
+ <tr>
682
+ <th>Parameters</th>
683
+ <td>
684
+ <table class="parameters">
685
+ <tr>
686
+ <th>Param</th>
687
+ <th>Default</th>
688
+ <th class="description">Description</th>
689
+ </tr>
690
+ <tr>
691
+ <th><kbd>$marker</kbd></th>
692
+ <td><pre class="php"><code>null</code></pre></td>
693
+ <td>The text to be displayed in the link. Defaults to the 'last-marker' template value.</td>
694
+ </tr>
695
+ </table>
696
+ </td>
697
+ </tr>
698
+ <tr>
699
+ <th>Returns</th>
700
+ <td>string</td>
701
+ </tr>
702
+ <tr>
703
+ <th>Example</th>
704
+ <td>
705
+ <pre class="php"><code>// fetch a previously forged instance, and render the "last page" link
706
+ echo Pagination::instance('mypagination')->last();</code></pre>
707
+ </td>
708
+ </tr>
709
+ </tbody>
710
+ </table>
711
+ <p class="note">
712
+ The "Last page" link will only be shown if there are any pages, and you're not already on the last one.
713
+ Note that by default there is no inactive link defined for 'last'.
714
+ </p>
715
+ </article>
716
+
717
+ <article>
718
+ <h4 class="method" id="method_pages_render">pages_render()</h4>
719
+ <p>The <strong>pages_render</strong> method generates the markup that displays the page links between previous and next links for pagination.</p>
720
+ <table class="method">
721
+ <tbody>
722
+ <tr>
723
+ <th class="legend">Static</th>
724
+ <td>No</td>
725
+ </tr>
726
+ <tr>
727
+ <th>Parameters</th>
728
+ <td>None</td>
729
+ </tr>
730
+ <tr>
731
+ <th>Returns</th>
732
+ <td>mixed</td>
733
+ </tr>
734
+ <tr>
735
+ <th>Example</th>
736
+ <td>
737
+ <pre class="php"><code>// fetch a previously forged instance, and render the "pages" link
738
+ echo Pagination::instance('mypagination')->pages_render();</code></pre>
739
+ </td>
740
+ </tr>
741
+ </tbody>
742
+ </table>
743
+ </article>
744
+ </section>
745
+
746
+ <section>
747
+ <h3 id="static">Static interface</h3>
748
+
749
+ <p>
750
+ For your convinience, the Pagination class also has a static interface that operates on the default
751
+ instance only.
752
+ </p>
753
+
754
+ <article>
755
+ <h4 class="method" id="method_get">get($name)</h4>
756
+ <p>The <strong>get</strong> method allows you to get a configuration item on the default instance.</p>
757
+ <table class="method">
758
+ <tbody>
759
+ <tr>
760
+ <th class="legend">Static</th>
761
+ <td>Yes</td>
762
+ </tr>
763
+ <tr>
764
+ <th>Parameters</th>
765
+ <td>
766
+ <table class="parameters">
767
+ <tr>
768
+ <th>Param</th>
769
+ <th>Default</th>
770
+ <th class="description">Description</th>
771
+ </tr>
772
+ <tr>
773
+ <th><kbd>$name</kbd></th>
774
+ <td>Required</td>
775
+ <td>The name of the property to fetch.</td>
776
+ </tr>
777
+ </table>
778
+ </td>
779
+ </tr>
780
+ <tr>
781
+ <th>Returns</th>
782
+ <td>mixed, properly value, or <kbd>null</kbd> if the property doesn't exist.</td>
783
+ </tr>
784
+ <tr>
785
+ <th>Example</th>
786
+ <td>
787
+ <pre class="php"><code>// fetch the current page number
788
+ $page_number = Pagination::get('current_page');
789
+
790
+ // this is an alias of
791
+ $page_number = Pagination::instance()->current_page;</code></pre>
792
+ </td>
793
+ </tr>
794
+ </tbody>
795
+ </table>
796
+ </article>
797
+
798
+ <article>
799
+ <h4 class="method" id="method_set">set($name, $value)</h4>
800
+ <p>The <strong>set</strong> method allows you to set a configuration item on the default instance to the given value.</p>
801
+ <table class="method">
802
+ <tbody>
803
+ <tr>
804
+ <th class="legend">Static</th>
805
+ <td>Yes</td>
806
+ </tr>
807
+ <tr>
808
+ <th>Parameters</th>
809
+ <td>
810
+ <table class="parameters">
811
+ <tr>
812
+ <th>Param</th>
813
+ <th>Default</th>
814
+ <th class="description">Description</th>
815
+ </tr>
816
+ <tr>
817
+ <th><kbd>$name</kbd></th>
818
+ <td>Required</td>
819
+ <td>The name of the property to set.</td>
820
+ </tr>
821
+ <tr>
822
+ <th><kbd>$value</kbd></th>
823
+ <td>Required</td>
824
+ <td>The value to set the property to.</td>
825
+ </tr>
826
+ </table>
827
+ </td>
828
+ </tr>
829
+ <tr>
830
+ <th>Returns</th>
831
+ <td>void</td>
832
+ </tr>
833
+ <tr>
834
+ <th>Example</th>
835
+ <td>
836
+ <pre class="php"><code>// set the total number of rows
837
+ $page_number = Pagination::set('total_items', 610);
838
+
839
+ // this is an alias of
840
+ Pagination::instance()->total_items = 610;</code></pre>
841
+ </td>
842
+ </tr>
843
+ </tbody>
844
+ </table>
845
+ </article>
846
+
847
+ <p class="note">
848
+ For backward compatibility, the static methods <kbd>set_config()</kbd>, <kbd>create_links()</kbd>,
849
+ <kbd>next_link()</kbd> and <kbd>prev_link()</kbd> will be emulated on the default instance, minimizing
850
+ the migration effort needed when upgrading an existing application to FuelPHP v1.4+.
851
+ </p>
852
+ <p>Note that there is no possible way to emulate direct access to static class properties at the moment,
853
+ so if your application uses that, you'll have to change them:</p>
854
+ <pre class="php"><code>// pre v1.4 usage:
855
+ Pagination::$per_page = 10;
856
+
857
+ // new usage:
858
+ Pagination::set('per_page', 10);
859
+
860
+ // pre v1.4 usage:
861
+ Model_Article::find()
862
+ ->order_by('date', 'ASC')
863
+ ->rows_offset(\Pagination::$offset)
864
+ ->rows_limit(\Pagination::$per_page)
865
+ ->get();
866
+
867
+ // new usage:
868
+ Model_Article::query()
869
+ ->order_by('date', 'ASC')
870
+ ->rows_offset(\Pagination::get('offset'))
871
+ ->rows_limit(\Pagination::get('per_page'))
872
+ ->get();
873
+ </code></pre>
874
+ </section>
875
+
876
+ </div>
877
+
878
+ <footer>
879
+ <p>
880
+ &copy; FuelPHP Development Team 2010-2013 - <a href="http://fuelphp.com">FuelPHP</a> is released under the MIT license.
881
+ </p>
882
+ </footer>
883
+ </div>
884
+ </body>
885
+ </html>
benchmark/NYU_CTF_Bench/development/2013/CSAW-Finals/web/historypeats/csaw/docs/classes/profiler.html ADDED
@@ -0,0 +1,195 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <!doctype html>
2
+ <html lang="en">
3
+ <head>
4
+ <meta charset="UTF-8">
5
+ <meta name="viewport" content="width=device-width, initial-scale=1.0">
6
+ <link rel="stylesheet" href="./../assets/css/combined.css">
7
+ <link rel="shortcut icon" href="./../favicon.ico" />
8
+ <script src="http://www.google.com/jsapi" type="text/javascript"></script>
9
+ <script type="text/javascript">
10
+ var path = './../';
11
+ var class_prefix = "Profiler::";
12
+ </script>
13
+ <script src="./../assets/js/combined.js"></script>
14
+ <title>Profiler - Classes - FuelPHP Documentation</title>
15
+ </head>
16
+ <body>
17
+ <div id="container">
18
+ <header id="header">
19
+ <div class="table">
20
+ <h1>
21
+ <strong>FuelPHP, a PHP 5.3 Framework</strong>
22
+ Documentation
23
+ </h1>
24
+
25
+ <form id="google_search">
26
+ <p>
27
+ <span id="search_clear">&nbsp;</span>
28
+ <input type="submit" name="search_submit" id="search_submit" value="search" />
29
+ <input type="text" value="" id="search_input" name="search_input" />
30
+ </p>
31
+ </form>
32
+ </div>
33
+ <nav>
34
+
35
+ <div class="clear"></div>
36
+ </nav>
37
+ <a href="#" id="toc_handle">table of contents</a>
38
+ <div class="clear"></div>
39
+ </header>
40
+
41
+ <div id="cse">
42
+ <div id="cse_point"></div>
43
+ <div id="cse_content"></div>
44
+ </div>
45
+
46
+ <div id="main">
47
+
48
+ <h2>Profiler Class</h2>
49
+
50
+ <p>The profiler class allows you to add your own profiling information to the profiler.</p>
51
+
52
+ <article>
53
+ <h4 class="method" id="method_mark">mark($label)</h4>
54
+ <p>
55
+ The <strong>mark</strong> method will add a speed marker to the profiler.
56
+ This marker will show in the "Load Time" section of the profiler.
57
+ </p>
58
+ <table class="method">
59
+ <tbody>
60
+ <tr>
61
+ <th>Static</th>
62
+ <td>Yes</td>
63
+ </tr>
64
+ <tr>
65
+ <th>Parameters</th>
66
+ <td>
67
+ <table class="parameters">
68
+ <tr>
69
+ <th>Param</th>
70
+ <th>Default</th>
71
+ <th>Description</th>
72
+ </tr>
73
+ <tr>
74
+ <th><kbd>$label</kbd></th>
75
+ <td><i>required</i></td>
76
+ <td>A text label to describe the marker to be set.</td>
77
+ </tr>
78
+ </table>
79
+ </td>
80
+ </tr>
81
+ <tr>
82
+ <th>Returns</th>
83
+ <td>void</td>
84
+ </tr>
85
+ <tr>
86
+ <th>Example</th>
87
+ <td>
88
+ <pre class="php"><code>Profiler::mark('start of this piece of code');</code></pre>
89
+ </td>
90
+ </tr>
91
+ </tbody>
92
+ </table>
93
+ </article>
94
+
95
+ <article>
96
+ <h4 class="method" id="method_mark_memory">mark_memory($var, $name)</h4>
97
+ <p>
98
+ The <strong>mark_memory</strong> method will add a memory marker to the profiler.
99
+ If you pass a variable, the memory usage of that variable will be logged.
100
+ If not, the memory usage at the time of marking will be logged.
101
+ </p>
102
+ <table class="method">
103
+ <tbody>
104
+ <tr>
105
+ <th>Static</th>
106
+ <td>Yes</td>
107
+ </tr>
108
+ <tr>
109
+ <th>Parameters</th>
110
+ <td>
111
+ <table class="parameters">
112
+ <tr>
113
+ <th>Param</th>
114
+ <th>Default</th>
115
+ <th>Description</th>
116
+ </tr>
117
+ <tr>
118
+ <th><kbd>$var</kbd></th>
119
+ <td><kbd>false</kbd></td>
120
+ <td>The variable whose size has to be logged. If false or not specified, PHP memory usage will be logged.</td>
121
+ </tr>
122
+ <tr>
123
+ <th><kbd>$name</kbd></th>
124
+ <td><kbd>'Memory&nbsp;Usage'</kbd></td>
125
+ <td>A text label to describe the marker to be set.</td>
126
+ </tr>
127
+ </table>
128
+ </td>
129
+ </tr>
130
+ <tr>
131
+ <th>Returns</th>
132
+ <td>void</td>
133
+ </tr>
134
+ <tr>
135
+ <th>Example</th>
136
+ <td>
137
+ <pre class="php"><code>Profiler::mark_memory($this, 'Controller_Welcome object');</code></pre>
138
+ </td>
139
+ </tr>
140
+ </tbody>
141
+ </table>
142
+ </article>
143
+
144
+ <article>
145
+ <h4 class="method" id="method_console">console($text)</h4>
146
+ <p>
147
+ The <strong>console</strong> method will add a log entry to the profiler.
148
+ </p>
149
+ <table class="method">
150
+ <tbody>
151
+ <tr>
152
+ <th>Static</th>
153
+ <td>Yes</td>
154
+ </tr>
155
+ <tr>
156
+ <th>Parameters</th>
157
+ <td>
158
+ <table class="parameters">
159
+ <tr>
160
+ <th>Param</th>
161
+ <th>Default</th>
162
+ <th>Description</th>
163
+ </tr>
164
+ <tr>
165
+ <th><kbd>$text</kbd></th>
166
+ <td><i>required</i></td>
167
+ <td>A text to describe the log entry to be set.</td>
168
+ </tr>
169
+ </table>
170
+ </td>
171
+ </tr>
172
+ <tr>
173
+ <th>Returns</th>
174
+ <td>void</td>
175
+ </tr>
176
+ <tr>
177
+ <th>Example</th>
178
+ <td>
179
+ <pre class="php"><code>Profiler::console('start of this piece of code');</code></pre>
180
+ </td>
181
+ </tr>
182
+ </tbody>
183
+ </table>
184
+ </article>
185
+
186
+ </div>
187
+
188
+ <footer>
189
+ <p>
190
+ &copy; FuelPHP Development Team 2010-2013 - <a href="http://fuelphp.com">FuelPHP</a> is released under the MIT license.
191
+ </p>
192
+ </footer>
193
+ </div>
194
+ </body>
195
+ </html>
benchmark/NYU_CTF_Bench/development/2013/CSAW-Finals/web/historypeats/csaw/docs/classes/redis.html ADDED
@@ -0,0 +1,190 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <!doctype html>
2
+ <html lang="en">
3
+ <head>
4
+ <meta charset="UTF-8">
5
+ <meta name="viewport" content="width=device-width, initial-scale=1.0">
6
+ <link rel="stylesheet" href="./../assets/css/combined.css">
7
+ <link rel="shortcut icon" href="./../favicon.ico" />
8
+ <script src="http://www.google.com/jsapi" type="text/javascript"></script>
9
+ <script type="text/javascript">
10
+ var path = './../';
11
+ var class_prefix = "Redis_Db::";
12
+ </script>
13
+ <script src="./../assets/js/combined.js"></script>
14
+ <title>Redis_Db - Classes - FuelPHP Documentation</title>
15
+ </head>
16
+ <body>
17
+ <div id="container">
18
+ <header id="header">
19
+ <div class="table">
20
+ <h1>
21
+ <strong>FuelPHP, a PHP 5.3 Framework</strong>
22
+ Documentation
23
+ </h1>
24
+
25
+ <form id="google_search">
26
+ <p>
27
+ <span id="search_clear">&nbsp;</span>
28
+ <input type="submit" name="search_submit" id="search_submit" value="search" />
29
+ <input type="text" value="" id="search_input" name="search_input" />
30
+ </p>
31
+ </form>
32
+ </div>
33
+ <nav>
34
+
35
+ <div class="clear"></div>
36
+ </nav>
37
+ <a href="#" id="toc_handle">table of contents</a>
38
+ <div class="clear"></div>
39
+ </header>
40
+
41
+ <div id="cse">
42
+ <div id="cse_point"></div>
43
+ <div id="cse_content"></div>
44
+ </div>
45
+
46
+ <div id="main">
47
+
48
+ <h2>Redis_Db Class</h2>
49
+
50
+ <p>The Redis_Db class allows you to interact with a <a href="http://redis.io/">Redis</a> key-value store.</p>
51
+
52
+ <article>
53
+ <h4 class="method" id="method_forge">forge($name = 'default', $config = array())</h4>
54
+ <p>Create a new named redis instance, optionally with a custom configuration</p>
55
+ <table class="method">
56
+ <tbody>
57
+ <tr>
58
+ <th class="legend">Static</th>
59
+ <td>Yes</td>
60
+ </tr>
61
+ <tr>
62
+ <th>Parameters</th>
63
+ <td>
64
+ <table class="parameters">
65
+ <tr>
66
+ <th>Param</th>
67
+ <th>Default</th>
68
+ <th class="description">Description</th>
69
+ </tr>
70
+ <tr>
71
+ <th><kbd>$name</kbd></th>
72
+ <td><i><pre class="php"><code>'default'</code></pre></i></td>
73
+ <td>The name of the new redis instance, as defined the application config db.php file.</td>
74
+ </tr>
75
+ <tr>
76
+ <th><kbd>$config</kbd></th>
77
+ <td><i><pre class="php"><code>array()</code></pre></i></td>
78
+ <td>custom configuration, which will override the values defined in the db.php file.</td>
79
+ </tr>
80
+ </table>
81
+ </td>
82
+ </tr>
83
+ <tr>
84
+ <th>Returns</th>
85
+ <td>Fuel\Core\Redis Object</td>
86
+ </tr>
87
+ <tr>
88
+ <th>Example</th>
89
+ <td>
90
+ <pre class="php"><code>// create the Redis 'mystore' instance
91
+ $redis = Redis_Db::forge('mystore');</code></pre>
92
+ </td>
93
+ </tr>
94
+ </tbody>
95
+ </table>
96
+ </article>
97
+
98
+ <article>
99
+ <h4 class="method" id="method_instance">instance($name = 'default')</h4>
100
+ <p>Return a named instance that was created earlier.</p>
101
+ <table class="method">
102
+ <tbody>
103
+ <tr>
104
+ <th class="legend">Static</th>
105
+ <td>Yes</td>
106
+ </tr>
107
+ <tr>
108
+ <th>Parameters</th>
109
+ <td>
110
+ <table class="parameters">
111
+ <tr>
112
+ <th>Param</th>
113
+ <th>Default</th>
114
+ <th class="description">Description</th>
115
+ </tr>
116
+ <tr>
117
+ <th><kbd>$name</kbd></th>
118
+ <td><i><pre class="php"><code>'default'</code></pre></i></td>
119
+ <td>The name of the redis instance requested, as created using forge().</td>
120
+ </tr>
121
+ </table>
122
+ </td>
123
+ </tr>
124
+ <tr>
125
+ <th>Returns</th>
126
+ <td>Fuel\Core\Redis Object</td>
127
+ </tr>
128
+ <tr>
129
+ <th>Example</th>
130
+ <td>
131
+ <pre class="php"><code>// retrieve the Redis 'mystore' instance
132
+ $redis = Redis_Db::instance('mystore');</code></pre>
133
+ </td>
134
+ </tr>
135
+ </tbody>
136
+ </table>
137
+ </article>
138
+
139
+ <article>
140
+ <h4 id="redis_commands">Redis commands</h4>
141
+ <p>Once you have created a redis object using the instance() method, every valid redis command (see the <a href="http://redis.io/commands">Redis Documentation</a>) as a method of that object.</p>
142
+ <p>Some examples:</p>
143
+ <pre class="php"><code>// create the Redis 'mystore' instance
144
+ $redis = Redis_Db::forge('mystore');
145
+
146
+ // create some test data
147
+ $redis->rpush('particles', 'proton');
148
+ $redis->rpush('particles', 'electron');
149
+ $redis->rpush('particles', 'neutron');
150
+
151
+ // fetch the range
152
+ $particles = $redis->lrange('particles', 0, -1);
153
+
154
+ // count the number of elements
155
+ $particle_count = $redis->llen('particles');
156
+
157
+ // display the results
158
+ echo "&lt;p>The {$particle_count} particles that make up atoms are:&lt;/p>";
159
+ echo "&lt;ul>";
160
+ foreach ($particles as $particle) {
161
+ echo "&lt;li>{$particle}&lt;/li>";
162
+ }
163
+ echo "&lt;/ul>";
164
+ </code></pre>
165
+ </article>
166
+
167
+ <article>
168
+ <h4 id="redis_pipelining">Pipelining</h4>
169
+ <p>You can add multiple Redis commands into a command pipeline, and execute them all at once.</p>
170
+ <p>An example:</p>
171
+ <pre class="php"><code>// create the Redis 'mystore' instance
172
+ $redis = Redis_Db::forge('mystore');
173
+
174
+ // pipeline some redis commands, then execute them
175
+ $result = $redis->pipeline()
176
+ ->sadd('list', 4)
177
+ ->sadd('list', 1)
178
+ ->sadd('list', 55)
179
+ ->execute();</code></pre>
180
+ </article>
181
+ </div>
182
+
183
+ <footer>
184
+ <p>
185
+ &copy; FuelPHP Development Team 2010-2013 - <a href="http://fuelphp.com">FuelPHP</a> is released under the MIT license.
186
+ </p>
187
+ </footer>
188
+ </div>
189
+ </body>
190
+ </html>
benchmark/NYU_CTF_Bench/development/2013/CSAW-Finals/web/historypeats/csaw/docs/classes/response.html ADDED
@@ -0,0 +1,518 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <!doctype html>
2
+ <html lang="en">
3
+ <head>
4
+ <meta charset="UTF-8">
5
+ <meta name="viewport" content="width=device-width, initial-scale=1.0">
6
+ <link rel="stylesheet" href="./../assets/css/combined.css">
7
+ <link rel="shortcut icon" href="./../favicon.ico" />
8
+ <script src="http://www.google.com/jsapi" type="text/javascript"></script>
9
+ <script type="text/javascript">
10
+ var path = './../';
11
+ var class_prefix = "Response::";
12
+ </script>
13
+ <script src="./../assets/js/combined.js"></script>
14
+ <title>Response - Classes - FuelPHP Documentation</title>
15
+ </head>
16
+ <body>
17
+ <div id="container">
18
+ <header id="header">
19
+ <div class="table">
20
+ <h1>
21
+ <strong>FuelPHP, a PHP 5.3 Framework</strong>
22
+ Documentation
23
+ </h1>
24
+
25
+ <form id="google_search">
26
+ <p>
27
+ <span id="search_clear">&nbsp;</span>
28
+ <input type="submit" name="search_submit" id="search_submit" value="search" />
29
+ <input type="text" value="" id="search_input" name="search_input" />
30
+ </p>
31
+ </form>
32
+ </div>
33
+ <nav>
34
+
35
+ <div class="clear"></div>
36
+ </nav>
37
+ <a href="#" id="toc_handle">table of contents</a>
38
+ <div class="clear"></div>
39
+ </header>
40
+
41
+ <div id="cse">
42
+ <div id="cse_point"></div>
43
+ <div id="cse_content"></div>
44
+ </div>
45
+
46
+ <div id="main">
47
+
48
+ <h2>Response Class</h2>
49
+
50
+ <p>The response class contains the methods to deal with HTTP response and browser output.</p>
51
+
52
+ <article>
53
+ <h4>Setting the Status Header</h4>
54
+ <p>The status header is treated as a &quot;special&quot; header in Fuel. You do not set it as you would
55
+ other headers. The status header is set as follows in the controller:</p>
56
+ <pre class="php"><code>$response = new Response($body, 404);</code></pre>
57
+
58
+ <h4>Setting the Status Header and other headers</h4>
59
+ <pre class="php"><code>$headers = array (
60
+ 'Cache-Control' => 'no-cache, no-store, max-age=0, must-revalidate',
61
+ 'Expires' => 'Mon, 26 Jul 1997 05:00:00 GMT',
62
+ 'Pragma' => 'no-cache',
63
+ );
64
+ $response = new Response($body, 404, $headers);</code></pre>
65
+ </article>
66
+
67
+ <article>
68
+ <h4 class="method" id="method_forge">forge($body = null, $status = 200, array $headers = array())</h4>
69
+ <p>The <strong>forge</strong> method creates a new instance of the Response class.</p>
70
+ <table class="method">
71
+ <tbody>
72
+ <tr>
73
+ <th class="legend">Static</th>
74
+ <td>Yes</td>
75
+ </tr>
76
+ <tr>
77
+ <th>Parameters</th>
78
+ <td>
79
+ <table class="parameters">
80
+ <tr>
81
+ <th>Param</th>
82
+ <th>Default</th>
83
+ <th class="description">Description</th>
84
+ </tr>
85
+ <tr>
86
+ <th><kbd>$body</kbd></th>
87
+ <td><pre class="php"><code>null</code></pre></td>
88
+ <td>The response body, i.e. the response you want to return to the caller.</td>
89
+ </tr>
90
+ <tr>
91
+ <th><kbd>$status</kbd></th>
92
+ <td><pre class="php"><code>200</code></pre></td>
93
+ <td>HTTP status code for this response. Defaults to 200 OK.</td>
94
+ </tr>
95
+ <tr>
96
+ <th><kbd>$headers</kbd></th>
97
+ <td><pre class="php"><code>array()</code></pre></td>
98
+ <td>Any HTTP headers that should be part of the response.</td>
99
+ </tr>
100
+ </table>
101
+ </td>
102
+ </tr>
103
+ <tr>
104
+ <th>Returns</th>
105
+ <td>Response object</td>
106
+ </tr>
107
+ <tr>
108
+ <th>Triggers</th>
109
+ <td>Event 'response_created' after object instantiation</td>
110
+ </tr>
111
+ <tr>
112
+ <th>Example</th>
113
+ <td>
114
+ <pre class="php"><code>// create a response object, use a View as body, and a 404 NOT FOUND status code
115
+ return Response::forge(View::forge('errors/404page'), 404);</code></pre>
116
+ </td>
117
+ </tr>
118
+ </tbody>
119
+ </table>
120
+ </article>
121
+
122
+ <article>
123
+ <h4 class="method" id="method_redirect">redirect($url = '', $method = 'location', $redirect_code = 302)</h4>
124
+ <p>The <strong>redirect</strong> method offers different methods of redirecting to a new URL.</p>
125
+ <table class="method">
126
+ <tbody>
127
+ <tr>
128
+ <th class="legend">Static</th>
129
+ <td>Yes</td>
130
+ </tr>
131
+ <tr>
132
+ <th>Parameters</th>
133
+ <td>
134
+ <table class="parameters">
135
+ <tr>
136
+ <th>Param</th>
137
+ <th>Default</th>
138
+ <th class="description">Description</th>
139
+ </tr>
140
+ <tr>
141
+ <th><kbd>$url</kbd></th>
142
+ <td><pre class="php"><code>''</code></pre></td>
143
+ <td>URL to redirect to.</td>
144
+ </tr>
145
+ <tr>
146
+ <th><kbd>$method</kbd></th>
147
+ <td><pre class="php"><code>'location'</code></pre></td>
148
+ <td>Redirection method to use. Supported are 'location' and 'refresh'.</td>
149
+ </tr>
150
+ <tr>
151
+ <th><kbd>$redirect_code</kbd></th>
152
+ <td><pre class="php"><code>302</code></pre></td>
153
+ <td>HTTP status code to send back as part of the redirect.</td>
154
+ </tr>
155
+ </table>
156
+ </td>
157
+ </tr>
158
+ <tr>
159
+ <th>Returns</th>
160
+ <td>This method terminates the current script, it does not return.</td>
161
+ </tr>
162
+ <tr>
163
+ <th>Example</th>
164
+ <td>
165
+ <pre class="php"><code>// use a URL
166
+ Response::redirect('http://example.com/home', 'refresh');
167
+
168
+ // or use a relative URI
169
+ Response::redirect('site/about');</code></pre>
170
+ </td>
171
+ </tr>
172
+ </tbody>
173
+ </table>
174
+ <p class="note">
175
+ This method supports wildcard replacement in the URL. See <a href="uri.html#method_segment_replace">Uri::segment_replace()</a>
176
+ for more information. You can disable this by setting <code>response.redirect_with_wildcards</code> to <code>false</code> in your applications config.php.
177
+ </p>
178
+ </article>
179
+
180
+ <article>
181
+ <h4 class="method" id="method_redirect_back">redirect_back($url = '', $method = 'location', $redirect_code = 302)</h4>
182
+ <p>The <strong>redirect_back</strong> method allows you to redirect back to the page you came from, and offers different methods
183
+ of redirecting to a new URL. If the previous page is not part of your application (i.e. the user came from another website), or
184
+ no URL is given, it will redirect to the application homepage.</p>
185
+ <table class="method">
186
+ <tbody>
187
+ <tr>
188
+ <th class="legend">Static</th>
189
+ <td>Yes</td>
190
+ </tr>
191
+ <tr>
192
+ <th>Parameters</th>
193
+ <td>
194
+ <table class="parameters">
195
+ <tr>
196
+ <th>Param</th>
197
+ <th>Default</th>
198
+ <th class="description">Description</th>
199
+ </tr>
200
+ <tr>
201
+ <th><kbd>$url</kbd></th>
202
+ <td><pre class="php"><code>''</code></pre></td>
203
+ <td>URL to redirect to.</td>
204
+ </tr>
205
+ <tr>
206
+ <th><kbd>$method</kbd></th>
207
+ <td><pre class="php"><code>'location'</code></pre></td>
208
+ <td>Redirection method to use. Supported are 'location' and 'refresh'.</td>
209
+ </tr>
210
+ <tr>
211
+ <th><kbd>$redirect_code</kbd></th>
212
+ <td><pre class="php"><code>302</code></pre></td>
213
+ <td>HTTP status code to send back as part of the redirect.</td>
214
+ </tr>
215
+ </table>
216
+ </td>
217
+ </tr>
218
+ <tr>
219
+ <th>Returns</th>
220
+ <td>This method terminates the current script, it does not return.</td>
221
+ </tr>
222
+ <tr>
223
+ <th>Example</th>
224
+ <td>
225
+ <pre class="php"><code>// redirect back. If there is no 'back', go to the dashboard page
226
+ Response::redirect_back('/dashboard', 'refresh');</code></pre>
227
+ </td>
228
+ </tr>
229
+ </tbody>
230
+ </table>
231
+ <p class="note">
232
+ This method supports wildcard replacement in the URL. See <a href="uri.html#method_segment_replace">Uri::segment_replace()</a>
233
+ for more information. You can disable this by setting <code>response.redirect_with_wildcards</code> to <code>false</code> in your applications config.php.
234
+ </p>
235
+ </article>
236
+
237
+ <article>
238
+ <h4 class="method" id="method_set_status">set_status($status = 200)</h4>
239
+ <p>The <strong>set_status</strong> method allows you to update the HTTP status code set on a Response object.</p>
240
+ <table class="method">
241
+ <tbody>
242
+ <tr>
243
+ <th class="legend">Static</th>
244
+ <td>No</td>
245
+ </tr>
246
+ <tr>
247
+ <th>Parameters</th>
248
+ <td>
249
+ <table class="parameters">
250
+ <tr>
251
+ <th>Param</th>
252
+ <th>Default</th>
253
+ <th class="description">Description</th>
254
+ </tr>
255
+ <tr>
256
+ <th><kbd>$status</kbd></th>
257
+ <td><pre class="php"><code>200</code></pre></td>
258
+ <td>HTTP status code for this response. Defaults to 200 OK.</td>
259
+ </tr>
260
+ </table>
261
+ </td>
262
+ </tr>
263
+ <tr>
264
+ <th>Returns</th>
265
+ <td>Current object, for chaining</td>
266
+ </tr>
267
+ <tr>
268
+ <th>Example</th>
269
+ <td>
270
+ <pre class="php"><code>$response = new Response();
271
+
272
+ // This will be a NOT FOUND response
273
+ $response->set_status(404);</code></pre>
274
+ </td>
275
+ </tr>
276
+ </tbody>
277
+ </table>
278
+ </article>
279
+
280
+ <article>
281
+ <h4 class="method" id="method_set_header">set_header($name, $value, $replace)</h4>
282
+ <p>The <strong>set_header</strong> method allows set custom HTTP headers.</p>
283
+ <table class="method">
284
+ <tbody>
285
+ <tr>
286
+ <th class="legend">Static</th>
287
+ <td>No</td>
288
+ </tr>
289
+ <tr>
290
+ <th>Parameters</th>
291
+ <td>
292
+ <table class="parameters">
293
+ <tr>
294
+ <th>Param</th>
295
+ <th>Default</th>
296
+ <th class="description">Description</th>
297
+ </tr>
298
+ <tr>
299
+ <th><kbd>$name</kbd></th>
300
+ <td><i>Required</i></td>
301
+ <td>Name of the header to add.</td>
302
+ </tr>
303
+ <tr>
304
+ <th><kbd>$value</kbd></th>
305
+ <td><i>Required</i></td>
306
+ <td>The string that needs to be added to the HTTP header.</td>
307
+ </tr>
308
+ <tr>
309
+ <th><kbd>$replace</kbd></th>
310
+ <td><pre class="php"><code>true</code></pre></td>
311
+ <td>All headers will replace any previous value for the same name by default. If you set
312
+ this parameter to <kbd>false</kbd> the header won't overwrite and can't be overwritten.</td>
313
+ </tr>
314
+ </table>
315
+ </td>
316
+ </tr>
317
+ <tr>
318
+ <th>Returns</th>
319
+ <td>void</td>
320
+ </tr>
321
+ <tr>
322
+ <th>Example</th>
323
+ <td>
324
+ <pre class="php"><code>$response = new Response();
325
+
326
+ // We'll be outputting a PDF
327
+ $response->set_header('Content-Type', 'application/pdf');
328
+
329
+ // It will be called downloaded.pdf
330
+ $response->set_header('Content-Disposition', 'attachment; filename="downloaded.pdf"');
331
+
332
+ // Set no cache
333
+ $response->set_header('Cache-Control', 'no-cache, no-store, max-age=0, must-revalidate');
334
+ $response->set_header('Expires', 'Mon, 26 Jul 1997 05:00:00 GMT');
335
+ $response->set_header('Pragma', 'no-cache');
336
+
337
+ // More examples
338
+ $response->set_header('Content-Language', 'en');
339
+ $response->set_header('Content-Type', 'text/html; charset=utf-8');
340
+
341
+ return $response;</code></pre>
342
+ </td>
343
+ </tr>
344
+ </tbody>
345
+ </table>
346
+ <p class="note"> Note that names are unique, overwriting each other if the same name is used.</p>
347
+ </article>
348
+
349
+ <article>
350
+ <h4 class="method" id="method_get_header">get_header($name = null)</h4>
351
+ <p>The <strong>get_header</strong> method allows you to retrieve a custom HTTP headers set previously.</p>
352
+ <table class="method">
353
+ <tbody>
354
+ <tr>
355
+ <th class="legend">Static</th>
356
+ <td>No</td>
357
+ </tr>
358
+ <tr>
359
+ <th>Parameters</th>
360
+ <td>
361
+ <table class="parameters">
362
+ <tr>
363
+ <th>Param</th>
364
+ <th>Default</th>
365
+ <th class="description">Description</th>
366
+ </tr>
367
+ <tr>
368
+ <th><kbd>$name</kbd></th>
369
+ <td><i>optional</i></td>
370
+ <td>Name of the header to get. If not given, all headers are returned.</td>
371
+ </tr>
372
+ </table>
373
+ </td>
374
+ </tr>
375
+ <tr>
376
+ <th>Returns</th>
377
+ <td>Mixed. String in case of a single header, Array in case all headers are returned.</td>
378
+ </tr>
379
+ <tr>
380
+ <th>Example</th>
381
+ <td>
382
+ <pre class="php"><code>$response = new Response();
383
+ $response->set_header('Pragma', 'no-cache');
384
+
385
+ // returns 'no-cache'
386
+ $header = $response->get_header('Pragma');
387
+
388
+ // returns array('Pragma' => 'no-cache')
389
+ $header = $response->get_header();</code></pre>
390
+ </td>
391
+ </tr>
392
+ </tbody>
393
+ </table>
394
+ </article>
395
+
396
+ <article>
397
+ <h4 class="method" id="method_body">body($value = false)</h4>
398
+ <p>The <strong>body</strong> method allows get the current response body, or set a new one.</p>
399
+ <table class="method">
400
+ <tbody>
401
+ <tr>
402
+ <th class="legend">Static</th>
403
+ <td>No</td>
404
+ </tr>
405
+ <tr>
406
+ <th>Parameters</th>
407
+ <td>
408
+ <table class="parameters">
409
+ <tr>
410
+ <th>Param</th>
411
+ <th>Default</th>
412
+ <th class="description">Description</th>
413
+ </tr>
414
+ <tr>
415
+ <th><kbd>$value</kbd></th>
416
+ <td><i>optional</i></td>
417
+ <td>Response body to set. If not given, the current response body is returned.</td>
418
+ </tr>
419
+ </table>
420
+ </td>
421
+ </tr>
422
+ <tr>
423
+ <th>Returns</th>
424
+ <td>Mixed. Current response body, or the current response object for chaining.</td>
425
+ </tr>
426
+ <tr>
427
+ <th>Example</th>
428
+ <td>
429
+ <pre class="php"><code>$response = new Response();
430
+ $response->body('This is the response body');
431
+
432
+ // returns 'This is the response body'
433
+ $body = $response->body();</code></pre>
434
+ </td>
435
+ </tr>
436
+ </tbody>
437
+ </table>
438
+ </article>
439
+
440
+ <article>
441
+ <h4 class="method" id="method_send_headers">send_headers()</h4>
442
+ <p>The <strong>send_headers</strong> method sends the set headers out to the browser, including the HTTP status of the request.</p>
443
+ <table class="method">
444
+ <tbody>
445
+ <tr>
446
+ <th class="legend">Static</th>
447
+ <td>No</td>
448
+ </tr>
449
+ <tr>
450
+ <th>Parameters</th>
451
+ <td><i>None</i></td>
452
+ </tr>
453
+ <tr>
454
+ <th>Returns</th>
455
+ <td>void</td>
456
+ </tr>
457
+ <tr>
458
+ <th>Example</th>
459
+ <td>
460
+ <pre class="php"><code>$response->send_headers();</code></pre>
461
+ </td>
462
+ </tr>
463
+ </tbody>
464
+ </table>
465
+ <p class="note">Note that you normally don't have to call this method manually. Fuel will take care of this as part of processing the request.</p>
466
+ </article>
467
+
468
+ <article>
469
+ <h4 class="method" id="method_send">send($send_headers = false)</h4>
470
+ <p>The <strong>send</strong> method sends the response body to the output buffer (i.e. it is echo'd out).</p>
471
+ <table class="method">
472
+ <tbody>
473
+ <tr>
474
+ <th class="legend">Static</th>
475
+ <td>No</td>
476
+ </tr>
477
+ <tr>
478
+ <th>Parameters</th>
479
+ <td>
480
+ <table class="parameters">
481
+ <tr>
482
+ <th>Param</th>
483
+ <th>Default</th>
484
+ <th class="description">Description</th>
485
+ </tr>
486
+ <tr>
487
+ <th><kbd>$send_headers</kbd></th>
488
+ <td><i>optional</i></td>
489
+ <td>If true, send any defined HTTP headers before sending the response body.</td>
490
+ </tr>
491
+ </table>
492
+ </td>
493
+ </tr>
494
+ <tr>
495
+ <th>Returns</th>
496
+ <td>void</td>
497
+ </tr>
498
+ <tr>
499
+ <th>Example</th>
500
+ <td>
501
+ <pre class="php"><code>// echo whatever the response body is
502
+ $response->send();</code></pre>
503
+ </td>
504
+ </tr>
505
+ </tbody>
506
+ </table>
507
+ <p class="note">Note that you normally don't have to call this method manually. Fuel will take care of this as part of processing the request.</p>
508
+ </article>
509
+ </div>
510
+
511
+ <footer>
512
+ <p>
513
+ &copy; FuelPHP Development Team 2010-2013 - <a href="http://fuelphp.com">FuelPHP</a> is released under the MIT license.
514
+ </p>
515
+ </footer>
516
+ </div>
517
+ </body>
518
+ </html>
benchmark/NYU_CTF_Bench/development/2013/CSAW-Finals/web/historypeats/csaw/docs/classes/router.html ADDED
@@ -0,0 +1,334 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <!doctype html>
2
+ <html lang="en">
3
+ <head>
4
+ <meta charset="UTF-8">
5
+ <meta name="viewport" content="width=device-width, initial-scale=1.0">
6
+ <link rel="stylesheet" href="./../assets/css/combined.css">
7
+ <link rel="shortcut icon" href="./../favicon.ico" />
8
+ <script src="http://www.google.com/jsapi" type="text/javascript"></script>
9
+ <script type="text/javascript">
10
+ var path = './../';
11
+ var class_prefix = "Router::";
12
+ </script>
13
+ <script src="./../assets/js/combined.js"></script>
14
+ <title>Router - Classes - FuelPHP Documentation</title>
15
+ </head>
16
+ <body>
17
+ <div id="container">
18
+ <header id="header">
19
+ <div class="table">
20
+ <h1>
21
+ <strong>FuelPHP, a PHP 5.3 Framework</strong>
22
+ Documentation
23
+ </h1>
24
+
25
+ <form id="google_search">
26
+ <p>
27
+ <span id="search_clear">&nbsp;</span>
28
+ <input type="submit" name="search_submit" id="search_submit" value="search" />
29
+ <input type="text" value="" id="search_input" name="search_input" />
30
+ </p>
31
+ </form>
32
+ </div>
33
+ <nav>
34
+
35
+ <div class="clear"></div>
36
+ </nav>
37
+ <a href="#" id="toc_handle">table of contents</a>
38
+ <div class="clear"></div>
39
+ </header>
40
+
41
+ <div id="cse">
42
+ <div id="cse_point"></div>
43
+ <div id="cse_content"></div>
44
+ </div>
45
+
46
+ <div id="main">
47
+
48
+ <h2>Router Class</h2>
49
+
50
+ <p>The <kbd>Router</kbd> class determines which controller needs to be loaded, based on the request passed to it, and the routes defined.</p>
51
+
52
+ <article>
53
+ <h4 class="method" id="method_process">process(\Request $request, $route = true)</h4>
54
+ <p>
55
+ The <strong>process</strong> method takes a request object, and will try to find a route match for the URI contained in the request.
56
+ If no route can be matched, the router will create a new route based on the information in the URI, and following the controller/method or
57
+ module/controller/method URI scheme. It will not check if the determined route is valid!
58
+ </p>
59
+ <table class="method">
60
+ <tbody>
61
+ <tr>
62
+ <th class="legend">Static</th>
63
+ <td>Yes</td>
64
+ </tr>
65
+ <tr>
66
+ <th>Parameters</th>
67
+ <td>
68
+ <table class="parameters">
69
+ <tr>
70
+ <th>Param</th>
71
+ <th>Default</th>
72
+ <th class="description">Description</th>
73
+ </tr>
74
+ <tr>
75
+ <th><kbd>$request</kbd></th>
76
+ <td><i>required</i></td>
77
+ <td>A valid Request object.</td>
78
+ </tr>
79
+ <tr>
80
+ <th><kbd>$route</kbd></th>
81
+ <td><code>true</code></td>
82
+ <td>
83
+ If 'true', the loaded routes will be used to find a match. If 'false', the loaded routes will be ignored and a new
84
+ route will be constructed. This is used for HMVC calls to controllers that are not routeable from the URL.
85
+ </td>
86
+ </tr>
87
+ </table>
88
+ </td>
89
+ </tr>
90
+ <tr>
91
+ <th>Returns</th>
92
+ <td><i>Route object, or null if no valid route object could be constructed</i></td>
93
+ </tr>
94
+ </tbody>
95
+ </table>
96
+
97
+ <p class="note">
98
+ Under normal circumstances you won't be needing this method, it is used internally in the framework to load
99
+ controllers.
100
+ </p>
101
+ </article>
102
+
103
+ <article>
104
+ <h4 class="method" id="method_add">add($path, $options = null, $prepend = false, $case_sensitive = null)</h4>
105
+ <p>
106
+ The <strong>add</strong> method allows you to manually add new routes at runtime. You might need this if you want to load
107
+ controllers that don't follow the normal URI scheme, or if you want to load routes from other sources then the routes.php
108
+ configuration files.
109
+ </p>
110
+ <table class="method">
111
+ <tbody>
112
+ <tr>
113
+ <th class="legend">Static</th>
114
+ <td>Yes</td>
115
+ </tr>
116
+ <tr>
117
+ <th>Parameters</th>
118
+ <td>
119
+ <table class="parameters">
120
+ <tr>
121
+ <th>Param</th>
122
+ <th>Default</th>
123
+ <th class="description">Description</th>
124
+ </tr>
125
+ <tr>
126
+ <th><kbd>$path</kbd></th>
127
+ <td><i>required</i></td>
128
+ <td>The URI path to be matched. This is the left side of your routes.php route definition.</td>
129
+ </tr>
130
+ <tr>
131
+ <th><kbd>$options</kbd></th>
132
+ <td><i>string|array|Route</i></td>
133
+ <td>Either the translation for $path, an array for verb routing (like the right side of your routes.php rout definition) or an instance of Route.</td>
134
+ </tr>
135
+ <tr>
136
+ <th><kbd>$prepend</kbd></th>
137
+ <td><code>false</code></td>
138
+ <td>If true, the new route will be prepended to the already loaded routes.</td>
139
+ </tr>
140
+ <tr>
141
+ <th><kbd>$case_sensitive</kbd></th>
142
+ <td><code>null</code></td>
143
+ <td>If false, the new route will be matched against the URI without regards to case. If true, the match will be case sensitive. If not given, the configured default will be used.</td>
144
+ </tr>
145
+ </table>
146
+ </td>
147
+ </tr>
148
+ <tr>
149
+ <th>Returns</th>
150
+ <td><i>void</i></td>
151
+ </tr>
152
+ <tr>
153
+ <th>Example</th>
154
+ <td>
155
+ <pre class="php"><code>// load a new route for 'this/that' => 'something/else'
156
+ Router::add('this/that', 'something/else');
157
+
158
+ // force it to be case sensitive
159
+ Router::add('this/that', 'something/else', true);
160
+
161
+ // manually create a Route instance which is treated as not case sensitive
162
+ $path = 'this/that';
163
+ Router::add($path, new Route($path, 'something/else', false));
164
+ </code></pre>
165
+ </td>
166
+ </tr>
167
+ </tbody>
168
+ </table>
169
+ </article>
170
+
171
+ <article>
172
+ <h4 class="method" id="method_get">get($name, $named_params = array())</h4>
173
+ <p>
174
+ The <strong>get</strong> method allows you to do reverse routing for a named route. Based on the name passed,
175
+ it will retrieve the defined path for it, and return a URI that you can use in your views.
176
+ This means that if you change your routes, the links in your views will be updated accordingly.
177
+ </p>
178
+ <table class="method">
179
+ <tbody>
180
+ <tr>
181
+ <th class="legend">Static</th>
182
+ <td>Yes</td>
183
+ </tr>
184
+ <tr>
185
+ <th>Parameters</th>
186
+ <td>
187
+ <table class="parameters">
188
+ <tr>
189
+ <th>Param</th>
190
+ <th>Default</th>
191
+ <th class="description">Description</th>
192
+ </tr>
193
+ <tr>
194
+ <th><kbd>$name</kbd></th>
195
+ <td><kbd>null</kbd></td>
196
+ <td>Name of the route to load.</td>
197
+ </tr>
198
+ <tr>
199
+ <th><kbd>$named_params</kbd></th>
200
+ <td><code>array()</code></td>
201
+ <td>Array of parameters to be added to the URI created.</td>
202
+ </tr>
203
+ </table>
204
+ </td>
205
+ </tr>
206
+ <tr>
207
+ <th>Returns</th>
208
+ <td><kbd>bool|array</kbd></td>
209
+ </tr>
210
+ <tr>
211
+ <th>Example</th>
212
+ <td>
213
+ <pre class="php"><code>// if your routes are defined like this:
214
+ return array(
215
+ '_root_' => 'welcome/index', // The default route
216
+ '_404_' => 'welcome/404', // The main 404 route
217
+
218
+ 'hello(/:name)?' => array('welcome/hello', 'name' => 'hello'),
219
+ );
220
+
221
+ // this call will return 'http://your_base_url/welcome/hello'
222
+ echo Router::get('hello');
223
+ </code></pre>
224
+ <br />
225
+ <p>
226
+ You can also do this if your route contains a named parameters, a regex, or a combination of both.
227
+ </p>
228
+ <pre class="php"><code>// if your route is defined like this:
229
+ return array(
230
+ 'thread/(?P&lt;thread_id&gt;\d+?)/post' => array('post', 'name' => 'post'),
231
+ );
232
+
233
+ // these will return 'thread/1/post':
234
+ echo Router::get('post', array('thread_id' => 1));
235
+ echo Router::get('post', array('$1' => 1));
236
+ echo Router::get('post', array(1));
237
+
238
+ // if your route is defined like this:
239
+ return array(
240
+ 'country/(?P&lt;country&gt;\d+?)/state/(?P&lt;state&gt;\d+?)/location' => array('location', 'name' => 'location'),
241
+ );
242
+
243
+ // these will return 'country/japan/state/tokyo/location':
244
+ echo Router::get('location', array('country' => 'japan', 'state' => 'tokyo'));
245
+ echo Router::get('location', array('$1' => 'japan', '$2' => 'tokyo'));
246
+ echo Router::get('location', array('japan', 'tokyo'));
247
+ echo Router::get('location', array('country' => 'japan', 'tokyo'));
248
+ echo Router::get('location', array('$1' => 'japan', 'tokyo'));
249
+ </code></pre>
250
+ <br />
251
+ <p class="note">
252
+ Note that if your route contains a mix of a traditional regex and a named parameter or a regex shortcut,
253
+ they will be replaced together, which might lead to unexpected results.
254
+ </p>
255
+ <pre class="php"><code>// if your route is defined like this:
256
+ return array(
257
+ 'hello/(:name)(/:segment)' => array('welcome/user', 'name' => 'user'),
258
+ );
259
+
260
+ // note that "(/:segment)" will be replaced in its entirely by "article", so
261
+ // this call will return 'http://your_base_url/welcome/user/johnarticle' !
262
+ echo Router::get('user', array('name' => 'john', 'article'));
263
+ </code></pre>
264
+ </td>
265
+ </tr>
266
+ </tbody>
267
+ </table>
268
+ </article>
269
+
270
+ <article>
271
+ <h4 class="method" id="method_delete">delete($path, $case_sensitive = null)</h4>
272
+ <p>
273
+ The <strong>delete</strong> method allows you to manually delete existing routes at runtime.
274
+ </p>
275
+ <table class="method">
276
+ <tbody>
277
+ <tr>
278
+ <th class="legend">Static</th>
279
+ <td>Yes</td>
280
+ </tr>
281
+ <tr>
282
+ <th>Parameters</th>
283
+ <td>
284
+ <table class="parameters">
285
+ <tr>
286
+ <th>Param</th>
287
+ <th>Default</th>
288
+ <th class="description">Description</th>
289
+ </tr>
290
+ <tr>
291
+ <th><kbd>$path</kbd></th>
292
+ <td><i>required</i></td>
293
+ <td>The URI path to be matched. This is the left side of your routes.php route definition.</td>
294
+ </tr>
295
+ <tr>
296
+ <th><kbd>$case_sensitive</kbd></th>
297
+ <td><code>null</code></td>
298
+ <td>If false, the given route path will be matched against the URI without regards to case. If true, the match will be case sensitive. If not given, the configured default will be used.</td>
299
+ </tr>
300
+ </table>
301
+ </td>
302
+ </tr>
303
+ <tr>
304
+ <th>Returns</th>
305
+ <td><i>void</i></td>
306
+ </tr>
307
+ <tr>
308
+ <th>Example</th>
309
+ <td>
310
+ <pre class="php"><code>// delete the route for 'this/that'
311
+ Router::delete('this/that');
312
+
313
+ // force it to be case sensitive
314
+ Router::delete('this/that', true);
315
+
316
+ // delete all routes that point to a module controller
317
+ Router::delete('module/controller(:any)');
318
+ </code></pre>
319
+ </td>
320
+ </tr>
321
+ </tbody>
322
+ </table>
323
+ </article>
324
+
325
+ </div>
326
+
327
+ <footer>
328
+ <p>
329
+ &copy; FuelPHP Development Team 2010-2013 - <a href="http://fuelphp.com">FuelPHP</a> is released under the MIT license.
330
+ </p>
331
+ </footer>
332
+ </div>
333
+ </body>
334
+ </html>
benchmark/NYU_CTF_Bench/development/2013/CSAW-Finals/web/historypeats/csaw/docs/classes/security.html ADDED
@@ -0,0 +1,595 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <!doctype html>
2
+ <html lang="en">
3
+ <head>
4
+ <meta charset="UTF-8">
5
+ <meta name="viewport" content="width=device-width, initial-scale=1.0">
6
+ <link rel="stylesheet" href="./../assets/css/combined.css">
7
+ <link rel="shortcut icon" href="./../favicon.ico" />
8
+ <script src="http://www.google.com/jsapi" type="text/javascript"></script>
9
+ <script type="text/javascript">
10
+ var path = './../';
11
+ var class_prefix = "Security::";
12
+ </script>
13
+ <script src="./../assets/js/combined.js"></script>
14
+ <title>Security - Classes - FuelPHP Documentation</title>
15
+ </head>
16
+ <body>
17
+ <div id="container">
18
+ <header id="header">
19
+ <div class="table">
20
+ <h1>
21
+ <strong>FuelPHP, a PHP 5.3 Framework</strong>
22
+ Documentation
23
+ </h1>
24
+
25
+ <form id="google_search">
26
+ <p>
27
+ <span id="search_clear">&nbsp;</span>
28
+ <input type="submit" name="search_submit" id="search_submit" value="search" />
29
+ <input type="text" value="" id="search_input" name="search_input" />
30
+ </p>
31
+ </form>
32
+ </div>
33
+ <nav>
34
+
35
+ <div class="clear"></div>
36
+ </nav>
37
+ <a href="#" id="toc_handle">table of contents</a>
38
+ <div class="clear"></div>
39
+ </header>
40
+
41
+ <div id="cse">
42
+ <div id="cse_point"></div>
43
+ <div id="cse_content"></div>
44
+ </div>
45
+
46
+ <div id="main">
47
+
48
+ <h2>Security Class</h2>
49
+
50
+ <p>The security class allows you to have CSRF protection in your application.</p>
51
+
52
+ <section>
53
+ <h3 id="configuration">Configuration</h3>
54
+
55
+ <p>
56
+ The security class is configured through the security section of the <kbd>app/config/config.php</kbd> configuration file.
57
+ </p>
58
+ <p>The following security configuration settings can be defined:</p>
59
+ <table class="config">
60
+ <tbody>
61
+ <tr class="header">
62
+ <th>Param</th>
63
+ <th>Type</th>
64
+ <th>Default</th>
65
+ <th>Description</th>
66
+ </tr>
67
+ <tr>
68
+ <th>token_salt</th>
69
+ <td>string</td>
70
+ <td><pre class="php"><code>'put your salt value here...'</code></pre></td>
71
+ <td>
72
+ Salt used to generate secure tokens. Make sure this contains something random to make sure your tokens are not predictable.
73
+ </td>
74
+ </tr>
75
+ <tr>
76
+ <th>csrf_token_key</th>
77
+ <td>string</td>
78
+ <td><pre class="php"><code>'fuel_csrf_token'</code></pre></td>
79
+ <td>
80
+ Name used for the CSRF token cookie, and the name of the form field containing the token.
81
+ </td>
82
+ </tr>
83
+ <tr>
84
+ <th>csrf_expiration</th>
85
+ <td>integer</td>
86
+ <td><pre class="php"><code>0</code></pre></td>
87
+ <td>
88
+ Expiration time for the CRSF token cookie. Default, the cookie expires at end of browser session.
89
+ </td>
90
+ </tr>
91
+ <tr>
92
+ <th>uri_filter</th>
93
+ <td>array</td>
94
+ <td><pre class="php"><code>array('htmlentities')</code></pre></td>
95
+ <td>
96
+ Array of callable items (PHP functions, object methods, static class methods) used to filter the URI. By default, it uses PHP's htmlentities internal function.
97
+ </td>
98
+ </tr>
99
+ <tr>
100
+ <th>input_filter</th>
101
+ <td>array</td>
102
+ <td><pre class="php"><code>array()</code></pre></td>
103
+ <td>
104
+ Array of callable items (PHP functions, object methods, static class methods) used to filter $_GET, $_POST and $_COOKIE. By default, no input filters are defined.
105
+ </td>
106
+ </tr>
107
+ <tr>
108
+ <th>output_filter</th>
109
+ <td>array</td>
110
+ <td><pre class="php"><code>array('Security::htmlentities')</code></pre></td>
111
+ <td>
112
+ Array of callable items (PHP functions, object methods, static class methods) used to filter variables send to a View or Viewmodel.
113
+ For security reasons, you are <strong>required</strong> to define an output filter.
114
+ </td>
115
+ </tr>
116
+ <tr>
117
+ <th>htmlentities_flags</th>
118
+ <td>integer</td>
119
+ <td><pre class="php"><code>null</code></pre></td>
120
+ <td>
121
+ Flags to be used when encoding HTML entities. Defaults to ENT_QUOTES if nothing is defined.
122
+ </td>
123
+ </tr>
124
+ <tr>
125
+ <th>htmlentities_double_encode</th>
126
+ <td>boolean</td>
127
+ <td><pre class="php"><code>null</code></pre></td>
128
+ <td>
129
+ Whether of not already encoded entities should be encoded again. Defaults to <strong>false</strong> if nothing is defined.
130
+ </td>
131
+ </tr>
132
+ <tr>
133
+ <th>auto_filter_output</th>
134
+ <td>boolean</td>
135
+ <td><pre class="php"><code>true</code></pre></td>
136
+ <td>
137
+ When true, all variables passed on to view objects are automatically encoded.
138
+ </td>
139
+ </tr>
140
+ <tr>
141
+ <th>whitelisted_classes</th>
142
+ <td>array</td>
143
+ <td><pre class="php"><code>array('stdClass', 'Fuel\\Core\\View',<br /> 'Fuel\\Core\\ViewModel', 'Closure')</code></pre></td>
144
+ <td>
145
+ When auto encoding of view variables is enabled, you can run into issues when passing objects to the view. Classes defined in this
146
+ array will be exempt from auto encoding.
147
+ </td>
148
+ </tr>
149
+ <tr>
150
+ <th>csrf_autoload</th>
151
+ <td>boolean</td>
152
+ <td><pre class="php"><code>true</code></pre></td>
153
+ <td>
154
+ When true, load and check the CSRF token using check_token() automatically. A SecurityException will be thrown if the check fails.
155
+ </td>
156
+ </tr>
157
+ <tr>
158
+ <th>csrf_autoload_methods</th>
159
+ <td>array</td>
160
+ <td><pre class="php"><code>array('post', 'put', 'delete')</code></pre></td>
161
+ <td>
162
+ When csrf_autoload is true, the CSRF token will be validated for all http methods in this array.
163
+ </td>
164
+ </tr>
165
+ </tbody>
166
+ </table>
167
+ <p class="note">Note that if you enable "csrf_autoload", <strong>ALL</strong> your HTTP requests of the specified type <strong>MUST</strong> contain a CSRF token, or the validation will fail and a SecurityException will be thrown.</p>
168
+ <p class="note">If you want to deal with CSRF validation failures when autoload is enabled, you can catch the SecurityException in your index.php.</p>
169
+ </section>
170
+
171
+ <article>
172
+ <h4 class="method" id="method_check_token">check_token($value = null)</h4>
173
+ <p>The <strong>check_token</strong> method allows you to check the CSRF token.<br />
174
+ Check token also ensures a token is present and will reset the token for the next session when it receives
175
+ a value to check (no matter the result of the check).</p>
176
+ <table class="method">
177
+ <tbody>
178
+ <tr>
179
+ <th class="legend">Static</th>
180
+ <td>Yes</td>
181
+ </tr>
182
+ <tr>
183
+ <th>Parameters</th>
184
+ <td>
185
+ <table class="parameters">
186
+ <tr>
187
+ <th>Param</th>
188
+ <th>Default</th>
189
+ <th class="description">Description</th>
190
+ </tr>
191
+ <tr>
192
+ <th><kbd>$value</kbd></th>
193
+ <td><pre class="php"><code>null</code></pre></td>
194
+ <td>CSRF token to be checked, checks value from POST or JSON input when not given.</td>
195
+ </tr>
196
+ </table>
197
+ </td>
198
+ </tr>
199
+ <tr>
200
+ <th>Returns</th>
201
+ <td>boolean</td>
202
+ </tr>
203
+ <tr>
204
+ <th>Example</th>
205
+ <td>
206
+ <pre class="php"><code>Security::check_token();</code></pre>
207
+ </td>
208
+ </tr>
209
+ </tbody>
210
+ </table>
211
+ </article>
212
+
213
+ <article>
214
+ <h4 class="method" id="method_fetch_token">fetch_token()</h4>
215
+ <p>The <strong>fetch_token</strong> method allows you to fetch the CSRF token from the cookie.</p>
216
+ <table class="method">
217
+ <tbody>
218
+ <tr>
219
+ <th class="legend">Static</th>
220
+ <td>Yes</td>
221
+ </tr>
222
+ <tr>
223
+ <th>Parameters</th>
224
+ <td>None</td>
225
+ </tr>
226
+ <tr>
227
+ <th>Returns</th>
228
+ <td>string</td>
229
+ </tr>
230
+ <tr>
231
+ <th>Example</th>
232
+ <td>
233
+ <pre class="php"><code>$csrf_token = Security::fetch_token();</code></pre>
234
+ </td>
235
+ </tr>
236
+ </tbody>
237
+ </table>
238
+ </article>
239
+
240
+ <article>
241
+ <h4 class="method" id="method_js_fetch_token">js_fetch_token()</h4>
242
+ <p>The <strong>js_fetch_token</strong> method allows you to produce JavaScript fuel_csrf_token() function that will return the current CSRF token when called. Use to fill right field on form submit for AJAX operations.</p>
243
+ <table class="method">
244
+ <tbody>
245
+ <tr>
246
+ <th class="legend">Static</th>
247
+ <td>Yes</td>
248
+ </tr>
249
+ <tr>
250
+ <th>Parameters</th>
251
+ <td>None</td>
252
+ </tr>
253
+ <tr>
254
+ <th>Returns</th>
255
+ <td>string</td>
256
+ </tr>
257
+ <tr>
258
+ <th>Example</th>
259
+ <td>
260
+ <pre class="php"><code>// output the javascript function
261
+ echo Security::js_fetch_token();
262
+
263
+ // you can now use the generated function in the javascript code on your page
264
+ &lt;script type="text/javascript"&gt;
265
+ var current_token = fuel_csrf_token();
266
+ &lt;/script&gt;
267
+ </code></pre>
268
+ </td>
269
+ </tr>
270
+ </tbody>
271
+ </table>
272
+ </article>
273
+
274
+ <article>
275
+ <h4 class="method" id="method_js_set_token">js_set_token()</h4>
276
+ <p>
277
+ The <strong>js_set_token</strong> method allows you to produce JavaScript
278
+ fuel_set_csrf_token() function that will set the current CSRF token field
279
+ in the form when called. Use this on an onsubmit of a form, to update the
280
+ hidden token field in the form with the current value of the csrf cookie.
281
+ You have to use this when you want to allow multiple windows open, and
282
+ use a strict rotation and expiry of the CSRF token.
283
+ </p>
284
+ <table class="method">
285
+ <tbody>
286
+ <tr>
287
+ <th class="legend">Static</th>
288
+ <td>Yes</td>
289
+ </tr>
290
+ <tr>
291
+ <th>Parameters</th>
292
+ <td>None</td>
293
+ </tr>
294
+ <tr>
295
+ <th>Returns</th>
296
+ <td>string</td>
297
+ </tr>
298
+ <tr>
299
+ <th>Example</th>
300
+ <td>
301
+ <pre class="php"><code>// output the javascript function
302
+ echo Security::js_set_token();
303
+
304
+ // you use the function generated as an onsubmit function, like so.
305
+ // do NOT forget the 'this' parameter, so the function knows which form to update!
306
+ &lt;form onsubmit="fuel_set_csrf_token(this);"&gt;
307
+ &lt;!-- do your stuff here --&gt;
308
+ &lt;/form&gt;
309
+ </code></pre>
310
+ </td>
311
+ </tr>
312
+ </tbody>
313
+ </table>
314
+ </article>
315
+
316
+ <article>
317
+ <h4 class="method" id="method_generate_token">generate_token()</h4>
318
+ <p>
319
+ The <strong>generate_token</strong> method allows you to generate a secury token.
320
+ This method is used to generate CSRF tokens, but can be used anywhere in your application where you need
321
+ a secure random token.
322
+ </p>
323
+ <table class="method">
324
+ <tbody>
325
+ <tr>
326
+ <th class="legend">Static</th>
327
+ <td>Yes</td>
328
+ </tr>
329
+ <tr>
330
+ <th>Parameters</th>
331
+ <td>None</td>
332
+ </tr>
333
+ <tr>
334
+ <th>Returns</th>
335
+ <td>string</td>
336
+ </tr>
337
+ <tr>
338
+ <th>Example</th>
339
+ <td>
340
+ <pre class="php"><code>$token = Security::generate_token();</code></pre>
341
+ </td>
342
+ </tr>
343
+ </tbody>
344
+ </table>
345
+ </article>
346
+
347
+ <article>
348
+ <h4 class="method" id="method_clean">clean($value, $filters = null)</h4>
349
+ <p>The <strong>clean</strong> method allows you clean data using the filters provided.</p>
350
+ <table class="method">
351
+ <tbody>
352
+ <tr>
353
+ <th class="legend">Static</th>
354
+ <td>Yes</td>
355
+ </tr>
356
+ <tr>
357
+ <th>Parameters</th>
358
+ <td>
359
+ <table class="parameters">
360
+ <tr>
361
+ <th>Param</th>
362
+ <th>Default</th>
363
+ <th class="description">Description</th>
364
+ </tr>
365
+ <tr>
366
+ <th><kbd>$value</kbd></th>
367
+ <td><i>Required</i></td>
368
+ <td>The value to be cleaned. This can be a string value, or an array of string values.</td>
369
+ </tr>
370
+ <tr>
371
+ <th><kbd>$filters</kbd></th>
372
+ <td><pre class="php"><code>null</code></pre></td>
373
+ <td>
374
+ The filters to be used to clean the string(s). A filter can be a single value, or an array of values. Each value must be a valid PHP callback.
375
+ You may specify functions ('htmlentities'), objects ($this), or static methods ('Classname::method').
376
+ </td>
377
+ </tr>
378
+ </table>
379
+ </td>
380
+ </tr>
381
+ <tr>
382
+ <th>Returns</th>
383
+ <td>string</td>
384
+ </tr>
385
+ <tr>
386
+ <th>Example</th>
387
+ <td>
388
+ <pre class="php"><code>// first strip tags, convert html entities in the remaining data, and finish it off using our special cleaning solution
389
+ $filters = array('strip_tags', 'htmlentities', '\\cleaners\\soap::clean');
390
+ $text = Security::clean($text, $filters);</code></pre>
391
+ </td>
392
+ </tr>
393
+ </tbody>
394
+ </table>
395
+ </article>
396
+
397
+ <article>
398
+ <h4 class="method" id="method_strip_tags">strip_tags($value)</h4>
399
+ <p>The <strong>strip_tags</strong> method allows you to strip HTML and PHP tags from a string.</p>
400
+ <table class="method">
401
+ <tbody>
402
+ <tr>
403
+ <th class="legend">Static</th>
404
+ <td>Yes</td>
405
+ </tr>
406
+ <tr>
407
+ <th>Parameters</th>
408
+ <td>
409
+ <table class="parameters">
410
+ <tr>
411
+ <th>Param</th>
412
+ <th>Default</th>
413
+ <th class="description">Description</th>
414
+ </tr>
415
+ <tr>
416
+ <th><kbd>$value</kbd></th>
417
+ <td><i>Required</i></td>
418
+ <td>The input string.</td>
419
+ </tr>
420
+ </table>
421
+ </td>
422
+ </tr>
423
+ <tr>
424
+ <th>Returns</th>
425
+ <td>string</td>
426
+ </tr>
427
+ <tr>
428
+ <th>Example</th>
429
+ <td>
430
+ <pre class="php"><code>$text = '&lt;p&gt;Test paragraph.&lt;/p&gt;';
431
+ $text = Security::strip_tags($text);</code></pre>
432
+ </td>
433
+ </tr>
434
+ </tbody>
435
+ </table>
436
+ </article>
437
+
438
+ <article>
439
+ <h4 class="method" id="method_xss_clean">xss_clean($value, array $options = array())</h4>
440
+ <p>The <strong>xss_clean</strong> method allows you to strip dangerous HTML tags from a string, using the HTMLawed library.</p>
441
+ <table class="method">
442
+ <tbody>
443
+ <tr>
444
+ <th class="legend">Static</th>
445
+ <td>Yes</td>
446
+ </tr>
447
+ <tr>
448
+ <th>Parameters</th>
449
+ <td>
450
+ <table class="parameters">
451
+ <tr>
452
+ <th>Param</th>
453
+ <th>Default</th>
454
+ <th class="description">Description</th>
455
+ </tr>
456
+ <tr>
457
+ <th><kbd>$value</kbd></th>
458
+ <td><i>Required</i></td>
459
+ <td>The input string.</td>
460
+ </tr>
461
+ <tr>
462
+ <th><kbd>$options</kbd></th>
463
+ <td><pre class="php"><code>array()</code></pre></td>
464
+ <td>Optional configuration array for htmLawed, if you require custom cleaning rules.</td>
465
+ </tr>
466
+ </table>
467
+ </td>
468
+ </tr>
469
+ <tr>
470
+ <th>Returns</th>
471
+ <td>string</td>
472
+ </tr>
473
+ <tr>
474
+ <th>Example</th>
475
+ <td>
476
+ <pre class="php"><code>$text = '&lt;SCRIPT&gt;alert("XSS attack!")&lt;/SCRIPT&gt;';
477
+ $text = Security::xss_clean($text);</code></pre>
478
+ </td>
479
+ </tr>
480
+ </tbody>
481
+ </table>
482
+ </article>
483
+
484
+ <article>
485
+ <h4 class="method" id="method_htmlentities">htmlentities($value, $flags = null, $encoding = null, $double_encode = null)</h4>
486
+ <p>
487
+ The <strong>htmlentities</strong> method allows you to turn HTML characters into their entity equivalent. This method operates identical to PHP's htmlentities() function
488
+ but supports arrays and objects as well.
489
+ </p>
490
+ <table class="method">
491
+ <tbody>
492
+ <tr>
493
+ <th class="legend">Static</th>
494
+ <td>Yes</td>
495
+ </tr>
496
+ <tr>
497
+ <th>Parameters</th>
498
+ <td>
499
+ <table class="parameters">
500
+ <tr>
501
+ <th>Param</th>
502
+ <th>Default</th>
503
+ <th class="description">Description</th>
504
+ </tr>
505
+ <tr>
506
+ <th><kbd>$value</kbd></th>
507
+ <td><i>Required</i></td>
508
+ <td>The input value.</td>
509
+ </tr>
510
+ <tr>
511
+ <th><kbd>$flags</kbd></th>
512
+ <td><pre class="php"><code>null</code></pre></td>
513
+ <td>Flags to be passed to htmlentities(). If not given and not configured, it will default to ENT_QUOTES.</td>
514
+ </tr>
515
+ <tr>
516
+ <th><kbd>$encoding</kbd></th>
517
+ <td><pre class="php"><code>null</code></pre></td>
518
+ <td>The encoding used for the value passed. If not given it will default the FuelPHP's default encoding.</td>
519
+ </tr>
520
+ <tr>
521
+ <th><kbd>$double_encoding</kbd></th>
522
+ <td><pre class="php"><code>null</code></pre></td>
523
+ <td>If true, already encoded values will not be encoded again. If not given and not configured it will default to <strong>false</strong>.</td>
524
+ </tr>
525
+ </table>
526
+ </td>
527
+ </tr>
528
+ <tr>
529
+ <th>Returns</th>
530
+ <td>mixed</td>
531
+ </tr>
532
+ <tr>
533
+ <th>Throws</th>
534
+ <td><strong>RuntimeException</strong>, in case an object has been passed that can't be cast as string.</td>
535
+ </tr>
536
+ <tr>
537
+ <th>Example</th>
538
+ <td>
539
+ <pre class="php"><code>$text = '&lt;p&gt;Test paragraph.&lt;/p&gt;';
540
+ $text = Security::htmlentities($text);</code></pre>
541
+ </td>
542
+ </tr>
543
+ </tbody>
544
+ </table>
545
+ </article>
546
+
547
+ <h3 id="procedural_helpers">Procedural helpers</h3>
548
+
549
+ <article>
550
+ <h4 id="function_e" class="method" data-class="">e($string)</h4>
551
+ <p>The <strong>e</strong> function is an alias for <a href="#method_htmlentities">Security::htmlentities</a>.</p>
552
+ <table class="method">
553
+ <tbody>
554
+ <tr>
555
+ <th>Parameters</th>
556
+ <td>
557
+ <table class="parameters">
558
+ <tr>
559
+ <th>Param</th>
560
+ <th>Default</th>
561
+ <th class="description">Description</th>
562
+ </tr>
563
+ <tr>
564
+ <th><kbd>$string</kbd></th>
565
+ <td><em>required</em></td>
566
+ <td>The input value.</td>
567
+ </tr>
568
+ </table>
569
+ </td>
570
+ </tr>
571
+ <tr>
572
+ <th>Returns</th>
573
+ <td>string, result from <a href="#method_htmlentities">Security::htmlentities</a></td>
574
+ </tr>
575
+ <tr>
576
+ <th>Example</th>
577
+ <td>
578
+ <pre class="php"><code>$text = '&lt;p&gt;Test paragraph.&lt;/p&gt;';
579
+ $text = e($text);</code></pre>
580
+ </td>
581
+ </tr>
582
+ </tbody>
583
+ </table>
584
+ </article>
585
+
586
+ </div>
587
+
588
+ <footer>
589
+ <p>
590
+ &copy; FuelPHP Development Team 2010-2013 - <a href="http://fuelphp.com">FuelPHP</a> is released under the MIT license.
591
+ </p>
592
+ </footer>
593
+ </div>
594
+ </body>
595
+ </html>
benchmark/NYU_CTF_Bench/development/2013/CSAW-Finals/web/historypeats/csaw/docs/classes/str.html ADDED
@@ -0,0 +1,782 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <!doctype html>
2
+ <html lang="en">
3
+ <head>
4
+ <meta charset="UTF-8">
5
+ <meta name="viewport" content="width=device-width, initial-scale=1.0">
6
+ <link rel="stylesheet" href="./../assets/css/combined.css">
7
+ <link rel="shortcut icon" href="./../favicon.ico" />
8
+ <script src="http://www.google.com/jsapi" type="text/javascript"></script>
9
+ <script type="text/javascript">
10
+ var path = './../';
11
+ var class_prefix = "Str::";
12
+ </script>
13
+ <script src="./../assets/js/combined.js"></script>
14
+ <title>Str - Classes - FuelPHP Documentation</title>
15
+ </head>
16
+ <body>
17
+ <div id="container">
18
+ <header id="header">
19
+ <div class="table">
20
+ <h1>
21
+ <strong>FuelPHP, a PHP 5.3 Framework</strong>
22
+ Documentation
23
+ </h1>
24
+
25
+ <form id="google_search">
26
+ <p>
27
+ <span id="search_clear">&nbsp;</span>
28
+ <input type="submit" name="search_submit" id="search_submit" value="search" />
29
+ <input type="text" value="" id="search_input" name="search_input" />
30
+ </p>
31
+ </form>
32
+ </div>
33
+ <nav>
34
+
35
+ <div class="clear"></div>
36
+ </nav>
37
+ <a href="#" id="toc_handle">table of contents</a>
38
+ <div class="clear"></div>
39
+ </header>
40
+
41
+ <div id="cse">
42
+ <div id="cse_point"></div>
43
+ <div id="cse_content"></div>
44
+ </div>
45
+
46
+ <div id="main">
47
+
48
+ <h2>Str Class</h2>
49
+
50
+ <p>The str class is a set of methods to help with the manipulation of strings.</p>
51
+
52
+ <article>
53
+ <h4 class="method" id="method_increment">increment($str, $first = 1)</h4>
54
+ <p>The <strong>increment</strong> method allows you to append a number to the end of a string or increment that number if it already exists.</p>
55
+ <table class="method">
56
+ <tbody>
57
+ <tr>
58
+ <th class="legend">Static</th>
59
+ <td>Yes</td>
60
+ </tr>
61
+ <tr>
62
+ <th>Parameters</th>
63
+ <td>
64
+ <table class="parameters">
65
+ <tr>
66
+ <th>Param</th>
67
+ <th>Default</th>
68
+ <th class="description">Description</th>
69
+ </tr>
70
+ <tr>
71
+ <th><kbd>$string</kbd></th>
72
+ <td><em>required</em></td>
73
+ <td>The string to increment.</td>
74
+ </tr>
75
+ <tr>
76
+ <th><kbd>$first</kbd></th>
77
+ <td><pre class="php"><code>1</code></pre></td>
78
+ <td>The first number to increment with.</td>
79
+ </tr>
80
+ </table>
81
+ </td>
82
+ </tr>
83
+ <tr>
84
+ <th>Returns</th>
85
+ <td>string</td>
86
+ </tr>
87
+ <tr>
88
+ <th>Example</th>
89
+ <td>
90
+ <pre class="php"><code>$string = "filename";
91
+ Str::increment($string); // returns filename_1
92
+
93
+ $string = "filename_1";
94
+ Str::increment($string); // returns filename_2
95
+
96
+ $string = "filename";
97
+ Str::increment($string, 3); // returns filename_3
98
+ </code></pre>
99
+ </td>
100
+ </tr>
101
+ </tbody>
102
+ </table>
103
+ </article>
104
+
105
+ <article>
106
+ <h4 class="method" id="method_random">random($type = 'alnum', $length = 8)</h4>
107
+ <p>The <strong>random</strong> method generates a random string based on the type given.</p>
108
+ <table class="method">
109
+ <tbody>
110
+ <tr>
111
+ <th class="legend">Static</th>
112
+ <td>Yes</td>
113
+ </tr>
114
+ <tr>
115
+ <th>Parameters</th>
116
+ <td>
117
+ <table class="parameters">
118
+ <tr>
119
+ <th>Param</th>
120
+ <th>Default</th>
121
+ <th class="description">Description</th>
122
+ </tr>
123
+ <tr>
124
+ <th><kbd>$type</kbd></th>
125
+ <td><em>alnum</em></td>
126
+ <td>The type of string to generate. Your choices are alnum, numeric, nozero, alpha, distinct, hexdec, unique, sha1 and uuid.</td>
127
+ </tr>
128
+ <tr>
129
+ <th><kbd>$length</kbd></th>
130
+ <td><pre class="php"><code>16</code></pre></td>
131
+ <td>The number of characters you would like the final string to be (unique, sha1 and uuid ignore this parameter).</td>
132
+ </tr>
133
+ </table>
134
+ </td>
135
+ </tr>
136
+ <tr>
137
+ <th>Returns</th>
138
+ <td>string</td>
139
+ </tr>
140
+ <tr>
141
+ <th>Example</th>
142
+ <td>
143
+ <pre class="php"><code>// alnum (uppercase and lowercase letters mixed with numbers)
144
+ Str::random('alnum', 16);
145
+ // Returns: SvZi9Dh3lq7zQYim
146
+
147
+ // numeric (just numbers)
148
+ Str::random('numeric', 16);
149
+ // Returns: 1045343964672481
150
+
151
+ // nozero (just numbers excluding zero)
152
+ Str::random('nozero', 16);
153
+ // Returns: 3244623373994515
154
+
155
+ // alpha (just uppercase and lowercase letters)
156
+ Str::random('alpha', 16);
157
+ // Returns: LuVAXbmxQbbWoYqz
158
+
159
+ // distinct (uppercase letters and numbers that cannot be confused)
160
+ Str::random('distinct', 16);
161
+ // Returns: R79MPKMH4KTRN35J
162
+
163
+ // hexdec (hexadecimal characters a-f, 0-9)
164
+ Str::random('hexdec', 16);
165
+ // Returns: 09c34e42f36547f8
166
+
167
+ // unique (32 character string based on md5)
168
+ Str::random('unique');
169
+ // Returns: ed4bb844a35b7a4edb7eed0d3795d328
170
+
171
+ // sha1 (40 character string based on sha1)
172
+ Str::random('sha1');
173
+ // Returns: af5c5a8cc3be9a3180205c1ed2975015cd6cf1e7
174
+
175
+ // uuid (version 4 - random)
176
+ Str::random('uuid');
177
+ // Returns: f47ac10b-58cc-4372-a567-0e02b2c3d479</code></pre>
178
+ </td>
179
+ </tr>
180
+ </tbody>
181
+ </table>
182
+ </article>
183
+
184
+ <article>
185
+ <h4 class="method" id="method_truncate">truncate($string, $limit, $continuation = '...', $is_html = false)</h4>
186
+ <p>The <strong>truncate</strong> method allows you to limit characters and provide a continuation string without breaking html.</p>
187
+ <table class="method">
188
+ <tbody>
189
+ <tr>
190
+ <th class="legend">Static</th>
191
+ <td>Yes</td>
192
+ </tr>
193
+ <tr>
194
+ <th>Parameters</th>
195
+ <td>
196
+ <table class="parameters">
197
+ <tr>
198
+ <th>Param</th>
199
+ <th>Default</th>
200
+ <th class="description">Description</th>
201
+ </tr>
202
+ <tr>
203
+ <th><kbd>$string</kbd></th>
204
+ <td><em>required</em></td>
205
+ <td>The string to truncate.</td>
206
+ </tr>
207
+ <tr>
208
+ <th><kbd>$limit</kbd></th>
209
+ <td><em>required</em></td>
210
+ <td>The number of characters to allow in the string.</td>
211
+ </tr>
212
+ <tr>
213
+ <th><kbd>$continuation</kbd></th>
214
+ <td><pre class="php"><code>'...'</code></pre></td>
215
+ <td>The string to append to the end of the truncated string.</td>
216
+ </tr>
217
+ <tr>
218
+ <th><kbd>$is_html</kbd></th>
219
+ <td><pre class="php"><code>false</code></pre></td>
220
+ <td>If the string contains html. Setting this as true will make the method not break html.</td>
221
+ </tr>
222
+ </table>
223
+ </td>
224
+ </tr>
225
+ <tr>
226
+ <th>Returns</th>
227
+ <td>string</td>
228
+ </tr>
229
+ <tr>
230
+ <th>Example</th>
231
+ <td>
232
+ <pre class="php"><code>$string = "Lorem ipsum dolor sit amet, consectetur adipiscing elit.";
233
+ Str::truncate($string, 15); // returns Lorem ipsum dol...
234
+
235
+ $string = "Lorem ipsum dolor sit amet, consectetur adipiscing elit.";
236
+ Str::truncate($string, 15, '...Read More'); // returns Lorem ipsum dol...Read More
237
+ </code></pre>
238
+ </td>
239
+ </tr>
240
+ </tbody>
241
+ </table>
242
+ </article>
243
+
244
+ <article>
245
+ <h4 class="method" id="method_alternator">alternator(*$args)</h4>
246
+ <p>Returns a closure that will alternate the values you've passed to this method as arguments, unless you
247
+ call the closure with <kbd>false</kbd> as argument - in which case it will just return the value
248
+ without moving to the next and return the same value on the next call.</p>
249
+ <table class="method">
250
+ <tbody>
251
+ <tr>
252
+ <th class="legend">Static</th>
253
+ <td>Yes</td>
254
+ </tr>
255
+ <tr>
256
+ <th>Parameters</th>
257
+ <td>
258
+ <table class="parameters">
259
+ <tr>
260
+ <th>Param</th>
261
+ <th>Default</th>
262
+ <th class="description">Description</th>
263
+ </tr>
264
+ <tr>
265
+ <th><kbd>*$args</kbd></th>
266
+ <td><em>required</em></td>
267
+ <td>As many arguments as you need to alternate</td>
268
+ </tr>
269
+ </table>
270
+ </td>
271
+ </tr>
272
+ <tr>
273
+ <th>Returns</th>
274
+ <td>Closure</td>
275
+ </tr>
276
+ <tr>
277
+ <th>Example</th>
278
+ <td>
279
+ <pre class="php"><code>$alt = Str::alternator('one', 'two', 'three', 'four');
280
+ echo $alt(); // outputs 'one'
281
+ echo $alt(); // outputs 'two'
282
+ echo $alt(false); // outputs 'three', but doens't move to the next as you can see in the next call
283
+ echo $alt(); // outputs 'three'
284
+ echo $alt(); // outputs 'four'
285
+ echo $alt(); // outputs 'one'
286
+ // etc...</code></pre>
287
+ </td>
288
+ </tr>
289
+ </tbody>
290
+ </table>
291
+ </article>
292
+
293
+ <article>
294
+ <h4 class="method" id="method_upper">upper($str, $encoding = null)</h4>
295
+ <p>The <strong>upper</strong> method converts all characters to uppercase. It is equivalent to PHP's strtoupper() for your specific character encoding.</p>
296
+ <table class="method">
297
+ <tbody>
298
+ <tr>
299
+ <th class="legend">Static</th>
300
+ <td>Yes</td>
301
+ </tr>
302
+ <tr>
303
+ <th>Parameters</th>
304
+ <td>
305
+ <table class="parameters">
306
+ <tr>
307
+ <th>Param</th>
308
+ <th>Type</th>
309
+ <th>Default</th>
310
+ <th class="description">Description</th>
311
+ </tr>
312
+ <tr>
313
+ <th><kbd>$string</kbd></th>
314
+ <td><em>string</em></td>
315
+ <td><em>Required</em></td>
316
+ <td>The input string.</td>
317
+ </tr>
318
+ <tr>
319
+ <th><kbd>$encoding</kbd></th>
320
+ <td><em>string</em></td>
321
+ <td><pre class="php"><code>null</code></pre></td>
322
+ <td>The character encoding.</td>
323
+ </tr>
324
+ </table>
325
+ </td>
326
+ </tr>
327
+ <tr>
328
+ <th>Returns</th>
329
+ <td>string</td>
330
+ </tr>
331
+ <tr>
332
+ <th>Example</th>
333
+ <td>
334
+ <pre class="php"><code>Str::upper('User Data'); // returns 'USER DATA'</code></pre>
335
+ </td>
336
+ </tr>
337
+ </tbody>
338
+ </table>
339
+ </article>
340
+
341
+ <article>
342
+ <h4 class="method" id="method_lower">lower($str, $encoding = null)</h4>
343
+ <p>The <strong>lower</strong> method converts all characters to lowercase. It is equivalent to PHP's strtolower() for your specific character encoding.</p>
344
+ <table class="method">
345
+ <tbody>
346
+ <tr>
347
+ <th class="legend">Static</th>
348
+ <td>Yes</td>
349
+ </tr>
350
+ <tr>
351
+ <th>Parameters</th>
352
+ <td>
353
+ <table class="parameters">
354
+ <tr>
355
+ <th>Param</th>
356
+ <th>Type</th>
357
+ <th>Default</th>
358
+ <th class="description">Description</th>
359
+ </tr>
360
+ <tr>
361
+ <th><kbd>$string</kbd></th>
362
+ <td><em>string</em></td>
363
+ <td><em>Required</em></td>
364
+ <td>The input string.</td>
365
+ </tr>
366
+ <tr>
367
+ <th><kbd>$encoding</kbd></th>
368
+ <td><em>string</em></td>
369
+ <td><pre class="php"><code>null</code></pre></td>
370
+ <td>The character encoding.</td>
371
+ </tr>
372
+ </table>
373
+ </td>
374
+ </tr>
375
+ <tr>
376
+ <th>Returns</th>
377
+ <td>string</td>
378
+ </tr>
379
+ <tr>
380
+ <th>Example</th>
381
+ <td>
382
+ <pre class="php"><code>Str::lower('User Data'); // returns 'user data'</code></pre>
383
+ </td>
384
+ </tr>
385
+ </tbody>
386
+ </table>
387
+ </article>
388
+
389
+ <article>
390
+ <h4 class="method" id="method_tr">tr($string, $array = array())</h4>
391
+ <p>The <strong>tr</strong> method parse the params from given string using PHP's strtr().</p>
392
+ <table class="method">
393
+ <tbody>
394
+ <tr>
395
+ <th class="legend">Static</th>
396
+ <td>Yes</td>
397
+ </tr>
398
+ <tr>
399
+ <th>Parameters</th>
400
+ <td>
401
+ <table class="parameters">
402
+ <tr>
403
+ <th>Param</th>
404
+ <th>Type</th>
405
+ <th>Default</th>
406
+ <th class="description">Description</th>
407
+ </tr>
408
+ <tr>
409
+ <th><kbd>$string</kbd></th>
410
+ <td><em>string</em></td>
411
+ <td><em>Required</em></td>
412
+ <td>The input string.</td>
413
+ </tr>
414
+ <tr>
415
+ <th><kbd>$array</kbd></th>
416
+ <td><em>array</em></td>
417
+ <td><pre class="php"><code>array()</code></pre></td>
418
+ <td>params to str_replace.</td>
419
+ </tr>
420
+ </table>
421
+ </td>
422
+ </tr>
423
+ <tr>
424
+ <th>Returns</th>
425
+ <td>string</td>
426
+ </tr>
427
+ <tr>
428
+ <th>Example</th>
429
+ <td>
430
+ <pre class="php"><code>Str::tr('Hello :name', array('name' => 'World')); // returns 'Hello World'</code></pre>
431
+ </td>
432
+ </tr>
433
+ </tbody>
434
+ </table>
435
+ </article>
436
+
437
+ <article>
438
+ <h4 class="method" id="method_is_json">is_json($string)</h4>
439
+ <p>The <strong>is_json</strong> method check if a string is json encoded.</p>
440
+ <table class="method">
441
+ <tbody>
442
+ <tr>
443
+ <th class="legend">Static</th>
444
+ <td>Yes</td>
445
+ </tr>
446
+ <tr>
447
+ <th>Parameters</th>
448
+ <td>
449
+ <table class="parameters">
450
+ <tr>
451
+ <th>Param</th>
452
+ <th>Type</th>
453
+ <th>Default</th>
454
+ <th class="description">Description</th>
455
+ </tr>
456
+ <tr>
457
+ <th><kbd>$string</kbd></th>
458
+ <td><em>string</em></td>
459
+ <td><em>Required</em></td>
460
+ <td>The input string.</td>
461
+ </tr>
462
+ </table>
463
+ </td>
464
+ </tr>
465
+ <tr>
466
+ <th>Returns</th>
467
+ <td>bool</td>
468
+ </tr>
469
+ <tr>
470
+ <th>Example</th>
471
+ <td>
472
+ <pre class="php"><code>Str::is_json('{"0":"An","encoded":["string"]}'); // returns true</code></pre>
473
+ </td>
474
+ </tr>
475
+ </tbody>
476
+ </table>
477
+ </article>
478
+
479
+ <article>
480
+ <h4 class="method" id="method_is_serialized">is_serialized($string)</h4>
481
+ <p>The <strong>is_serialized</strong> method check if a string is serialized.</p>
482
+ <table class="method">
483
+ <tbody>
484
+ <tr>
485
+ <th class="legend">Static</th>
486
+ <td>Yes</td>
487
+ </tr>
488
+ <tr>
489
+ <th>Parameters</th>
490
+ <td>
491
+ <table class="parameters">
492
+ <tr>
493
+ <th>Param</th>
494
+ <th>Type</th>
495
+ <th>Default</th>
496
+ <th class="description">Description</th>
497
+ </tr>
498
+ <tr>
499
+ <th><kbd>$string</kbd></th>
500
+ <td><em>string</em></td>
501
+ <td><em>Required</em></td>
502
+ <td>The input string.</td>
503
+ </tr>
504
+ </table>
505
+ </td>
506
+ </tr>
507
+ <tr>
508
+ <th>Returns</th>
509
+ <td>bool</td>
510
+ </tr>
511
+ <tr>
512
+ <th>Example</th>
513
+ <td>
514
+ <pre class="php"><code>Str::is_serialized('a:2:{i:0;s:2:"An";s:7:"encoded";a:1:{i:0;s:6:"string";}}');
515
+ // returns true</code></pre>
516
+ </td>
517
+ </tr>
518
+ </tbody>
519
+ </table>
520
+ </article>
521
+
522
+ <article>
523
+ <h4 class="method" id="method_is_html">is_html($string)</h4>
524
+ <p>The <strong>is_html</strong> method check if a string is html.</p>
525
+ <table class="method">
526
+ <tbody>
527
+ <tr>
528
+ <th class="legend">Static</th>
529
+ <td>Yes</td>
530
+ </tr>
531
+ <tr>
532
+ <th>Parameters</th>
533
+ <td>
534
+ <table class="parameters">
535
+ <tr>
536
+ <th>Param</th>
537
+ <th>Type</th>
538
+ <th>Default</th>
539
+ <th class="description">Description</th>
540
+ </tr>
541
+ <tr>
542
+ <th><kbd>$string</kbd></th>
543
+ <td><em>string</em></td>
544
+ <td><em>Required</em></td>
545
+ <td>The input string.</td>
546
+ </tr>
547
+ </table>
548
+ </td>
549
+ </tr>
550
+ <tr>
551
+ <th>Returns</th>
552
+ <td>bool</td>
553
+ </tr>
554
+ <tr>
555
+ <th>Example</th>
556
+ <td>
557
+ <pre class="php"><code>Str::is_html('Lorem ipsum &lt;b>dolor sit amet&lt;/b>, consectetur &lt;u>adipiscing&lt;/u> elit.');
558
+ // returns true</code></pre>
559
+ </td>
560
+ </tr>
561
+ </tbody>
562
+ </table>
563
+ </article>
564
+
565
+ <article>
566
+ <h4 class="method" id="method_is_xml">is_xml($string)</h4>
567
+ <p>The <strong>is_xml</strong> method check if a string is a valid xml. Requires the <a href="http://www.php.net/manual/en/ref.libxml.php" target="_blank">libxml extension</a>.</p>
568
+ <table class="method">
569
+ <tbody>
570
+ <tr>
571
+ <th class="legend">Static</th>
572
+ <td>Yes</td>
573
+ </tr>
574
+ <tr>
575
+ <th>Parameters</th>
576
+ <td>
577
+ <table class="parameters">
578
+ <tr>
579
+ <th>Param</th>
580
+ <th>Type</th>
581
+ <th>Default</th>
582
+ <th class="description">Description</th>
583
+ </tr>
584
+ <tr>
585
+ <th><kbd>$string</kbd></th>
586
+ <td><em>string</em></td>
587
+ <td><em>Required</em></td>
588
+ <td>The input string.</td>
589
+ </tr>
590
+ </table>
591
+ </td>
592
+ </tr>
593
+ <tr>
594
+ <th>Returns</th>
595
+ <td>bool</td>
596
+ </tr>
597
+ <tr>
598
+ <th>Example</th>
599
+ <td>
600
+ <pre class="php"><code>Str::is_xml('&lt;?xml version="1.0" encoding="utf-8"?>&lt;xml>&lt;foo>bar&lt;/foo>&lt;/xml>');
601
+ // returns true</code></pre>
602
+ </td>
603
+ </tr>
604
+ </tbody>
605
+ </table>
606
+ </article>
607
+
608
+ <article>
609
+ <h4 class="method" id="method_starts_with">starts_with($str, $start, $ignore_case = false)</h4>
610
+ <p>The <strong>starts_with</strong> method checks whether a string has a precific beginning.</p>
611
+ <table class="method">
612
+ <tbody>
613
+ <tr>
614
+ <th class="legend">Static</th>
615
+ <td>Yes</td>
616
+ </tr>
617
+ <tr>
618
+ <th>Parameters</th>
619
+ <td>
620
+ <table class="parameters">
621
+ <tr>
622
+ <th>Param</th>
623
+ <th>Default</th>
624
+ <th class="description">Description</th>
625
+ </tr>
626
+ <tr>
627
+ <th><kbd>$str</kbd></th>
628
+ <td><em>required</em></td>
629
+ <td>The string to check.</td>
630
+ </tr>
631
+ <tr>
632
+ <th><kbd>$start</kbd></th>
633
+ <td><em>required</em></td>
634
+ <td>The beginning to check for.</td>
635
+ </tr>
636
+ <tr>
637
+ <th><kbd>$ignore_case</kbd></th>
638
+ <td><pre class="php"><code>false</code></pre></td>
639
+ <td>Whether to ignore the case.</td>
640
+ </tr>
641
+ </table>
642
+ </td>
643
+ </tr>
644
+ <tr>
645
+ <th>Returns</th>
646
+ <td>bool</td>
647
+ </tr>
648
+ <tr>
649
+ <th>Example</th>
650
+ <td>
651
+ <pre class="php"><code>$string = "Lorem ipsum dolor sit amet";
652
+
653
+ Str::starts_with($string, 'Lorem'); // returns true
654
+ Str::starts_with($string, 'lorem'); // returns false
655
+ Str::starts_with($string, 'lorem', true); // returns true
656
+ </code></pre>
657
+ </td>
658
+ </tr>
659
+ </tbody>
660
+ </table>
661
+ </article>
662
+
663
+ <article>
664
+ <h4 class="method" id="method_ends_with">ends_with($str, $end, $ignore_case = false)</h4>
665
+ <p>The <strong>ends_with</strong> method checks whether or not a string has a precific ending.</p>
666
+ <table class="method">
667
+ <tbody>
668
+ <tr>
669
+ <th class="legend">Static</th>
670
+ <td>Yes</td>
671
+ </tr>
672
+ <tr>
673
+ <th>Parameters</th>
674
+ <td>
675
+ <table class="parameters">
676
+ <tr>
677
+ <th>Param</th>
678
+ <th>Default</th>
679
+ <th class="description">Description</th>
680
+ </tr>
681
+ <tr>
682
+ <th><kbd>$str</kbd></th>
683
+ <td><em>required</em></td>
684
+ <td>The string to check.</td>
685
+ </tr>
686
+ <tr>
687
+ <th><kbd>$end</kbd></th>
688
+ <td><em>required</em></td>
689
+ <td>The ending to check for.</td>
690
+ </tr>
691
+ <tr>
692
+ <th><kbd>$ignore_case</kbd></th>
693
+ <td><pre class="php"><code>false</code></pre></td>
694
+ <td>Whether to ignore the case.</td>
695
+ </tr>
696
+ </table>
697
+ </td>
698
+ </tr>
699
+ <tr>
700
+ <th>Returns</th>
701
+ <td>bool</td>
702
+ </tr>
703
+ <tr>
704
+ <th>Example</th>
705
+ <td>
706
+ <pre class="php"><code>$string = "Lorem ipsum dolor sit amet";
707
+
708
+ Str::ends_with($string, 'amet'); // returns true
709
+ Str::ends_with($string, 'Amet'); // returns false
710
+ Str::ends_with($string, 'Amet', true); // returns true
711
+ </code></pre>
712
+ </td>
713
+ </tr>
714
+ </tbody>
715
+ </table>
716
+ </article>
717
+
718
+ <article>
719
+ <h4 class="method" id="method_sub">sub($str, $start, $length = null, $encoding = null)</h4>
720
+ <p>The <strong>sub</strong> method returns the portion of the string specified. It is equivalent to PHP's substr() for your specific character encoding.</p>
721
+ <table class="method">
722
+ <tbody>
723
+ <tr>
724
+ <th class="legend">Static</th>
725
+ <td>Yes</td>
726
+ </tr>
727
+ <tr>
728
+ <th>Parameters</th>
729
+ <td>
730
+ <table class="parameters">
731
+ <tr>
732
+ <th>Param</th>
733
+ <th>Default</th>
734
+ <th class="description">Description</th>
735
+ </tr>
736
+ <tr>
737
+ <th><kbd>$str</kbd></th>
738
+ <td><em>required</em></td>
739
+ <td>The input string.</td>
740
+ </tr>
741
+ <tr>
742
+ <th><kbd>$start</kbd></th>
743
+ <td><em>required</em></td>
744
+ <td>Position of first character. See <a href="http://php.net/substr" target="_blank">php.net</a> for detailed usage.</td>
745
+ </tr>
746
+ <tr>
747
+ <th><kbd>$length</kbd></th>
748
+ <td><pre class="php"><code>null</code></pre></td>
749
+ <td>Maximum number of characters. See <a href="http://php.net/substr" target="_blank">php.net</a> for detailed usage.</td>
750
+ </tr>
751
+ <tr>
752
+ <th><kbd>$encoding</kbd></th>
753
+ <td><pre class="php"><code>null</code></pre></td>
754
+ <td>The character encoding.</td>
755
+ </tr>
756
+ </table>
757
+ </td>
758
+ </tr>
759
+ <tr>
760
+ <th>Returns</th>
761
+ <td>string</td>
762
+ </tr>
763
+ <tr>
764
+ <th>Example</th>
765
+ <td>
766
+ <pre class="php"><code>Str::sub('User Data', 3, -1); // returns 'r Dat'</code></pre>
767
+ </td>
768
+ </tr>
769
+ </tbody>
770
+ </table>
771
+ </article>
772
+
773
+ </div>
774
+
775
+ <footer>
776
+ <p>
777
+ &copy; FuelPHP Development Team 2010-2013 - <a href="http://fuelphp.com">FuelPHP</a> is released under the MIT license.
778
+ </p>
779
+ </footer>
780
+ </div>
781
+ </body>
782
+ </html>
benchmark/NYU_CTF_Bench/development/2013/CSAW-Finals/web/historypeats/csaw/docs/classes/uri.html ADDED
@@ -0,0 +1,561 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <!doctype html>
2
+ <html lang="en">
3
+ <head>
4
+ <meta charset="UTF-8">
5
+ <meta name="viewport" content="width=device-width, initial-scale=1.0">
6
+ <link rel="stylesheet" href="./../assets/css/combined.css">
7
+ <link rel="shortcut icon" href="./../favicon.ico" />
8
+ <script src="http://www.google.com/jsapi" type="text/javascript"></script>
9
+ <script type="text/javascript">
10
+ var path = './../';
11
+ var class_prefix = "Uri::";
12
+ </script>
13
+ <script src="./../assets/js/combined.js"></script>
14
+ <title>Uri - Classes - FuelPHP Documentation</title>
15
+ </head>
16
+ <body>
17
+ <div id="container">
18
+ <header id="header">
19
+ <div class="table">
20
+ <h1>
21
+ <strong>FuelPHP, a PHP 5.3 Framework</strong>
22
+ Documentation
23
+ </h1>
24
+
25
+ <form id="google_search">
26
+ <p>
27
+ <span id="search_clear">&nbsp;</span>
28
+ <input type="submit" name="search_submit" id="search_submit" value="search" />
29
+ <input type="text" value="" id="search_input" name="search_input" />
30
+ </p>
31
+ </form>
32
+ </div>
33
+ <nav>
34
+
35
+ <div class="clear"></div>
36
+ </nav>
37
+ <a href="#" id="toc_handle">table of contents</a>
38
+ <div class="clear"></div>
39
+ </header>
40
+
41
+ <div id="cse">
42
+ <div id="cse_point"></div>
43
+ <div id="cse_content"></div>
44
+ </div>
45
+
46
+ <div id="main">
47
+
48
+ <h2>Uri Class</h2>
49
+
50
+ <p>The Uri class allows you to interact with the URI.</p>
51
+
52
+ <article>
53
+ <h4 class="method" id="method_base">base($include_index = true)</h4>
54
+ <p>
55
+ The <strong>base</strong> method return the base URL, excluding the index_file when <strong>$include_index</strong>
56
+ is set to <em>false</em>.
57
+ </p>
58
+ <p class="note">
59
+ Please note: <strong>$include_index</strong> will be ignored if index_file is not set app/config/config.php
60
+ </p>
61
+ <table class="method">
62
+ <tbody>
63
+ <tr>
64
+ <th class="legend">Static</th>
65
+ <td>Yes</td>
66
+ </tr>
67
+ <tr>
68
+ <th>Parameters</th>
69
+ <td>
70
+ <table class="parameters">
71
+ <tr>
72
+ <th>Param</th>
73
+ <th>Default</th>
74
+ <th class="description">Description</th>
75
+ </tr>
76
+ <tr>
77
+ <th><kbd>$include_index</kbd></th>
78
+ <td><pre class="php"><code>true</code></pre></td>
79
+ <td>Whether to append the index to the returned url.</td>
80
+ </tr>
81
+ </table>
82
+ </td>
83
+ </tr>
84
+ <tr>
85
+ <th>Returns</th>
86
+ <td>string, the base url with optional index file appended</td>
87
+ </tr>
88
+ <tr>
89
+ <th>Example</th>
90
+ <td>
91
+ <pre class="php"><code>echo Uri::base();
92
+ // http://localhost/index.php
93
+
94
+ echo Uri::base(false);
95
+ // http://localhost/</code></pre>
96
+ </td>
97
+ </tr>
98
+ </tbody>
99
+ </table>
100
+ </article>
101
+
102
+ <article>
103
+ <h4 class="method" id="method_create">create($uri = null, $variables = array(), $get_variables = array(), $secure = null)</h4>
104
+ <p>The <strong>create</strong> method allows you to create a URL with the given URI, including the base URL.</p>
105
+ <table class="method">
106
+ <tbody>
107
+ <tr>
108
+ <th class="legend">Static</th>
109
+ <td>Yes</td>
110
+ </tr>
111
+ <tr>
112
+ <th>Parameters</th>
113
+ <td>
114
+ <table class="parameters">
115
+ <tr>
116
+ <th>Param</th>
117
+ <th>Default</th>
118
+ <th class="description">Description</th>
119
+ </tr>
120
+ <tr>
121
+ <th><kbd>$uri</kbd></th>
122
+ <td><pre class="php"><code>null</code></pre></td>
123
+ <td>The URL.</td>
124
+ </tr>
125
+ <tr>
126
+ <th><kbd>$variables</kbd></th>
127
+ <td><pre class="php"><code>array()</code></pre></td>
128
+ <td>The variables for the URL.</td>
129
+ </tr>
130
+ <tr>
131
+ <th><kbd>$get_variables</kbd></th>
132
+ <td><pre class="php"><code>array()</code></pre></td>
133
+ <td>The query string additions to the URL, its values &amp; keys can use variables from
134
+ the $variables array.</td>
135
+ </tr>
136
+ <tr>
137
+ <th><kbd>$secure</kbd></th>
138
+ <td><pre class="php"><code>null</code></pre></td>
139
+ <td>Set to false to force http, or to true to force https on the created URL</td>
140
+ </tr>
141
+ </table>
142
+ </td>
143
+ </tr>
144
+ <tr>
145
+ <th>Returns</th>
146
+ <td>string</td>
147
+ </tr>
148
+ <tr>
149
+ <th>Example</th>
150
+ <td>
151
+ <pre class="php"><code>echo Uri::create('controller/method');
152
+ // returns http://localhost/controller/method
153
+
154
+ echo Uri::create('controller/:some', array('some' => 'thing', 'and' => 'more'), array('what' => ':and'));
155
+ // returns http://localhost/controller/thing?what=more
156
+
157
+ echo Uri::create('http://www.example.org/:some', array('some' => 'thing', 'and' => 'more'), array('what' => ':and'));
158
+ // returns http://www.example.org/thing?what=more
159
+
160
+ echo Uri::create('http://www.example.org/:some', array('some' => 'thing', 'and' => 'more'), array('what' => ':and'), true);
161
+ // returns https://www.example.org/thing?what=more</code></pre>
162
+ </td>
163
+ </tr>
164
+ </tbody>
165
+ </table>
166
+ </article>
167
+
168
+ <article>
169
+ <h4 class="method" id="method_current">current()</h4>
170
+ <p>The <strong>current</strong> method allows you to fetch the current URL, including the base URL inside HMVC pattern.</p>
171
+ <table class="method">
172
+ <tbody>
173
+ <tr>
174
+ <th class="legend">Static</th>
175
+ <td>Yes</td>
176
+ </tr>
177
+ <tr>
178
+ <th>Parameters</th>
179
+ <td>None</td>
180
+ </tr>
181
+ <tr>
182
+ <th>Returns</th>
183
+ <td>string</td>
184
+ </tr>
185
+ <tr>
186
+ <th>Example</th>
187
+ <td>
188
+ <pre class="php"><code>// Example URL: http://localhost/module/controller/method
189
+ echo Uri::current(); // returns http://localhost/module/controller/method</code></pre>
190
+ </td>
191
+ </tr>
192
+ </tbody>
193
+ </table>
194
+ </article>
195
+
196
+ <article>
197
+ <h4 class="method" id="method_main">main()</h4>
198
+ <p>The <strong>main</strong> method allows you to fetch the current URL, including the base URL.</p>
199
+ <table class="method">
200
+ <tbody>
201
+ <tr>
202
+ <th class="legend">Static</th>
203
+ <td>Yes</td>
204
+ </tr>
205
+ <tr>
206
+ <th>Parameters</th>
207
+ <td>None</td>
208
+ </tr>
209
+ <tr>
210
+ <th>Returns</th>
211
+ <td>string</td>
212
+ </tr>
213
+ <tr>
214
+ <th>Example</th>
215
+ <td>
216
+ <pre class="php"><code>// Example URL: http://localhost/controller/method
217
+ echo Uri::main(); // returns http://localhost/controller/method</code></pre>
218
+ </td>
219
+ </tr>
220
+ </tbody>
221
+ </table>
222
+ </article>
223
+
224
+ <article>
225
+ <h4 class="method" id="method_segment">segment($segment, $default = null)</h4>
226
+ <p>The <strong>segment</strong> method allows you to return the desired segment, or false if it does not exist.</p>
227
+ <table class="method">
228
+ <tbody>
229
+ <tr>
230
+ <th class="legend">Static</th>
231
+ <td>Yes</td>
232
+ </tr>
233
+ <tr>
234
+ <th>Parameters</th>
235
+ <td>
236
+ <table class="parameters">
237
+ <tr>
238
+ <th>Param</th>
239
+ <th>Default</th>
240
+ <th class="description">Description</th>
241
+ </tr>
242
+ <tr>
243
+ <th><kbd>$segment</kbd></th>
244
+ <td><i>Required</i></td>
245
+ <td>The segment number.</td>
246
+ </tr>
247
+ <tr>
248
+ <th><kbd>$default</kbd></th>
249
+ <td><pre class="php"><code>null</code></pre></td>
250
+ <td>The default?</td>
251
+ </tr>
252
+ </table>
253
+ </td>
254
+ </tr>
255
+ <tr>
256
+ <th>Returns</th>
257
+ <td>string</td>
258
+ </tr>
259
+ <tr>
260
+ <th>Example</th>
261
+ <td>
262
+ <pre class="php"><code>// Example URL: http://localhost/controller/method/param1/param2
263
+ echo Uri::segment(3); // returns param1</code></pre>
264
+ </td>
265
+ </tr>
266
+ </tbody>
267
+ </table>
268
+ </article>
269
+
270
+ <article>
271
+ <h4 class="method" id="method_segments">segments()</h4>
272
+ <p>The <strong>segments</strong> method allows you to fetch the current URI segments in an array.</p>
273
+ <table class="method">
274
+ <tbody>
275
+ <tr>
276
+ <th class="legend">Static</th>
277
+ <td>Yes</td>
278
+ </tr>
279
+ <tr>
280
+ <th>Parameters</th>
281
+ <td>None</td>
282
+ </tr>
283
+ <tr>
284
+ <th>Returns</th>
285
+ <td>array</td>
286
+ </tr>
287
+ <tr>
288
+ <th>Example</th>
289
+ <td>
290
+ <pre class="php"><code>// Example URL: http://localhost/controller/method
291
+ echo Uri::segments(); // returns array(0 => 'controller', 1 => 'method')</code></pre>
292
+ </td>
293
+ </tr>
294
+ </tbody>
295
+ </table>
296
+ </article>
297
+
298
+ <article>
299
+ <h4 class="method" id="method_segment_replace">segment_replace($url, $secure = null)</h4>
300
+ <p>The <strong>segment_replace</strong> method allows you to replace wildcards in a given url by the current URI segment in that position.</p>
301
+ <table class="method">
302
+ <tbody>
303
+ <tr>
304
+ <th class="legend">Static</th>
305
+ <td>Yes</td>
306
+ </tr>
307
+ <tr>
308
+ <th>Parameters</th>
309
+ <td>
310
+ <table class="parameters">
311
+ <tr>
312
+ <th>Param</th>
313
+ <th>Default</th>
314
+ <th class="description">Description</th>
315
+ </tr>
316
+ <tr>
317
+ <th><kbd>$url</kbd></th>
318
+ <td><i>Required</i></td>
319
+ <td>The url containing wildcards. A wildcard is defined by a * character.</td>
320
+ </tr>
321
+ <tr>
322
+ <th><kbd>$secure</kbd></th>
323
+ <td><pre class="php"><code>null</code></pre></td>
324
+ <td>If false, the url returned will use HTTP, if true, it will use HTTPS.</td>
325
+ </tr>
326
+ </table>
327
+ </td>
328
+ </tr>
329
+ <tr>
330
+ <th>Returns</th>
331
+ <td>string</td>
332
+ </tr>
333
+ <tr>
334
+ <th>Throws</th>
335
+ <td>OutOfBoundsException, if a wildcard is at a segment location for which no value exists.</td>
336
+ </tr>
337
+ <tr>
338
+ <th>Example</th>
339
+ <td>
340
+ <pre class="php"><code>// Example: Current URL = http://localhost/one/two, with segments 'one' and 'two'
341
+
342
+ // returns http://localhost/one/two/three
343
+ echo Uri::segment_replace('http://localhost/*/*/three');
344
+
345
+ // throws an exception, as there is no third segment available
346
+ echo Uri::segment_replace('http://localhost/this/that/*/other');
347
+
348
+ // returns https://localhost/one/two/three
349
+ echo Uri::segment_replace('http://localhost/*/*/three', true);</code></pre>
350
+ </td>
351
+ </tr>
352
+ </tbody>
353
+ </table>
354
+ </article>
355
+
356
+ <article>
357
+ <h4 class="method" id="method_update_query_string">update_query_string($vars = array(), $uri = null, $secure = null)</h4>
358
+ <p>
359
+ The <strong>update_query_string</strong> method allows you to update the query string in the current or passed URI.
360
+ </p>
361
+ <table class="method">
362
+ <tbody>
363
+ <tr>
364
+ <th class="legend">Static</th>
365
+ <td>Yes</td>
366
+ </tr>
367
+ <tr>
368
+ <th>Parameters</th>
369
+ <td>
370
+ <table class="parameters">
371
+ <tr>
372
+ <th>Param</th>
373
+ <th>Default</th>
374
+ <th class="description">Description</th>
375
+ </tr>
376
+ <tr>
377
+ <th><kbd>$vars</kbd></th>
378
+ <td><pre class="php"><code>array()</code></pre></td>
379
+ <td>An assoc array of query variables, or a string containing the variable name.</td>
380
+ </tr>
381
+ <tr>
382
+ <th><kbd>$uri</kbd></th>
383
+ <td><pre class="php"><code>null</code></pre></td>
384
+ <td>
385
+ The url to use. If not given, the current url will be used. If $vars is a string, this will contain
386
+ the variables value (which implies you can't pass a custom uri in that case!).
387
+ </td>
388
+ </tr>
389
+ <tr>
390
+ <th><kbd>$secure</kbd></th>
391
+ <td><pre class="php"><code>null</code></pre></td>
392
+ <td>If false, the url returned will use HTTP, if true, it will use HTTPS.</td>
393
+ </tr>
394
+ </table>
395
+ </td>
396
+ </tr>
397
+ <tr>
398
+ <th>Returns</th>
399
+ <td>string</td>
400
+ </tr>
401
+ <tr>
402
+ <th>Example</th>
403
+ <td>
404
+ <pre class="php"><code>// Example: Current URL = http://localhost/test?one=1&amp;two=2
405
+
406
+ // returns http://localhost/test?one=1&amp;two=2&amp;three=3
407
+ echo Uri::update_query_string(array('three' => 3));
408
+
409
+ // returns http://localhost/test?one=1&amp;two=3
410
+ echo Uri::update_query_string(array('two' => 3));
411
+
412
+ // returns http://localhost/controller?four=4
413
+ echo Uri::update_query_string(array('four' => 4), 'http://localhost/controller');
414
+
415
+ // returns https://localhost/test?one=1&amp;two=2&amp;three=3
416
+ echo Uri::update_query_string('three', 3, true);</code></pre>
417
+ </td>
418
+ </tr>
419
+ </tbody>
420
+ </table>
421
+ </article>
422
+
423
+ <article>
424
+ <h4 class="method" id="method_to_assoc">to_assoc($start = 1)</h4>
425
+ <p>The <strong>to_assoc</strong> method takes the segments array and turns it into an associative array if the number of segments is even. If the number of segments is odd, the last array key will have a value of <code>null</code>.</p>
426
+ <table class="method">
427
+ <tbody>
428
+ <tr>
429
+ <th class="legend">Static</th>
430
+ <td>Yes</td>
431
+ </tr>
432
+ <tr>
433
+ <th>Parameters</th>
434
+ <td>
435
+ <table class="parameters">
436
+ <tr>
437
+ <th>Param</th>
438
+ <th>Default</th>
439
+ <th class="description">Description</th>
440
+ </tr>
441
+ <tr>
442
+ <th><kbd>$start</kbd></th>
443
+ <td><pre class="php"><code>1</code></pre></td>
444
+ <td>The segment number to start with. This allows you to strip leading segments.</td>
445
+ </tr>
446
+ </table>
447
+ </td>
448
+ </tr>
449
+ <tr>
450
+ <th>Returns</th>
451
+ <td>array</td>
452
+ </tr>
453
+ <tr>
454
+ <th>Example</th>
455
+ <td>
456
+ <pre class="php"><code>// Uri is /welcome/index/page/4
457
+ $arr = Uri::to_assoc();
458
+ /*
459
+ Result:
460
+ array(
461
+ 'welcome' => 'index',
462
+ 'page' => 4,
463
+ );
464
+ */
465
+
466
+ // Uri is /welcome
467
+ $arr = Uri::to_assoc();
468
+ /*
469
+ Result:
470
+ array(
471
+ 'welcome' => null,
472
+ );
473
+ */</code></pre>
474
+ </td>
475
+ </tr>
476
+ </tbody>
477
+ </table>
478
+ </article>
479
+
480
+ <article>
481
+ <h4 class="method" id="method_string">string()</h4>
482
+ <p>The <strong>string</strong> method allows you to fetch the current URI.</p>
483
+ <table class="method">
484
+ <tbody>
485
+ <tr>
486
+ <th class="legend">Static</th>
487
+ <td>Yes</td>
488
+ </tr>
489
+ <tr>
490
+ <th>Parameters</th>
491
+ <td>None</td>
492
+ </tr>
493
+ <tr>
494
+ <th>Returns</th>
495
+ <td>string</td>
496
+ </tr>
497
+ <tr>
498
+ <th>Example</th>
499
+ <td>
500
+ <pre class="php"><code>// Example URL: http://localhost/controller/method
501
+ echo Uri::string(); // returns controller/method</code></pre>
502
+ </td>
503
+ </tr>
504
+ </tbody>
505
+ </table>
506
+ </article>
507
+
508
+ <article>
509
+ <h4 class="method" id="method_build_query_string">build_query_string($values ...)</h4>
510
+ <p>
511
+ The <strong>build_query_string</strong> method allows you to generate a query string from one or more passed assoc array or string values.
512
+ You can pass in Input::get() to construct an updated query string from the existing one. If you pass a string, it will be assumed to be a
513
+ switch, and will be converted to "string=1".
514
+ </p>
515
+ <table class="method">
516
+ <tbody>
517
+ <tr>
518
+ <th class="legend">Static</th>
519
+ <td>Yes</td>
520
+ </tr>
521
+ <tr>
522
+ <th>Parameters</th>
523
+ <td>
524
+ <table class="parameters">
525
+ <tr>
526
+ <th>Param</th>
527
+ <th>Default</th>
528
+ <th class="description">Description</th>
529
+ </tr>
530
+ <tr>
531
+ <th><kbd>$values</kbd></th>
532
+ <td><i>Required</i></td>
533
+ <td>One or more associative array's or string values</td>
534
+ </tr>
535
+ </table>
536
+ </td>
537
+ </tr>
538
+ <tr>
539
+ <th>Returns</th>
540
+ <td>string</td>
541
+ </tr>
542
+ <tr>
543
+ <th>Example</th>
544
+ <td>
545
+ <pre class="php"><code>// returns "varA=varA&amp;varB=1&amp;varC=varC"
546
+ echo Uri::build_query_string(array('varA' => 'varA'), 'varB', array('varC' => 'varC'));</code></pre>
547
+ </td>
548
+ </tr>
549
+ </tbody>
550
+ </table>
551
+ </article>
552
+ </div>
553
+
554
+ <footer>
555
+ <p>
556
+ &copy; FuelPHP Development Team 2010-2013 - <a href="http://fuelphp.com">FuelPHP</a> is released under the MIT license.
557
+ </p>
558
+ </footer>
559
+ </div>
560
+ </body>
561
+ </html>
benchmark/NYU_CTF_Bench/development/2013/CSAW-Finals/web/historypeats/csaw/docs/classes/view.html ADDED
@@ -0,0 +1,713 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <!doctype html>
2
+ <html lang="en">
3
+ <head>
4
+ <meta charset="UTF-8">
5
+ <meta name="viewport" content="width=device-width, initial-scale=1.0">
6
+ <link rel="stylesheet" href="./../assets/css/combined.css">
7
+ <link rel="shortcut icon" href="./../favicon.ico" />
8
+ <script src="http://www.google.com/jsapi" type="text/javascript"></script>
9
+ <script type="text/javascript">
10
+ var path = './../';
11
+ var class_prefix = "View::";
12
+ </script>
13
+ <script src="./../assets/js/combined.js"></script>
14
+ <title>View - Classes - FuelPHP Documentation</title>
15
+ </head>
16
+ <body>
17
+ <div id="container">
18
+ <header id="header">
19
+ <div class="table">
20
+ <h1>
21
+ <strong>FuelPHP, a PHP 5.3 Framework</strong>
22
+ Documentation
23
+ </h1>
24
+
25
+ <form id="google_search">
26
+ <p>
27
+ <span id="search_clear">&nbsp;</span>
28
+ <input type="submit" name="search_submit" id="search_submit" value="search" />
29
+ <input type="text" value="" id="search_input" name="search_input" />
30
+ </p>
31
+ </form>
32
+ </div>
33
+ <nav>
34
+
35
+ <div class="clear"></div>
36
+ </nav>
37
+ <a href="#" id="toc_handle">table of contents</a>
38
+ <div class="clear"></div>
39
+ </header>
40
+
41
+ <div id="cse">
42
+ <div id="cse_point"></div>
43
+ <div id="cse_content"></div>
44
+ </div>
45
+
46
+ <div id="main">
47
+
48
+ <h2>View Class</h2>
49
+
50
+ <p>
51
+ The View class acts as an object wrapper for HTML pages with embedded PHP, called "views".
52
+ Variables can be assigned with the view object and referenced locally within the view.
53
+ </p>
54
+
55
+ <p>
56
+ <a href="../general/views.html">Read more about using views.</a>
57
+ </p>
58
+
59
+ <article>
60
+ <h4 class="method" id="method_construct">__construct($file = null, $data = null, $filter = null)</h4>
61
+ <table class="method">
62
+ <tbody>
63
+ <tr>
64
+ <th>Static</th>
65
+ <td>No</td>
66
+ </tr>
67
+ <tr>
68
+ <th>Parameters</th>
69
+ <td>
70
+ <table class="parameters">
71
+ <tr>
72
+ <th>Param</th>
73
+ <th>Default</th>
74
+ <th class="description">Description</th>
75
+ </tr>
76
+ <tr>
77
+ <th><kbd>$file</kbd></th>
78
+ <td><pre class="php"><code>null</code></pre></td>
79
+ <td class="description">the view filename, if not supplied you must supply it later through <em>set_filename</em> or supply it in <em>render</em>. View files should be relative to the <em>app/views</em> directory.</td>
80
+ </tr>
81
+ <tr>
82
+ <th><kbd>$data</kbd></th>
83
+ <td><pre class="php"><code>null</code></pre></td>
84
+ <td class="description">array of values</td>
85
+ </tr>
86
+ <tr>
87
+ <th><kbd>$filter</kbd></th>
88
+ <td><pre class="php"><code>null</code></pre></td>
89
+ <td class="description">set to <em>true</em> or <em>false</em> to set auto encoding, defaults to main config setting (app/config/config.php)</td>
90
+ </tr>
91
+ </table>
92
+ </td>
93
+ </tr>
94
+ <tr>
95
+ <th>Returns</th>
96
+ <td>a new <em>View</em> object</td>
97
+ </tr>
98
+ <tr>
99
+ <th>Example</th>
100
+ <td>
101
+ <pre class="php"><code>$view = new View('path/to/view', array(
102
+ 'menu' => $menu,
103
+ 'articles' => $articles,
104
+ 'footer_links' => $footer_links,
105
+ ));</code></pre>
106
+ </td>
107
+ </tr>
108
+ </tbody>
109
+ </table>
110
+ </article>
111
+
112
+ <article>
113
+ <h4 class="method" id="method_forge">forge($file = null, $data = null, $filter = null)</h4>
114
+ <p>The <strong>forge</strong> method returns a new View object.</p>
115
+ <table class="method">
116
+ <tbody>
117
+ <tr>
118
+ <th>Static</th>
119
+ <td>Yes</td>
120
+ </tr>
121
+ <tr>
122
+ <th>Parameters</th>
123
+ <td>
124
+ <table class="parameters">
125
+ <tr>
126
+ <th>Param</th>
127
+ <th>Default</th>
128
+ <th class="description">Description</th>
129
+ </tr>
130
+ <tr>
131
+ <th><kbd>$file</kbd></th>
132
+ <td><pre class="php"><code>null</code></pre></td>
133
+ <td class="description">the view filename, if not supplied you must supply it later through <em>set_filename</em> or supply it in <em>render</em>. View files should be relative to the <em>app/views</em> directory and be supplied without the <strong>.php</strong> file extension.</td>
134
+ </tr>
135
+ <tr>
136
+ <th><kbd>$data</kbd></th>
137
+ <td><pre class="php"><code>null</code></pre></td>
138
+ <td class="description">array of values</td>
139
+ </tr>
140
+ <tr>
141
+ <th><kbd>$filter</kbd></th>
142
+ <td><pre class="php"><code>null</code></pre></td>
143
+ <td class="description">tet to <em>true</em> or <em>false</em> to set auto encoding, defaults to main config setting (app/config/config.php)</td>
144
+ </tr>
145
+ </table>
146
+ </td>
147
+ </tr>
148
+ <tr>
149
+ <th>Returns</th>
150
+ <td>a new <em>View</em> object</td>
151
+ </tr>
152
+ <tr>
153
+ <th>Example</th>
154
+ <td>
155
+ <pre class="php"><code>// Will create a View object for APPPATH/
156
+ $view = View::forge('path/to/view', array(
157
+ 'menu' => $menu,
158
+ 'articles' => $articles,
159
+ 'footer_links' => $footer_links,
160
+ ));</code></pre>
161
+ </td>
162
+ </tr>
163
+ </tbody>
164
+ </table>
165
+ </article>
166
+
167
+ <article>
168
+ <h4 class="method" id="method_auto_encode">auto_filter($filter = true)</h4>
169
+ <p>The <strong>auto_filter</strong> method sets whether to encode the data or not on a View instance.</p>
170
+ <table class="method">
171
+ <tbody>
172
+ <tr>
173
+ <th>Static</th>
174
+ <td>No</td>
175
+ </tr>
176
+ <tr>
177
+ <th>Parameters</th>
178
+ <td>
179
+ <table class="parameters">
180
+ <tr>
181
+ <th>Param</th>
182
+ <th>Default</th>
183
+ <th class="description">Description</th>
184
+ </tr>
185
+ <tr>
186
+ <th><kbd>$filter</kbd></th>
187
+ <td><pre class="php"><code>true</code></pre></td>
188
+ <td class="description">whether to encode the data or not on a View instance</td>
189
+ </tr>
190
+ </table>
191
+ </td>
192
+ </tr>
193
+ <tr>
194
+ <th>Returns</th>
195
+ <td>Current View object</td>
196
+ </tr>
197
+ <tr>
198
+ <th>Example</th>
199
+ <td>
200
+ <pre class="php"><code>$view = View::forge('path/to/view', array(
201
+ 'menu' => $menu,
202
+ 'articles' => $articles,
203
+ 'footer_links' => $footer_links,
204
+ ));
205
+
206
+ $view->auto_filter();
207
+
208
+ // or set it to false
209
+
210
+ $view->auto_filter(false);
211
+
212
+ // or chain it
213
+
214
+ $view = View::forge('path/to/view', array(
215
+ 'menu' => $menu,
216
+ 'articles' => $articles,
217
+ 'footer_links' => $footer_links,
218
+ ))->auto_filter();</code></pre>
219
+ </td>
220
+ </tr>
221
+ </tbody>
222
+ </table>
223
+ </article>
224
+
225
+ <article>
226
+ <h4 class="method" id="method_set_filename">set_filename($file)</h4>
227
+ <p>The <strong>set_filename</strong> method allows you to set or change the view filename.</p>
228
+ <table class="method">
229
+ <tbody>
230
+ <tr>
231
+ <th>Static</th>
232
+ <td>No</td>
233
+ </tr>
234
+ <tr>
235
+ <th>Parameters</th>
236
+ <td>
237
+ <table class="parameters">
238
+ <tr>
239
+ <th>Param</th>
240
+ <th>Default</th>
241
+ <th class="description">Description</th>
242
+ </tr>
243
+ <tr>
244
+ <th><kbd>$file</kbd></th>
245
+ <td><em>required</em></td>
246
+ <td class="description">the view filename, view files should be relative to the <em>app/views</em> directory and be supplied without the <strong>.php</strong> extension.</td>
247
+ </tr>
248
+ </table>
249
+ </td>
250
+ </tr>
251
+ <tr>
252
+ <th>Returns</th>
253
+ <td>Current View object</td>
254
+ </tr>
255
+ <tr>
256
+ <th>Example</th>
257
+ <td>
258
+ <pre class="php"><code>$view = new View();
259
+
260
+ $view->set_filename('path/to/view');</code></pre>
261
+ </td>
262
+ </tr>
263
+ </tbody>
264
+ </table>
265
+ </article>
266
+
267
+ <article>
268
+ <h4 class="method" id="method_get">get($key = null, $default = null)</h4>
269
+ <p>The <strong>get</strong> method retrieves one or all variables set on a view.</p>
270
+ <table class="method">
271
+ <tbody>
272
+ <tr>
273
+ <th>Static</th>
274
+ <td>No</td>
275
+ </tr>
276
+ <tr>
277
+ <th>Parameters</th>
278
+ <td>
279
+ <table class="parameters">
280
+ <tr>
281
+ <th>Param</th>
282
+ <th>Default</th>
283
+ <th class="description">Description</th>
284
+ </tr>
285
+ <tr>
286
+ <th><kbd>$key</kbd></th>
287
+ <td><pre class="php"><code>null</code></pre></td>
288
+ <td class="description">variable name</td>
289
+ </tr>
290
+ <tr>
291
+ <th><kbd>$default</kbd></th>
292
+ <td><pre class="php"><code>null</code></pre></td>
293
+ <td class="description">default value to return if the variable isn't set</td>
294
+ </tr>
295
+ </table>
296
+ </td>
297
+ </tr>
298
+ <tr>
299
+ <th>Returns</th>
300
+ <td>mixed</td>
301
+ </tr>
302
+ <tr>
303
+ <th>Example</th>
304
+ <td>
305
+ <pre class="php"><code>// create a view and set some data
306
+ $view = new View;
307
+ $view->set(array('field1' =&gt; 'value1', 'field2' =&gt; 'value2');
308
+
309
+ // get a single value
310
+ $field1 = $view->get('field1');
311
+
312
+ // get a single value, set a default if the field does not exist
313
+ $field3 = $view->get('field3', 'value3');
314
+
315
+ // get all values
316
+ $fields = $view->get();</code></pre>
317
+ </td>
318
+ </tr>
319
+ </tbody>
320
+ </table>
321
+ </article>
322
+
323
+ <article>
324
+ <h4 class="method" id="method_set">set($key, $value = null, $filter = null)</h4>
325
+ <p>The <strong>set</strong> method assigns a variable to a view.</p>
326
+ <table class="method">
327
+ <tbody>
328
+ <tr>
329
+ <th>Static</th>
330
+ <td>No</td>
331
+ </tr>
332
+ <tr>
333
+ <th>Parameters</th>
334
+ <td>
335
+ <table class="parameters">
336
+ <tr>
337
+ <th>Param</th>
338
+ <th>Default</th>
339
+ <th class="description">Description</th>
340
+ </tr>
341
+ <tr>
342
+ <th><kbd>$key</kbd></th>
343
+ <td><em>required</em></td>
344
+ <td class="description">variable name or array of variables</td>
345
+ </tr>
346
+ <tr>
347
+ <th><kbd>$value</kbd></th>
348
+ <td><pre class="php"><code>null</code></pre></td>
349
+ <td class="description">the value</td>
350
+ </tr>
351
+ <tr>
352
+ <th><kbd>$filter</kbd></th>
353
+ <td><pre class="php"><code>null</code></pre></td>
354
+ <td class="description">set to <em>true</em> or <em>false</em> to encoding, defaults to main auto encoding setting</td>
355
+ </tr>
356
+ </table>
357
+ </td>
358
+ </tr>
359
+ <tr>
360
+ <th>Returns</th>
361
+ <td>Current View object</td>
362
+ </tr>
363
+ <tr>
364
+ <th>Example</th>
365
+ <td>
366
+ <pre class="php"><code>$view = new View;
367
+ $view->set('users', $users, false);
368
+
369
+ // or set an array
370
+
371
+ $view->set(array(
372
+ 'users' => $users,
373
+ 'articles' => $articles,
374
+ ), null, true);
375
+
376
+ // If you need HTML / Javascript passed you need to set the last param to false
377
+ // when output encoding is enabled.
378
+ $view->set('example', '&lt;h1&gt;Heading&lt;/h1&gt;', false);</code></pre>
379
+ </td>
380
+ </tr>
381
+ </tbody>
382
+ </table>
383
+ </article>
384
+
385
+ <article>
386
+ <h4 class="method" id="method_set_safe">set_safe($key, $value = null)</h4>
387
+ <p>The same as <code>set()</code>, except this defaults to not-encoding the variable on output.</p>
388
+ <table class="method">
389
+ <tbody>
390
+ <tr>
391
+ <th>Static</th>
392
+ <td>No</td>
393
+ </tr>
394
+ <tr>
395
+ <th>Parameters</th>
396
+ <td>
397
+ <table class="parameters">
398
+ <tr>
399
+ <th>Param</th>
400
+ <th>Default</th>
401
+ <th class="description">Description</th>
402
+ </tr>
403
+ <tr>
404
+ <th><kbd>$key</kbd></th>
405
+ <td><em>required</em></td>
406
+ <td class="description">variable name or array of variables</td>
407
+ </tr>
408
+ <tr>
409
+ <th><kbd>$value</kbd></th>
410
+ <td><pre class="php"><code>null</code></pre></td>
411
+ <td class="description">the value</td>
412
+ </tr>
413
+ </table>
414
+ </td>
415
+ </tr>
416
+ <tr>
417
+ <th>Returns</th>
418
+ <td>Current View object</td>
419
+ </tr>
420
+ <tr>
421
+ <th>Example</th>
422
+ <td>
423
+ <pre class="php"><code>$view = new View;
424
+ $view->set_safe('users', $users);
425
+
426
+ // or set an array
427
+
428
+ $view->set_safe(array(
429
+ 'users' => $users,
430
+ 'articles' => $articles,
431
+ ), null);</code></pre>
432
+ </td>
433
+ </tr>
434
+ </tbody>
435
+ </table>
436
+ </article>
437
+
438
+ <article>
439
+ <h4 class="method" id="method_set_global">set_global($key, $value = null, $filter = null)</h4>
440
+ <p>The <strong>set_global</strong> method sets a variable accessible for all views.</p>
441
+ <table class="method">
442
+ <tbody>
443
+ <tr>
444
+ <th>Static</th>
445
+ <td>Yes</td>
446
+ </tr>
447
+ <tr>
448
+ <th>Parameters</th>
449
+ <td>
450
+ <table class="parameters">
451
+ <tr>
452
+ <th>Param</th>
453
+ <th>Default</th>
454
+ <th class="description">Description</th>
455
+ </tr>
456
+ <tr>
457
+ <th><kbd>$key</kbd></th>
458
+ <td><em>required</em></td>
459
+ <td class="description">variable name or array of variables</td>
460
+ </tr>
461
+ <tr>
462
+ <th><kbd>$value</kbd></th>
463
+ <td><pre class="php"><code>null</code></pre></td>
464
+ <td class="description">the value</td>
465
+ </tr>
466
+ <tr>
467
+ <th><kbd>$filter</kbd></th>
468
+ <td><pre class="php"><code>null</code></pre></td>
469
+ <td class="description">set to <em>true</em> or <em>false</em> to encoding, defaults to main auto encoding setting</td>
470
+ </tr>
471
+ </table>
472
+ </td>
473
+ </tr>
474
+ <tr>
475
+ <th>Returns</th>
476
+ <td><em>Void</em></td>
477
+ </tr>
478
+ <tr>
479
+ <th>Example</th>
480
+ <td>
481
+ <pre class="php"><code>View::set_global('users', $users, false);
482
+
483
+ // or set an array
484
+
485
+ View::set_global(array(
486
+ 'users' => $users,
487
+ 'articles' => $articles,
488
+ ), null, true);</code></pre>
489
+ </td>
490
+ </tr>
491
+ </tbody>
492
+ </table>
493
+ </article>
494
+
495
+ <article>
496
+ <h4 class="method" id="method_bind">bind($key, $value = null)</h4>
497
+ <p>
498
+ Assigns a value by reference. The benefit of binding is that values can be altered without re-setting
499
+ them. It is also possible to bind variables before they have values. Assigned values will be available
500
+ as a variable within the view file.
501
+ </p>
502
+ <p class="note">Please note: these cannot be cleaned by output encoding and should thus be considered unsafe.</p>
503
+ <table class="method">
504
+ <tbody>
505
+ <tr>
506
+ <th>Static</th>
507
+ <td>No</td>
508
+ </tr>
509
+ <tr>
510
+ <th>Parameters</th>
511
+ <td>
512
+ <table class="parameters">
513
+ <tr>
514
+ <th>Param</th>
515
+ <th>Default</th>
516
+ <th class="description">Description</th>
517
+ </tr>
518
+ <tr>
519
+ <th><kbd>$key</kbd></th>
520
+ <td><em>required</em></td>
521
+ <td class="description">variable name or array of variables</td>
522
+ </tr>
523
+ <tr>
524
+ <th><kbd>$value</kbd></th>
525
+ <td><pre class="php"><code>null</code></pre></td>
526
+ <td class="description">the value</td>
527
+ </tr>
528
+ </table>
529
+ </td>
530
+ </tr>
531
+ <tr>
532
+ <th>Returns</th>
533
+ <td>Current View object</td>
534
+ </tr>
535
+ <tr>
536
+ <th>Example</th>
537
+ <td>
538
+ <pre class="php"><code>$view = new View;
539
+ $view->bind('users', $users, false);
540
+
541
+ // or set an array
542
+
543
+ $view->bind(array(
544
+ 'users' => $users,
545
+ 'articles' => $articles,
546
+ ), null, true);</code></pre>
547
+ </td>
548
+ </tr>
549
+ </tbody>
550
+ </table>
551
+ </article>
552
+
553
+ <article>
554
+ <h4 class="method" id="method_bind_global">bind_global($key, $value = null)</h4>
555
+ <p>The <strong>bind_global</strong> method assigns a global variable by reference accessible for all views.</p>
556
+ <p class="note">Please note: these cannot be cleaned by output encoding and should thus be considered unsafe.</p>
557
+ <table class="method">
558
+ <tbody>
559
+ <tr>
560
+ <th>Static</th>
561
+ <td>Yes</td>
562
+ </tr>
563
+ <tr>
564
+ <th>Parameters</th>
565
+ <td>
566
+ <table class="parameters">
567
+ <tr>
568
+ <th>Param</th>
569
+ <th>Default</th>
570
+ <th class="description">Description</th>
571
+ </tr>
572
+ <tr>
573
+ <th><kbd>$key</kbd></th>
574
+ <td><em>required</em></td>
575
+ <td class="description">variable name</td>
576
+ </tr>
577
+ <tr>
578
+ <th><kbd>$value</kbd></th>
579
+ <td><em>required</em></td>
580
+ <td class="description">the value</td>
581
+ </tr>
582
+ </table>
583
+ </td>
584
+ </tr>
585
+ <tr>
586
+ <th>Returns</th>
587
+ <td><em>Void</em></td>
588
+ </tr>
589
+ <tr>
590
+ <th>Example</th>
591
+ <td>
592
+ <pre class="php"><code>View::bind_global('users', $users);</code></pre>
593
+ </td>
594
+ </tr>
595
+ </tbody>
596
+ </table>
597
+ </article>
598
+
599
+ <article>
600
+ <h4 class="method" id="method_render">render($file = null)</h4>
601
+ <p>
602
+ The <strong>render</strong> method renders the view object to a string.
603
+ Global and local data are merged and extracted to create local variables within the view file.
604
+ </p>
605
+ <table class="method">
606
+ <tbody>
607
+ <tr>
608
+ <th>Static</th>
609
+ <td>No</td>
610
+ </tr>
611
+ <tr>
612
+ <th>Parameters</th>
613
+ <td>
614
+ <table class="parameters">
615
+ <tr>
616
+ <th>Param</th>
617
+ <th>Type</th>
618
+ <th>Default</th>
619
+ <th class="description">Description</th>
620
+ </tr>
621
+ <tr>
622
+ <th><kbd>$file</kbd></th>
623
+ <td><em>string</em></td>
624
+ <td><pre class="php"><code>null</code></pre></td>
625
+ <td class="description">the view filename without the extension</td>
626
+ </tr>
627
+ </table>
628
+ </td>
629
+ </tr>
630
+ <tr>
631
+ <th>Returns</th>
632
+ <td><strong>the rendered view file</strong></td>
633
+ </tr>
634
+ <tr>
635
+ <th>Example</th>
636
+ <td>
637
+ <pre class="php"><code>$html = View::forge()->render('path/to/view');
638
+
639
+ // or
640
+
641
+ $html = View::forge('path/to/view')->render();
642
+
643
+ // or
644
+
645
+ $html = View::forge()->set_filename('path/to/view')->render();</code></pre>
646
+ </td>
647
+ </tr>
648
+ </tbody>
649
+ </table>
650
+ </article>
651
+
652
+ <h3 id="procedural_helpers">Procedural helpers</h3>
653
+
654
+ <article>
655
+ <h4 id="function_render" class="method" data-class="">render($view, $data = array(), $auto_filter = null)</h4>
656
+ <p>The <strong>render</strong> function is an alias for <a href="#method_render">View::render</a>.</p>
657
+ <table class="method">
658
+ <tbody>
659
+ <tr>
660
+ <th>Parameters</th>
661
+ <td>
662
+ <table class="parameters">
663
+ <tr>
664
+ <th>Param</th>
665
+ <th>Type</th>
666
+ <th>Default</th>
667
+ <th class="description">Description</th>
668
+ </tr>
669
+ <tr>
670
+ <th><kbd>$view</kbd></th>
671
+ <td><em>string</em></td>
672
+ <td><em>required</em></td>
673
+ <td class="description">the view filename without the extension</td>
674
+ </tr>
675
+ <tr>
676
+ <th><kbd>$data</kbd></th>
677
+ <td><em>array</em></td>
678
+ <td><pre class="php"><code>array()</code></pre></td>
679
+ <td class="description">an array of data to be passed to the view</td>
680
+ </tr>
681
+ <tr>
682
+ <th><kbd>$auto_filter</kbd></th>
683
+ <td><em>bool</em></td>
684
+ <td><pre class="php"><code>null</code></pre></td>
685
+ <td class="description">whether to filter the data or not</td>
686
+ </tr>
687
+ </table>
688
+ </td>
689
+ </tr>
690
+ <tr>
691
+ <th>Returns</th>
692
+ <td><strong>string, the result from <a href="#method_render">View::render</a></strong></td>
693
+ </tr>
694
+ <tr>
695
+ <th>Example</th>
696
+ <td>
697
+ <pre class="php"><code>$html = render('path/to/view', $data_array);</code></pre>
698
+ </td>
699
+ </tr>
700
+ </tbody>
701
+ </table>
702
+ </article>
703
+
704
+ </div>
705
+
706
+ <footer>
707
+ <p>
708
+ &copy; FuelPHP Development Team 2010-2013 - <a href="http://fuelphp.com">FuelPHP</a> is released under the MIT license.
709
+ </p>
710
+ </footer>
711
+ </div>
712
+ </body>
713
+ </html>
benchmark/NYU_CTF_Bench/development/2013/CSAW-Finals/web/historypeats/csaw/docs/general/classes.html ADDED
@@ -0,0 +1,123 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <!doctype html>
2
+ <html lang="en">
3
+ <head>
4
+ <meta charset="UTF-8">
5
+ <meta name="viewport" content="width=device-width, initial-scale=1.0">
6
+ <link rel="stylesheet" href="./../assets/css/combined.css">
7
+ <link rel="shortcut icon" href="./../favicon.ico" />
8
+ <script src="http://www.google.com/jsapi" type="text/javascript"></script>
9
+ <script type="text/javascript">
10
+ var path = './../';
11
+ </script>
12
+ <script src="./../assets/js/combined.js"></script>
13
+ <title>Classes - General - FuelPHP Documentation</title>
14
+ </head>
15
+ <body>
16
+ <div id="container">
17
+ <header id="header">
18
+ <div class="table">
19
+ <h1>
20
+ <strong>FuelPHP, a PHP 5.3 Framework</strong>
21
+ Documentation
22
+ </h1>
23
+
24
+ <form id="google_search">
25
+ <p>
26
+ <span id="search_clear">&nbsp;</span>
27
+ <input type="submit" name="search_submit" id="search_submit" value="search" />
28
+ <input type="text" value="" id="search_input" name="search_input" />
29
+ </p>
30
+ </form>
31
+ </div>
32
+ <nav>
33
+
34
+ <div class="clear"></div>
35
+ </nav>
36
+ <a href="#" id="toc_handle">table of contents</a>
37
+ <div class="clear"></div>
38
+ </header>
39
+
40
+ <div id="cse">
41
+ <div id="cse_point"></div>
42
+ <div id="cse_content"></div>
43
+ </div>
44
+
45
+ <div id="main">
46
+
47
+ <h2>Classes</h2>
48
+
49
+ <h3 id="what_is_a_class">What is a class?</h3>
50
+
51
+ <p>A class is just a normal PHP class. It doesn't need to extend anything or follow any conventions other than the naming convention which is the same as all other classes in Fuel.</p>
52
+
53
+ <pre class="php"><code>class Session</code></pre>
54
+
55
+ <p>That will be loaded from app/classes/session.php.</p>
56
+
57
+ <h3 id="loading_classes">Loading Classes</h3>
58
+
59
+ <p>Unlike some other frameworks classes do not need to be loaded manually. They will be auto-loaded when you refer to them in your code (Controllers, Models, etc).</p>
60
+
61
+ <h3 id="classes_subdirectories">Classes in a sub-directory</h3>
62
+
63
+ <p>Just like <a href="controllers/base.html">Controllers</a>, classes must be lower-case with first-letter upper case, while underscores will put the class into a sub-directory.</p>
64
+
65
+ <pre class="php"><code>Class Session_Driver</code></pre>
66
+
67
+ <p>That will be loaded from app/classes/session/driver.php</p>
68
+
69
+ <h3 id="classes_namespaces">Classes and Namespaces</h3>
70
+
71
+ <p>
72
+ To determine which PHP file to load, FuelPHP's autoloader will treat namespaces and class names with underscores exactly the same.
73
+ This means that for classes in sub-directories, you can mix-and-match namespaces and underscores to suit your needs.
74
+ </p>
75
+
76
+ <p>Take for example a class in the file app/classes/core/system/messages.php. The class in this file can be defined as:</p>
77
+
78
+ <pre class="php"><code>// global namespace, fully underscored class name
79
+ class Core_System_Messages {}
80
+
81
+ // combine a namespace and underscores
82
+ namespace Core;
83
+ class System_Messages {}
84
+
85
+ // or fully namespaced
86
+ namespace Core\System;
87
+ class Messages {}
88
+ </code></pre>
89
+
90
+ <p class="note">
91
+ The first method is the one most commonly used and easiest to understand. The namespaced versions are particularly handy if you
92
+ combine them with the Use statement in the classes that use the defined class.
93
+ </p>
94
+
95
+ <article>
96
+ <h2 id="init_method">Initializing your class</h2>
97
+
98
+ <p>It is possible to have Fuel's autoloader perform certain automated tasks once a class is loaded,
99
+ sort of like what <code>__construct()</code> does for instances of a class. You do this by adding
100
+ a public static <code>_init()</code> method to the class.</p>
101
+
102
+ <pre class="php"><code>class Example {
103
+ public static function _init()
104
+ {
105
+ // this is called upon loading the class
106
+ }
107
+ }</code></pre>
108
+
109
+ <p class="note">If a loaded class has its own <code>_init()</code> method and a parent must be loaded
110
+ alongside it, that parent's init method isn't called unless you call it using
111
+ <code>parent::_init();</code></p>
112
+ </article>
113
+
114
+ </div>
115
+
116
+ <footer>
117
+ <p>
118
+ &copy; FuelPHP Development Team 2010-2013 - <a href="http://fuelphp.com">FuelPHP</a> is released under the MIT license.
119
+ </p>
120
+ </footer>
121
+ </div>
122
+ </body>
123
+ </html>
benchmark/NYU_CTF_Bench/development/2013/CSAW-Finals/web/historypeats/csaw/docs/general/coding_standards.html ADDED
@@ -0,0 +1,370 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <!doctype html>
2
+ <html lang="en">
3
+ <head>
4
+ <meta charset="UTF-8">
5
+ <meta name="viewport" content="width=device-width, initial-scale=1.0">
6
+ <link rel="stylesheet" href="./../assets/css/combined.css">
7
+ <link rel="shortcut icon" href="./../favicon.ico" />
8
+ <script src="http://www.google.com/jsapi" type="text/javascript"></script>
9
+ <script type="text/javascript">
10
+ var path = './../';
11
+ </script>
12
+ <script src="./../assets/js/combined.js"></script>
13
+ <title>Coding Standards - General - FuelPHP Documentation</title>
14
+ </head>
15
+ <body>
16
+ <div id="container">
17
+ <header id="header">
18
+ <div class="table">
19
+ <h1>
20
+ <strong>FuelPHP, a PHP 5.3 Framework</strong>
21
+ Documentation
22
+ </h1>
23
+
24
+ <form id="google_search">
25
+ <p>
26
+ <span id="search_clear">&nbsp;</span>
27
+ <input type="submit" name="search_submit" id="search_submit" value="search" />
28
+ <input type="text" value="" id="search_input" name="search_input" />
29
+ </p>
30
+ </form>
31
+ </div>
32
+ <nav>
33
+
34
+ <div class="clear"></div>
35
+ </nav>
36
+ <a href="#" id="toc_handle">table of contents</a>
37
+ <div class="clear"></div>
38
+ </header>
39
+
40
+ <div id="cse">
41
+ <div id="cse_point"></div>
42
+ <div id="cse_content"></div>
43
+ </div>
44
+
45
+ <div id="main">
46
+
47
+ <h2>Coding Standards</h2>
48
+
49
+ <p>These standards for code formatting and documentation must be followed by anyone contributing to Fuel. Any
50
+ contributions that do not meet these guidelines will not be accepted.</p>
51
+
52
+ <h3 id="file_formatting">File Formatting</h3>
53
+
54
+ <h5 id="closing_php_tag">Closing PHP Tag</h5>
55
+
56
+ <p>Files containing only PHP code should always omit the closing PHP tag (?>). This prevents many of the
57
+ elusive white screens of death.</p>
58
+
59
+ <h5 id="indentation">Indentation</h5>
60
+
61
+ <p>All indentation should be done using real tabs, NOT spaces.<br />
62
+ But aligning things after the indentation should be done using spaces, NOT tabs.</p>
63
+
64
+ <pre class="php"><code> // indented 2 tabs
65
+ $var = 'something'; // indented with tabs and aligned value &amp; comments
66
+ $variable = 'else'; // with those above/below using spaces</code></pre>
67
+
68
+ <h5 id="line_endings">Line Endings</h5>
69
+
70
+ <p>Line endings should be Unix-style LF.</p>
71
+
72
+ <h5 id="file_naming">File Naming</h5>
73
+
74
+ <p>All file names must be all lower case. No exceptions.</p>
75
+
76
+ <h5 id="encoding">Encoding</h5>
77
+
78
+ <p>Files should be saved with UTF-8 encoding and the BOM should not be used.</p>
79
+
80
+ <h3 id="naming_conventions">Naming Conventions</h3>
81
+
82
+ <h5 id="namespaces">Namespaces</h5>
83
+
84
+ <p>All core classes must be under the Fuel\Core namespace.</p>
85
+
86
+ <pre class="php"><code>namespace Fuel\Core;</code></pre>
87
+
88
+ <h5 id="classes">Classes</h5>
89
+
90
+ <p>Class names should use underscores to separate words, and each word in the class name should begin with a
91
+ capital letter. An underscore will, however, be converted to a directory separator during autoloading. The
92
+ use of camelcase is discouraged but cannot be prevented in some cases when putting the class in a
93
+ subdirectory makes no sense.</p>
94
+
95
+ <pre class="php"><code>namespace Fuel\Core;
96
+
97
+ class Session
98
+ {
99
+
100
+ }</code></pre>
101
+
102
+ <pre class="php"><code>namespace Fuel\Core;
103
+
104
+ class Session_Cookie extends Session_Driver
105
+ {
106
+
107
+ }</code></pre>
108
+
109
+ <p>This would result in the following file path:</p>
110
+
111
+ <pre class="php"><code>core/classes/session.php
112
+ core/classes/session/cookie.php</code></pre>
113
+
114
+ <h5 id="methods_standards">Methods</h5>
115
+
116
+ <p>Like class names, method names should use underscores to separate words, not CamelCase. Method names should
117
+ also be all lower case. Visibility should always be included (public, protected, private).<br />
118
+ An underscore can be used at the beginning of the name to make it clear the method is protected/private or
119
+ to signify it should be considered as such when you need it public.</p>
120
+
121
+ <pre class="php"><code>class Session
122
+ {
123
+
124
+ public static function get_flash($name, $data)
125
+ {
126
+ // Some code here
127
+ }
128
+
129
+ }</code></pre>
130
+
131
+ <pre class="php"><code>class View
132
+ {
133
+
134
+ // Array of global view data
135
+ protected static $_global_data = array();
136
+
137
+ protected static function capture($view_filename, array $view_data)
138
+ {
139
+ // Some code here
140
+ }
141
+
142
+ }</code></pre>
143
+
144
+ <h5 id="variables">Variables</h5>
145
+
146
+ <p>Variable names should be concise and contain only lower case letters and underscores. Loop iterators should
147
+ be short, preferably a single character.</p>
148
+
149
+ <pre class="php"><code>$first_name
150
+ $buffer
151
+ for ($i = 0; $i &lt; $max; $i++)</code></pre>
152
+
153
+ <h5 id="constants">Constants</h5>
154
+
155
+ <p>Constants follow the same guide lines as variables with the exception that constants should be all upper
156
+ case.</p>
157
+
158
+ <pre class="php"><code>MY_CONSTANT
159
+ TEMPLATE_PATH
160
+ TEXT_DEFAULT</code></pre>
161
+
162
+ <h3 id="keywords">Keywords</h3>
163
+
164
+ <p>Keywords such as <kbd>true</kbd>, <kbd>false</kbd>, <kbd>null</kbd>, <kbd>as</kbd>, etc should be all lower case, as upper case is reserved for
165
+ constants. Same goes for primitive types like <kbd>array</kbd>, <kbd>integer</kbd>, <kbd>string</kbd>.</p>
166
+
167
+ <pre class="php"><code>$var = true;
168
+ $var = false;
169
+ $var = null;
170
+ foreach ($array as $key => $value)
171
+ public function my_function(array $array)
172
+ function my_function($arg = null)</code></pre>
173
+
174
+ <h3 id="control_structures">Control Structures</h3>
175
+
176
+ <p>The structure keywords such as <kbd>if</kbd>, <kbd>for</kbd>, <kbd>foreach</kbd>, <kbd>while</kbd>, <kbd>switch</kbd> should be followed by a space as should
177
+ parameter/argument lists and values. Braces should be placed on a new line, and <kbd>break</kbd> should have the same
178
+ tab as its case.</p>
179
+
180
+ <pre class="php"><code>if ($arg === true)
181
+ {
182
+ //do something here
183
+ }
184
+ elseif ($arg === null)
185
+ {
186
+ //do something else here
187
+ }
188
+ else
189
+ {
190
+ //catch all do something here
191
+ }
192
+
193
+ foreach ($array as $key => $value)
194
+ {
195
+ //loop here
196
+ }
197
+
198
+ for ($i = 0; $i &lt; $max; $i++)
199
+ {
200
+ //loop here
201
+ }
202
+
203
+ while ($i &lt; $max)
204
+ {
205
+ //loop here
206
+ }
207
+
208
+ do
209
+ {
210
+ //loop here
211
+ }
212
+ while ($i &lt; $max)
213
+
214
+ switch ($var)
215
+ {
216
+ case 'value1':
217
+ //do something here
218
+ break;
219
+ default :
220
+ //do something here
221
+ break;
222
+ }</code></pre>
223
+
224
+ <h5 id="alternative_if">Alternative if statements</h5>
225
+
226
+ <p>In some cases, a full <kbd>if</kbd> statement is a bit too much code for a simple conditional assignment or function
227
+ call. In those cases, you can use PHP's execution logic to use a shorter boolean-operator based syntax.
228
+ Using <kbd>and</kbd> means the second part only gets evaluated if the first part were true, using
229
+ <kbd>or</kbd> means the second part only gets executed if the first part were false.<br />
230
+ Don't use this when both <kbd>if</kbd> and <kbd>else</kbd> are needed, just in cases like single conditional statements.</p>
231
+
232
+ <pre class="php"><code>// instead of if (isset($var)) { Config::set('var', $var); }
233
+ isset($var) and Config::set('var', $var);
234
+
235
+ // instead of if ( ! isset($var)) { $var = Config::get('var'); }
236
+ isset($var) or $var = Config::get('var');
237
+
238
+ // DON'T DO THIS
239
+ Uri::segment(3) and $var = Uri::segment(3);
240
+ Uri::segment(3) or $var = 'default';
241
+
242
+ // This is better:
243
+ if (Uri::segment(3))
244
+ {
245
+ $var = Uri::segment(3);
246
+ }
247
+ else
248
+ {
249
+ $var = 'default';
250
+ }
251
+
252
+ // Or this:
253
+ $var = Uri::segment(3) ? Uri::segment(3) : 'default';
254
+ // Or actually this:
255
+ $var = Uri::segment(3) ?: 'default';</code></pre>
256
+
257
+ <h3 id="comparison_logical">Comparisons, Logical operators</h3>
258
+
259
+ <p>Comparing function/method returns and variables should be type aware, for example some functions may return
260
+ <kbd>false</kbd>, and when comparing this return the type sensitive operators such as <kbd>===</kbd> or <kbd>!==</kbd>. Additionally, use of
261
+ <kbd>and</kbd> or <kbd>or</kbd> is preferred over <kbd>&amp;&amp;</kbd> or <kbd>||</kbd> for readability. In some cases, this cannot be avoided and the use of
262
+ <kbd>&amp;&amp;</kbd> or <kbd>||</kbd> as its required may be used. The <kbd>!</kbd> should have spaces on both sides when used.</p>
263
+
264
+ <pre class="php"><code>if ($var == false and $other_var != 'some_value')
265
+ if ($var === false or my_function() !== false)
266
+ if ( ! $var)</code></pre>
267
+
268
+ <h5 id="class_interface">Class/Interface Declarations</h5>
269
+
270
+ <p>Class/interface declarations have the opening brace on the following line:</p>
271
+
272
+ <pre class="php"><code>class Session
273
+ {
274
+
275
+ }</code></pre>
276
+ <p>In case the class is empty, braces will be on the same line as the definition:</p>
277
+
278
+ <pre class="php"><code>class Empty_Class { }</code></pre>
279
+
280
+ <h5 id="function_method">Function/Method/Closure Declarations</h5>
281
+
282
+ <p>The function/method/closure opening brace must always begin on a new line and have the same indentation as its
283
+ structure.</p>
284
+
285
+ <pre class="php"><code>class Session
286
+ {
287
+
288
+ public static function get_flash($name, $data)
289
+ {
290
+ $closure = function($a, $b)
291
+ {
292
+ // Your closure code here
293
+ }
294
+ }
295
+
296
+ }</code></pre>
297
+
298
+ <h5 id="variables">Variables</h5>
299
+
300
+ <p>When initializing variables, one variable should be declared per line. To enhance code readability, these
301
+ should each be on a separate line. Align values and comments when appropriate.</p>
302
+
303
+ <pre class="php"><code>$var = ''; // do each on its own line
304
+ $other_var = ''; // do each on its own line</code></pre>
305
+
306
+ <h5 id="brackets_parenthesis">Brackets and Parenthesis</h5>
307
+
308
+ <p>No space should come before or after the initial bracket/parenthesis. There should not be a space before closing bracket/parenthesis.</p>
309
+
310
+ <pre class="php"><code>$array = array(1, 2, 3, 4);
311
+ $array['my_index'] = 'something';
312
+ for ($i = 0; $i < $max; $i++)</code></pre>
313
+
314
+ <h5 id="quotation">String quotation</h5>
315
+
316
+ <p>Single quotes are preferred over double quotes.</p>
317
+
318
+ <h5 id="concatenation">Concatenation</h5>
319
+
320
+ <p>String concatenation should not contain spaces around the joined parts.</p>
321
+
322
+ <pre class="php"><code>//yes
323
+ $string = 'my string '.$var.' the rest of my string';
324
+
325
+ //no
326
+ $string = 'my string ' . $var . ' the rest of my string';</code></pre>
327
+
328
+ <h5 id="operators">Operators</h5>
329
+
330
+ <pre class="php"><code>$var = 'something';
331
+ if ($var == 'something') //space before and after logical operator
332
+ $var = $some_var + $other_var; //space before and after math operator
333
+ $var++; // no space before increment
334
+ ++$var; //no space after increment</code></pre>
335
+
336
+ <h5 id="dot-notation">Array dot-notation</h5>
337
+
338
+ <p>
339
+ Although strictly speaking it's not a coding standard, it's used a lot within the frameworks classes and this documentation,
340
+ and since it's not a common PHP notation, it might confuse people new to the framework.
341
+ </p>
342
+ <pre class="php"><code>// when you see "always_load.packages = array()", it is shorthand for:
343
+ array("always_load" => array("packages" => array(...) ) );
344
+ </code></pre>
345
+
346
+ <p>This notation is used by the Arr class, but also the Lang, Config and Session classes, to quickly access individual elements from a multi-dimensional array.</p>
347
+ <pre class="php"><code>// when you have an array structure like this
348
+ $array = array(
349
+ "always_load" => array(
350
+ "packages" => array(
351
+ "orm",
352
+ "package" => "/my/special/package.php",
353
+ )
354
+ )
355
+ );
356
+
357
+ // then this will return "/my/special/package.php":
358
+ $path = Arr::get($array, 'always_load.packages.package');
359
+ </code></pre>
360
+
361
+ </div>
362
+
363
+ <footer>
364
+ <p>
365
+ &copy; FuelPHP Development Team 2010-2013 - <a href="http://fuelphp.com">FuelPHP</a> is released under the MIT license.
366
+ </p>
367
+ </footer>
368
+ </div>
369
+ </body>
370
+ </html>
benchmark/NYU_CTF_Bench/development/2013/CSAW-Finals/web/historypeats/csaw/docs/general/configuration.html ADDED
@@ -0,0 +1,518 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <!doctype html>
2
+ <html lang="en">
3
+ <head>
4
+ <meta charset="UTF-8">
5
+ <meta name="viewport" content="width=device-width, initial-scale=1.0">
6
+ <link rel="stylesheet" href="./../assets/css/combined.css">
7
+ <link rel="shortcut icon" href="./../favicon.ico" />
8
+ <script src="http://www.google.com/jsapi" type="text/javascript"></script>
9
+ <script type="text/javascript">
10
+ var path = './../';
11
+ </script>
12
+ <script src="./../assets/js/combined.js"></script>
13
+ <title>Configuration - General - FuelPHP Documentation</title>
14
+ </head>
15
+ <body>
16
+ <div id="container">
17
+ <header id="header">
18
+ <div class="table">
19
+ <h1>
20
+ <strong>FuelPHP, a PHP 5.3 Framework</strong>
21
+ Documentation
22
+ </h1>
23
+
24
+ <form id="google_search">
25
+ <p>
26
+ <span id="search_clear">&nbsp;</span>
27
+ <input type="submit" name="search_submit" id="search_submit" value="search" />
28
+ <input type="text" value="" id="search_input" name="search_input" />
29
+ </p>
30
+ </form>
31
+ </div>
32
+ <nav>
33
+
34
+ <div class="clear"></div>
35
+ </nav>
36
+ <a href="#" id="toc_handle">table of contents</a>
37
+ <div class="clear"></div>
38
+ </header>
39
+
40
+ <div id="cse">
41
+ <div id="cse_point"></div>
42
+ <div id="cse_content"></div>
43
+ </div>
44
+
45
+ <div id="main">
46
+
47
+ <h2>Configuring your application</h2>
48
+
49
+ <h3 id="intro">Introduction</h3>
50
+ <p>
51
+ The FuelPHP framework is built with configuration over convention in mind. This results in a highly customizable
52
+ base on which you can start building your application.
53
+ </p>
54
+
55
+ <p>
56
+ Configuration files are stored inside the <kbd>app/config</kbd> folder. The application's basic
57
+ configuration is done in <em>app/config/config.php</em>. The loaded configuration can be made
58
+ environment specific, more on this under <a href="environments.html#/env_config">Environments</a>.
59
+ </p>
60
+
61
+ <p class="note">
62
+ To overwrite settings from feature specific configs, either create a new file in app/config or copy
63
+ the corresponding file from core/config to app/config.
64
+ </p>
65
+
66
+ <h3 id="config">Configuration options</h3>
67
+
68
+ <p>
69
+ These are the options that can be defined in the applications basic configuration file, <kbd>app/config/config.php</kbd>.
70
+ When you have just installed FuelPHP, this file is empty. All default values, as defined below, are defined in the
71
+ corresponding file in the <kbd>core/config</kbd> folder. When you want to override a default, add the key to the array
72
+ in your app config file, and modify the value. Alternatively, copy the section from the core file to the app file, and
73
+ modify it.
74
+ </p>
75
+
76
+ <p class="note">
77
+ FuelPHP uses "<em>dot-notation</em>" when handling arrays. It is a convenient way of accessing elements of a multi-dimensional
78
+ array. This notation is used in the documenation as well, as it provides an easy to type array reference. For example:
79
+ </p>
80
+ <pre class="php"><code>// when you see "always_load.packages = array()", it is shorthand for:
81
+ array("always_load" => array("packages" => array(...) ) );
82
+ </code></pre>
83
+
84
+
85
+ <table class="config">
86
+ <tbody>
87
+ <tr class="header">
88
+ <th style="width:500px;">Key</th>
89
+ <th>Type</th>
90
+ <th>Default</th>
91
+ <th>Description</th>
92
+ </tr>
93
+ <tr>
94
+ <th>base_url</th>
95
+ <td>string</td>
96
+ <td><pre class="php"><code>null</code></pre></td>
97
+ <td>
98
+ The base URL of the application. Can be relative. MUST contain a trailing slash. ('/foo/', 'http://example.com/')
99
+ </td>
100
+ </tr>
101
+ <tr>
102
+ <th>url_suffix</th>
103
+ <td>string</td>
104
+ <td><pre class="php"><code>''</code></pre></td>
105
+ <td>
106
+ Any suffix that needs to be added to URL's generated by Fuel. If the suffix is an extension,
107
+ make sure to include the dot. ('.html')
108
+ </td>
109
+ </tr>
110
+ <tr>
111
+ <th>index_file</th>
112
+ <td>string</td>
113
+ <td><pre class="php"><code>'index.php'</code></pre></td>
114
+ <td>
115
+ The name of the main bootstrap file. Set this to false or remove if you using mod_rewrite.
116
+ </td>
117
+ </tr>
118
+ <tr>
119
+ <th>controller_prefix</th>
120
+ <td>string</td>
121
+ <td><pre class="php"><code>'Controller_'</code></pre></td>
122
+ <td>
123
+ The class prefix used to find controllers when mapping the URI to the controller class name.
124
+ You have to change this if you want your controllers namespaced or in a different folder then
125
+ app/classes/controller.
126
+ </td>
127
+ </tr>
128
+ <tr>
129
+ <th>profiling</th>
130
+ <td>bool</td>
131
+ <td><pre class="php"><code>false</code></pre></td>
132
+ <td>
133
+ Whether to enable the profiler.
134
+ </td>
135
+ </tr>
136
+ <tr>
137
+ <th>cache_dir</th>
138
+ <td>string</td>
139
+ <td><pre class="php"><code>APPPATH.'cache/'</code></pre></td>
140
+ <td>
141
+ The directory to store cache files in. This directory must be writable.
142
+ </td>
143
+ </tr>
144
+ <tr>
145
+ <th>caching</th>
146
+ <td>bool</td>
147
+ <td><pre class="php"><code>false</code></pre></td>
148
+ <td>
149
+ Whether to enable file finder caching.
150
+ </td>
151
+ </tr>
152
+ <tr>
153
+ <th>cache_lifetime</th>
154
+ <td>int</td>
155
+ <td><pre class="php"><code>3600</code></pre></td>
156
+ <td>
157
+ The file finder cache lifetime in seconds.
158
+ </td>
159
+ </tr>
160
+ <tr>
161
+ <th>ob_callback</th>
162
+ <td>callback</td>
163
+ <td><pre class="php"><code>null</code></pre></td>
164
+ <td>
165
+ Callback given to ob_start(), set to ob_gzhandler to enable gzip encoding of output.
166
+ </td>
167
+ </tr>
168
+ <tr>
169
+ <td colspan="4">
170
+ </td>
171
+ </tr>
172
+ <tr>
173
+ <th>errors</th>
174
+ <td>array</td>
175
+ <td colspan="2">
176
+ <strong>Array, containing the configuration keys to control behaviour when detecting errors:</strong>
177
+ </td>
178
+ </tr>
179
+ <tr>
180
+ <th>errors.continue_on</th>
181
+ <td>array</td>
182
+ <td><pre class="php"><code>array(
183
+ )</code></pre></td>
184
+ <td>
185
+ On which php errors to proceed execution. See <a href="./error.html">Error handling</a>.
186
+ </td>
187
+ </tr>
188
+ <tr>
189
+ <th>errors.throttle</th>
190
+ <td>int</td>
191
+ <td><pre class="php"><code>10</code></pre></td>
192
+ <td>
193
+ How many errors to show before we stop showing them. (prevents out-of-memory errors)
194
+ </td>
195
+ </tr>
196
+ <tr>
197
+ <th>errors.notices</th>
198
+ <td>bool</td>
199
+ <td><pre class="php"><code>true</code></pre></td>
200
+ <td>
201
+ Whether to show notices.
202
+ </td>
203
+ </tr>
204
+ <tr>
205
+ <th>language</th>
206
+ <td>string</td>
207
+ <td><pre class="php"><code>'en'</code></pre></td>
208
+ <td>
209
+ The default application language, used by the <a href="../classes/lang.html">Lang class</a>.
210
+ </td>
211
+ </tr>
212
+ <tr>
213
+ <th>locale</th>
214
+ <td>string</td>
215
+ <td><pre class="php"><code>'en_US'</code></pre></td>
216
+ <td>
217
+ Used for <em>setlocale()</em> required on some php installations, set to <kbd>false</kbd>
218
+ to prevent it from being set.<br />
219
+ <em>The syntax setting for this can differ per OS, Ubuntu for example requires a
220
+ <kbd>.utf8</kbd> (the encoding) suffix.</em>
221
+ </td>
222
+ </tr>
223
+ <tr>
224
+ <th>encoding</th>
225
+ <td>string</td>
226
+ <td><pre class="php"><code>'UTF-8'</code></pre></td>
227
+ <td>
228
+ The application's default character encoding.
229
+ </td>
230
+ </tr>
231
+ <tr>
232
+ <th>server_gmt_offset</th>
233
+ <td>int</td>
234
+ <td><pre class="php"><code>0</code></pre></td>
235
+ <td>
236
+ The offset in seconds the server offset from gmt timestamp when time() is used.<br />
237
+ <em>This is only to correct bad server configuration: <kbd>time()</kbd> should always
238
+ return the number of seconds since January 1 1970 00:00:00 GMT.</em>
239
+ </td>
240
+ </tr>
241
+ <tr>
242
+ <th>default_timezone</th>
243
+ <td>string</td>
244
+ <td><pre class="php"><code>'UTC'</code></pre></td>
245
+ <td>
246
+ The server timezone.
247
+ </td>
248
+ </tr>
249
+ <tr>
250
+ <td colspan="4">
251
+ <p class="note">
252
+ If you set this value, make <strong>ABSOLUTELY</strong> sure that the timezone configured matches the timezone set on your server.
253
+ Since timezone calculations work by converting to GMT, it goes horribly wrong when you have a timezone mismatch. This will cause
254
+ time displays in your application to be incorrect, and cookie/session issues due to incorrect expiry time calculations!
255
+ </p>
256
+ </td>
257
+ </tr>
258
+ <tr>
259
+ <th>log_threshold</th>
260
+ <td>int</td>
261
+ <td><pre class="php"><code>Fuel::L_WARNING</code></pre></td>
262
+ <td>
263
+ The logging threshold. From what level of message to log, or an array of specific message levels that should be logged. <a href="../classes/fuel.html#log_constants">Read about the possible values</a>
264
+ </td>
265
+ </tr>
266
+ <tr>
267
+ <th>log_path</th>
268
+ <td>string</td>
269
+ <td><pre class="php"><code>APPPATH.'logs/'</code></pre></td>
270
+ <td>
271
+ The directory to store the logs in. This directory MUST be writable.
272
+ </td>
273
+ </tr>
274
+ <tr>
275
+ <th>log_date_format</th>
276
+ <td>string</td>
277
+ <td><pre class="php"><code>'Y-m-d H:i:s'</code></pre></td>
278
+ <td>
279
+ The date/time format used in the logs.
280
+ </td>
281
+ </tr>
282
+ <tr>
283
+ <td colspan="4">
284
+ &nbsp;
285
+ </td>
286
+ </tr>
287
+ <tr>
288
+ <th>security</th>
289
+ <td>array</td>
290
+ <td colspan="2">
291
+ <strong>Array, containing the configuration keys to control your application security:</strong>
292
+ </td>
293
+ </tr>
294
+ <tr>
295
+ <th>security.csrf_autoload</th>
296
+ <td>bool</td>
297
+ <td><pre class="php"><code>false</code></pre></td>
298
+ <td>
299
+ Whether to auto-check the csrf token. <a href="../general/security.html#csrf">Read more about csrf</a>.
300
+ </td>
301
+ </tr>
302
+ <tr>
303
+ <th>security.csrf_token_key</th>
304
+ <td>string</td>
305
+ <td><pre class="php"><code>'fuel_csrf_token'</code></pre></td>
306
+ <td>
307
+ Which $_POST key to fetch when checking the csrf token.
308
+ </td>
309
+ </tr>
310
+ <tr>
311
+ <th>security.csrf_expiration</th>
312
+ <td>int</td>
313
+ <td><pre class="php"><code>0</code></pre></td>
314
+ <td>
315
+ Set the expiration time for the csrf cookie. Anything higher than 0 is the number of seconds in
316
+ which the cookie will expire.
317
+ </td>
318
+ </tr>
319
+ <tr>
320
+ <th>security.token_salt</th>
321
+ <td>string</td>
322
+ <td><pre class="php"><code>'put your salt value here to make the token more secure'</code></pre></td>
323
+ <td>
324
+ A salt to make sure the generated security tokens are not predictable.
325
+ </td>
326
+ </tr>
327
+ <tr>
328
+ <th>security.allow_x_headers</th>
329
+ <td>bool</td>
330
+ <td><pre class="php"><code>false</code></pre></td>
331
+ <td>
332
+ Allow the Input class to use "X" headers when present, such as HTTP_X_FORWARDED_FOR or HTTP_X_FORWARDED_PROTO.
333
+ </td>
334
+ </tr>
335
+ <tr>
336
+ <th>security.uri_filter</th>
337
+ <td>array</td>
338
+ <td><pre class="php"><code>array('htmlentities')</code></pre></td>
339
+ <td>
340
+ What php functions to use to filter the URI.
341
+ </td>
342
+ </tr>
343
+ <tr>
344
+ <th>security.input_filter</th>
345
+ <td>array</td>
346
+ <td><pre class="php"><code>array()</code></pre></td>
347
+ <td>
348
+ What php functions filter the input arrays ($_GET, $_POST and $_COOKIE). Can be set to <em>xxs_clean</em>,
349
+ this may cause a performance hit based on the size of the input.
350
+ </td>
351
+ </tr>
352
+ <tr>
353
+ <th>security.output_filter</th>
354
+ <td>array</td>
355
+ <td><pre class="php"><code>array()</code></pre></td>
356
+ <td>
357
+ What php functions filter the variables set to a view. Can be set to <em>xxs_clean</em>,
358
+ this may cause a performance hit based on the size of the variables.
359
+ </td>
360
+ </tr>
361
+ <tr>
362
+ <th>security.auto_filter_output</th>
363
+ <td>bool</td>
364
+ <td><pre class="php"><code>true</code></pre></td>
365
+ <td>
366
+ Whether to automatically encode (htmlentities) view data.
367
+ </td>
368
+ </tr>
369
+ <tr>
370
+ <th>security.whitelisted_classes</th>
371
+ <td>array()</td>
372
+ <td><pre class="php"><code>array(
373
+ 'stdClass',
374
+ 'Fuel\\Core\\View',
375
+ 'Fuel\\Core\\ViewModel',
376
+ 'Closure'
377
+ )</code></pre></td>
378
+ <td>
379
+ With output encoding switched on all objects passed will be converted to strings or throw exceptions
380
+ unless they are instances of the classes in this array.
381
+ </td>
382
+ </tr>
383
+ <tr>
384
+ <td colspan="4">
385
+ &nbsp;
386
+ </td>
387
+ </tr>
388
+ <tr>
389
+ <th>cookie</th>
390
+ <td>array</td>
391
+ <td colspan="2">
392
+ <strong>Array, containing the configuration keys define the global cookie settings:</strong>
393
+ </td>
394
+ </tr>
395
+ <tr>
396
+ <th>cookie.expiration</th>
397
+ <td>int</td>
398
+ <td><pre class="php"><code>0</code></pre></td>
399
+ <td>
400
+ Number of seconds before the cookie expires.
401
+ </td>
402
+ </tr>
403
+ <tr>
404
+ <th>cookie.path</th>
405
+ <td>string</td>
406
+ <td><pre class="php"><code>'/'</code></pre></td>
407
+ <td>
408
+ Restrict the path that the cookie is available to.
409
+ </td>
410
+ </tr>
411
+ <tr>
412
+ <th>cookie.domain</th>
413
+ <td>string</td>
414
+ <td><pre class="php"><code>null</code></pre></td>
415
+ <td>
416
+ Restrict the domain that the cookie is available to.
417
+ </td>
418
+ </tr>
419
+ <tr>
420
+ <th>cookie.secure</th>
421
+ <td>bool</td>
422
+ <td><pre class="php"><code>false</code></pre></td>
423
+ <td>
424
+ Only transmit cookies over secure connections.
425
+ </td>
426
+ </tr>
427
+ <tr>
428
+ <th>cookie.http_only</th>
429
+ <td>bool</td>
430
+ <td><pre class="php"><code>false</code></pre></td>
431
+ <td>
432
+ Only transmit cookies over HTTP, disabling Javascript access.
433
+ </td>
434
+ </tr>
435
+ <tr>
436
+ <th>module_paths</th>
437
+ <td>array</td>
438
+ <td><pre class="php"><code>array()</code></pre></td>
439
+ <td>
440
+ Paths to module directories. Used when adding a module without specifying the location.
441
+ </td>
442
+ </tr>
443
+ <tr>
444
+ <td colspan="4">
445
+ &nbsp;
446
+ </td>
447
+ </tr>
448
+ <tr>
449
+ <th>always_load</th>
450
+ <td>array</td>
451
+ <td colspan="2">
452
+ <strong>Array, containing the items the framework has to load when it initializes:</strong>
453
+ </td>
454
+ </tr>
455
+ <tr>
456
+ <th>always_load.packages</th>
457
+ <td>array</td>
458
+ <td><pre class="php"><code>array()</code></pre></td>
459
+ <td>
460
+ Which packages to autoload. Specify like so: <strong>array('package')</strong> or <strong>array('package' => PKGPATH.'path/to/package')</strong>. In order for this to work a package path must be set in <em>package_paths</em>
461
+ </td>
462
+ </tr>
463
+ <tr>
464
+ <th>always_load.modules</th>
465
+ <td>array</td>
466
+ <td><pre class="php"><code>array()</code></pre></td>
467
+ <td>
468
+ Which modules to autoload. Specify like so: <strong>array('package')</strong>. Autoloaded modules are accessible via
469
+ the URL. In order for this to work a module path must be set in <em>module_paths</em>
470
+ </td>
471
+ </tr>
472
+ <tr>
473
+ <th>always_load.classes</th>
474
+ <td>array</td>
475
+ <td><pre class="php"><code>array()</code></pre></td>
476
+ <td>
477
+ Which classes to autoload and initiate. When you want to autoload a class from a package or module, make sure
478
+ that is autoloaded too!
479
+ </td>
480
+ </tr>
481
+ <tr>
482
+ <th>always_load.config</th>
483
+ <td>array</td>
484
+ <td><pre class="php"><code>array()</code></pre></td>
485
+ <td>
486
+ Which config files to autoload. Load a config file into a group like so: <strong>array('config')</strong> or
487
+ <strong>array('filename' => 'group')</strong>. If you do not want to load the file into a set the group name to
488
+ <em>null</em>: <strong>array('filename' => null)</strong>.
489
+ </td>
490
+ </tr>
491
+ <tr>
492
+ <th>always_load.language</th>
493
+ <td>array</td>
494
+ <td><pre class="php"><code>array()</code></pre></td>
495
+ <td>
496
+ Which language files to autoload. Load a config file into a group like so: <strong>array('lang')</strong> or
497
+ <strong>array('filename' => 'group')</strong>. If you do not want to load the file into a set the group name to
498
+ <em>null</em>: <strong>array('filename' => null)</strong>.
499
+ </td>
500
+ </tr>
501
+ </tbody>
502
+ </table>
503
+
504
+ <p>
505
+ Interacting with config files/settings is done using the <a href="../classes/config.html">Config</a> class.
506
+ Config files can also be generated using <a href="../packages/oil/generate.html#configs">Oil</a>.
507
+ </p>
508
+
509
+ </div>
510
+
511
+ <footer>
512
+ <p>
513
+ &copy; FuelPHP Development Team 2010-2013 - <a href="http://fuelphp.com">FuelPHP</a> is released under the MIT license.
514
+ </p>
515
+ </footer>
516
+ </div>
517
+ </body>
518
+ </html>
benchmark/NYU_CTF_Bench/development/2013/CSAW-Finals/web/historypeats/csaw/docs/general/constants.html ADDED
@@ -0,0 +1,120 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <!doctype html>
2
+ <html lang="en">
3
+ <head>
4
+ <meta charset="UTF-8">
5
+ <meta name="viewport" content="width=device-width, initial-scale=1.0">
6
+ <link rel="stylesheet" href="./../assets/css/combined.css">
7
+ <link rel="shortcut icon" href="./../favicon.ico" />
8
+ <script src="http://www.google.com/jsapi" type="text/javascript"></script>
9
+ <script type="text/javascript">
10
+ var path = './../';
11
+ </script>
12
+ <script src="./../assets/js/combined.js"></script>
13
+ <title>Constants - General - FuelPHP Documentation</title>
14
+ </head>
15
+ <body>
16
+ <div id="container">
17
+ <header id="header">
18
+ <div class="table">
19
+ <h1>
20
+ <strong>FuelPHP, a PHP 5.3 Framework</strong>
21
+ Documentation
22
+ </h1>
23
+
24
+ <form id="google_search">
25
+ <p>
26
+ <span id="search_clear">&nbsp;</span>
27
+ <input type="submit" name="search_submit" id="search_submit" value="search" />
28
+ <input type="text" value="" id="search_input" name="search_input" />
29
+ </p>
30
+ </form>
31
+ </div>
32
+ <nav>
33
+
34
+ <div class="clear"></div>
35
+ </nav>
36
+ <a href="#" id="toc_handle">table of contents</a>
37
+ <div class="clear"></div>
38
+ </header>
39
+
40
+ <div id="cse">
41
+ <div id="cse_point"></div>
42
+ <div id="cse_content"></div>
43
+ </div>
44
+
45
+ <div id="main">
46
+
47
+ <h2>Constants</h2>
48
+
49
+ <p>
50
+ Fuel has four constants in the global namespace to direct you to important directories. Fuel uses them internally to locate classes and other files.
51
+ These constants are set in <em>public/index.php</em>.
52
+ </p>
53
+
54
+ <p class="note">
55
+ <strong>Note:</strong> When you move any of fuel's prime folders (app, core, public, packages) be sure to update your index.php to direct fuel to the right paths.
56
+ </p>
57
+
58
+ <table class="config valign">
59
+ <tbody>
60
+ <tr class="header">
61
+ <th>Key</th>
62
+ <th>Description</th>
63
+ </tr>
64
+ <tr>
65
+ <th>APPPATH</th>
66
+ <td>
67
+ Path to the application directory (<em>/path/to/fuel/app</em>).
68
+ This is where your application directories and code reside.
69
+ </td>
70
+ </tr>
71
+ <tr>
72
+ <th>COREPATH</th>
73
+ <td>
74
+ Path to the core directory (<em>/path/to/fuel/core</em>).
75
+ This is where all the Fuel classes live.
76
+ </td>
77
+ </tr>
78
+ <tr>
79
+ <th>DOCROOT</th>
80
+ <td>
81
+ Path to the location where the 'startup script' is.
82
+ For your web application, path to the public directory (<em>/path/to/public</em>).
83
+ This is where index.php resides. Everything accessible to user lives and is accessible via the browser.
84
+ For oil command, path to where oil command resides.
85
+ </td>
86
+ </tr>
87
+ <tr>
88
+ <th>PKGPATH</th>
89
+ <td>
90
+ Path to the packages directory (<em>/path/to/fuel/packages</em>).
91
+ This is where your packages are installed (when installed through oil).
92
+ </td>
93
+ </tr>
94
+ <tr>
95
+ <th>VENDORPATH</th>
96
+ <td>
97
+ Path to the composer root directory (<em>/path/to/fuel/vendor</em>).
98
+ This is where your composer installs the libraries downloaded from packagist.org.
99
+ </td>
100
+ </tr>
101
+ </tbody>
102
+ </table>
103
+
104
+ <p class="note">
105
+ <strong>Note:</strong> When you use the Oil package, you have to make the same changes in the 'oil' file in the docroot of your website.
106
+ </p>
107
+
108
+ <p class="note">
109
+ <strong>Note:</strong> When you want to run unit tests, you have to make the same changes in the 'phpunit.xml' file in the fuelphp core folder.
110
+ </p>
111
+ </div>
112
+
113
+ <footer>
114
+ <p>
115
+ &copy; FuelPHP Development Team 2010-2013 - <a href="http://fuelphp.com">FuelPHP</a> is released under the MIT license.
116
+ </p>
117
+ </footer>
118
+ </div>
119
+ </body>
120
+ </html>
benchmark/NYU_CTF_Bench/development/2013/CSAW-Finals/web/historypeats/csaw/docs/general/environments.html ADDED
@@ -0,0 +1,168 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <!doctype html>
2
+ <html lang="en">
3
+ <head>
4
+ <meta charset="UTF-8">
5
+ <meta name="viewport" content="width=device-width, initial-scale=1.0">
6
+ <link rel="stylesheet" href="./../assets/css/combined.css">
7
+ <link rel="shortcut icon" href="./../favicon.ico" />
8
+ <script src="http://www.google.com/jsapi" type="text/javascript"></script>
9
+ <script type="text/javascript">
10
+ var path = './../';
11
+ </script>
12
+ <script src="./../assets/js/combined.js"></script>
13
+ <title>Environments - General - FuelPHP Documentation</title>
14
+ </head>
15
+ <body>
16
+ <div id="container">
17
+ <header id="header">
18
+ <div class="table">
19
+ <h1>
20
+ <strong>FuelPHP, a PHP 5.3 Framework</strong>
21
+ Documentation
22
+ </h1>
23
+
24
+ <form id="google_search">
25
+ <p>
26
+ <span id="search_clear">&nbsp;</span>
27
+ <input type="submit" name="search_submit" id="search_submit" value="search" />
28
+ <input type="text" value="" id="search_input" name="search_input" />
29
+ </p>
30
+ </form>
31
+ </div>
32
+ <nav>
33
+
34
+ <div class="clear"></div>
35
+ </nav>
36
+ <a href="#" id="toc_handle">table of contents</a>
37
+ <div class="clear"></div>
38
+ </header>
39
+
40
+ <div id="cse">
41
+ <div id="cse_point"></div>
42
+ <div id="cse_content"></div>
43
+ </div>
44
+
45
+ <div id="main">
46
+
47
+ <h2>Environments</h2>
48
+
49
+ <p>
50
+ The support of environments helps FuelPHP and your app to make decisions based on the environment setting.
51
+ FuelPHP itself uses the environment setting to load/overwrite additional config setting based on which
52
+ environment is currently active.
53
+ </p>
54
+
55
+ <h3 id="possible_envs">Environments list</h3>
56
+
57
+ <p>
58
+ FuelPHP has four predefined environments.
59
+ </p>
60
+
61
+ <ul>
62
+ <li>
63
+ <strong>\Fuel::DEVELOPMENT</strong><br/>
64
+ The development environment.
65
+ </li>
66
+ <li>
67
+ <strong>\Fuel::TEST</strong><br/>
68
+ The test environment.
69
+ </li>
70
+ <li>
71
+ <strong>\Fuel::STAGING</strong><br/>
72
+ The staging environment.
73
+ </li>
74
+ <li>
75
+ <strong>\Fuel::PRODUCTION</strong><br/>
76
+ The production environment.
77
+ </li>
78
+ </ul>
79
+
80
+ <h3 id="setting_env">Set Your Environment</h3>
81
+
82
+ <p>
83
+ Setting your environment is done by setting the <em>FUEL_ENV</em> server var or manually changing the
84
+ setting in <em>fuel/app/bootstrap.php</em>.
85
+ </p>
86
+
87
+ <pre class="php"><code>// Inside app/bootstrap.php
88
+
89
+ /**
90
+ * Your environment. Can be set to any of the following:
91
+ *
92
+ * Fuel::DEVELOPMENT
93
+ * Fuel::TEST
94
+ * Fuel::STAGING
95
+ * Fuel::PRODUCTION
96
+ *
97
+ * But you can also pick any string you want (for example the developers username)
98
+ */
99
+ Fuel::$env = (isset($_SERVER['FUEL_ENV']) ? $_SERVER['FUEL_ENV'] : Fuel::DEVELOPMENT);</code></pre>
100
+
101
+ <h3 id="env_config">Environments and Config</h3>
102
+
103
+ <p>
104
+ Based on the environment the app is set to, the Config class looks for environment-specific config files.
105
+ The config class will look for the same config file name in a directory that's named after the current environment.
106
+ Here is an example to illustrate this:
107
+ </p>
108
+
109
+ <pre class="plain"><code>app/
110
+ config/
111
+ stuff.php
112
+ development/
113
+ stuff.php
114
+ staging/
115
+ stuff.php
116
+ test/
117
+ stuff.php
118
+ production/
119
+ stuff.php</code></pre>
120
+
121
+ <p>
122
+ When your environment is set to <kbd>\Fuel::DEVELOPMENT</kbd>, the settings from <em>stuff.php</em> are merged with <em>development/stuff.php</em>.
123
+ If the environment setting is set to any other than <kbd>\Fuel::DEVELOPMENT</kbd>, the extra config file is not loaded. The same goes
124
+ for any other environment setting you might use.
125
+ </p>
126
+
127
+ <p>
128
+ A real-life example for this is the database configuration. There are no default configuration settings (this is possibly
129
+ very dangerous). There are only environment-specific config settings.
130
+ </p>
131
+
132
+ <h3 id="env_apache">Using Apache configuration</h3>
133
+
134
+ <p>
135
+ You can use the Apache configuration statement <strong>SetEnv</strong> to set the environment your application should run in.
136
+ In most cases this is easier then using an environment variable, and in some cases the only option if you don't have commandline
137
+ access to your server.
138
+ </p>
139
+
140
+ <pre class="php"><code>// run this application in production mode
141
+ SetEnv FUEL_ENV production</code></pre>
142
+
143
+ <p class="note">The variable name <strong>FUEL_ENV</strong> should be specified in UPPERCASE, the environment name in lowercase.</p>
144
+
145
+ <h3 id="env_oil">Setting the environment for oil</h3>
146
+
147
+ <p>
148
+ When using a *unix operating system, you can use the <kbd>env</kbd> command to define the variable before starting oil.
149
+ </p>
150
+
151
+ <pre class="cli"><code><strong>$</strong> env FUEL_ENV=production php oil -v</code></pre>
152
+
153
+ <p>
154
+ When using Windows, this has been reported to work:
155
+ </p>
156
+
157
+ <pre class="cli"><code><strong>C:\> </strong>set FUEL_ENV=production&php oil -v</code></pre>
158
+
159
+ </div>
160
+
161
+ <footer>
162
+ <p>
163
+ &copy; FuelPHP Development Team 2010-2013 - <a href="http://fuelphp.com">FuelPHP</a> is released under the MIT license.
164
+ </p>
165
+ </footer>
166
+ </div>
167
+ </body>
168
+ </html>
benchmark/NYU_CTF_Bench/development/2013/CSAW-Finals/web/historypeats/csaw/docs/general/error.html ADDED
@@ -0,0 +1,217 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <!doctype html>
2
+ <html lang="en">
3
+ <head>
4
+ <meta charset="UTF-8">
5
+ <meta name="viewport" content="width=device-width, initial-scale=1.0">
6
+ <link rel="stylesheet" href="./../assets/css/combined.css">
7
+ <link rel="shortcut icon" href="./../favicon.ico" />
8
+ <script src="http://www.google.com/jsapi" type="text/javascript"></script>
9
+ <script type="text/javascript">
10
+ var path = './../';
11
+ </script>
12
+ <script src="./../assets/js/combined.js"></script>
13
+ <title>Error Handling - General - FuelPHP Documentation</title>
14
+ </head>
15
+ <body>
16
+ <div id="container">
17
+ <header id="header">
18
+ <div class="table">
19
+ <h1>
20
+ <strong>FuelPHP, a PHP 5.3 Framework</strong>
21
+ Documentation
22
+ </h1>
23
+
24
+ <form id="google_search">
25
+ <p>
26
+ <span id="search_clear">&nbsp;</span>
27
+ <input type="submit" name="search_submit" id="search_submit" value="search" />
28
+ <input type="text" value="" id="search_input" name="search_input" />
29
+ </p>
30
+ </form>
31
+ </div>
32
+ <nav>
33
+
34
+ <div class="clear"></div>
35
+ </nav>
36
+ <a href="#" id="toc_handle">table of contents</a>
37
+ <div class="clear"></div>
38
+ </header>
39
+
40
+ <div id="cse">
41
+ <div id="cse_point"></div>
42
+ <div id="cse_content"></div>
43
+ </div>
44
+
45
+ <div id="main">
46
+
47
+ <h2>Error Handling</h2>
48
+
49
+ <h3 id="intro">Introduction</h3>
50
+ <p>
51
+ As you all (should) know <a href="http://en.wikipedia.org/wiki/Exception_handling">error handling</a>
52
+ is a very important part in the development process. Not only does it show the user that the page he/she/it
53
+ requested is not available, it's also a way to inform machines (browsers and such) about what’s going
54
+ on by providing a HTTP error status.
55
+ </p>
56
+
57
+ <h3 id="code_errors">Code errors</h3>
58
+
59
+ <p>
60
+ FuelPHP's internal error handling is based on Exceptions. This allows you to catch them in your code, so your
61
+ application can handle the exception that occured gracefully and the user can continue using the application.
62
+ </p>
63
+ <p>
64
+ FuelPHP also alters the default PHP behaviour when it comes to PHP errors (which are not exceptions) from the
65
+ old procedural functions. Instead of continuing on all non-fatal errors, <strong>FuelPHP will throw a PhpErrorException
66
+ on all of these errors</strong>. This will force you to solve all errors, even an E_NOTICE which in the old days you
67
+ might have ignored. It will also allow you to catch PHP errors. For example to catch syntax errors in view files
68
+ when you have non-programmers creating views.
69
+ </p>
70
+ <p>
71
+ You can alter this behaviour by adding PHP error types (like E_NOTICE or E_STRICT) to the <a href="./configuration.html#config">errors.continue_on</a> key
72
+ in your applications config/config.php file. Errors defined here will allow your script to continue. No exception
73
+ is being thrown for these errors, so you can no longer catch these.
74
+ </p>
75
+ <p class="note">
76
+ It is strongly adviced not to continue on errors, as it might lead to bugs in your code that are
77
+ very difficult to find once your application moves into production!
78
+ </p>
79
+
80
+ <h3 id="application_errors">Application logic errors</h3>
81
+
82
+ <h4 id="config">Error 404</h4>
83
+
84
+ <p>
85
+ The 404 route is set in <em>app/config/routes.php</em> and must point to the controller/method
86
+ that handles the 404 pages. <a href="routing.html">Read more about it in the routing section.</a>
87
+ </p>
88
+
89
+ <h4 id="throw">Throwing a 404</h4>
90
+
91
+ <p>
92
+ There may be times when one needs to throw a 404 error, such as when handling the routing yourself.
93
+ This is simply done by throwing a <kbd>HttpNotFoundException</kbd>. Fuel will <kbd>exit</kbd> for
94
+ you once it has run the 404 page.
95
+ </p>
96
+
97
+ <pre class="php"><code>throw new HttpNotFoundException;</code></pre>
98
+
99
+ <p class="note">
100
+ This exception is caught and processed in your applications index.php file. When caught, it will do
101
+ a lookup for the defined 404 route, and if found, it will forge a new request using the route found
102
+ as the URI for the request. As this is a normal request, the URI will be <strong>routed like any
103
+ other request!</strong>
104
+ </p>
105
+
106
+ <p>
107
+ If you don't want this behaviour, change your index.php file to read
108
+ </p>
109
+
110
+ <pre class="php"><code>// Generate the request, execute it and send the output.
111
+ try
112
+ {
113
+ $response = Request::forge()->execute()->response();
114
+ }
115
+ catch (HttpNotFoundException $e)
116
+ {
117
+ $route = array_key_exists('_404_', Router::$routes) ? Router::$routes['_404_']->translation : Config::get('routes._404_');
118
+ if ($route)
119
+ {
120
+ // add 'false' to the forge request do disable the routing engine
121
+ $response = Request::forge($route, false)->execute()->response();
122
+ }
123
+ else
124
+ {
125
+ throw $e;
126
+ }
127
+ }
128
+ </code></pre>
129
+
130
+ <h4 id="404_handling">404 handling</h4>
131
+
132
+ <p>
133
+ When a request is made and after the router looked for possible matches and there is no match, the 404
134
+ handling comes into play. By default the <strong>_404_</strong> route points to <em>welcome/404</em>,
135
+ let's take a look at that method:
136
+ </p>
137
+
138
+ <pre class="php"><code>// Inside Controller_Welcome
139
+
140
+ /**
141
+ * The 404 action for the application.
142
+ *
143
+ * @access public
144
+ * @return void
145
+ */
146
+ public function action_404()
147
+ {
148
+ $messages = array('Aw, crap!', 'Bloody Hell!', 'Uh Oh!', 'Nope, not here.', 'Huh?');
149
+ $data['title'] = $messages[array_rand($messages)];
150
+
151
+ // Set a HTTP 404 output header
152
+ return Response::forge(View::forge('welcome/404', $data), 404);
153
+ }</code></pre>
154
+
155
+ <p>
156
+ Here you can see what's going on inside the 404 handler. As you can see it's a normal controller action.
157
+ What's nice about this is that it allows you to show whatever content you like on the page. You can
158
+ load your own views with data fetched from a database.
159
+ </p>
160
+
161
+ <p class="note">
162
+ Note that Fuel doesn't set the 404 status, your response must set this. Return <em>Response::forge(ViewModel::forge('welcome/404'), 404);</em>
163
+ in order to send the correct status header.
164
+ </p>
165
+
166
+ <h4 id="catch_all">Catch all</h4>
167
+
168
+ <p>
169
+ Because Fuel doesn't set the 404 response status, you can use it as a catch all function.
170
+ You might have have a page model that can fetch the page from a database by uri.
171
+ Here is an example to illustrate the possibilities:
172
+ </p>
173
+
174
+ <pre class="php"><code>// Inside your 404 controller
175
+
176
+ public function action_my404()
177
+ {
178
+ $original_uri = \Input::uri();
179
+ $result = \DB::select()->from('pages')->where('uri', $original_uri)->execute();
180
+ if(count($result) === 1)
181
+ {
182
+ // display that page in whatever way you like
183
+ }
184
+ else
185
+ {
186
+ // display your general 404 page
187
+ $messages = array('Aw, crap!', 'Bloody Hell!', 'Uh Oh!', 'Nope, not here.', 'Huh?');
188
+ $data['title'] = $messages[array_rand($messages)];
189
+ return Response::forge(View::forge('welcome/404', $data), 404);
190
+ }
191
+ }</code></pre>
192
+
193
+ <h4 id="throw_500">Throwing a 500</h4>
194
+
195
+ <p>
196
+ There may be moments where your applications simply need to stop and show an error to
197
+ indicate that something has gone wrong on the server. Normally this is a
198
+ <a href="http://en.wikipedia.org/wiki/List_of_HTTP_status_codes#5xx_Server_Error">500 Internal
199
+ Server Error</a>.
200
+ </p>
201
+
202
+ <p>
203
+ Similar to throwing a 404, one can throw a 500 error.
204
+ </p>
205
+
206
+ <pre class="php"><code>throw new HttpServerErrorException;</code></pre>
207
+
208
+ </div>
209
+
210
+ <footer>
211
+ <p>
212
+ &copy; FuelPHP Development Team 2010-2013 - <a href="http://fuelphp.com">FuelPHP</a> is released under the MIT license.
213
+ </p>
214
+ </footer>
215
+ </div>
216
+ </body>
217
+ </html>
benchmark/NYU_CTF_Bench/development/2013/CSAW-Finals/web/historypeats/csaw/docs/general/extending_core.html ADDED
@@ -0,0 +1,174 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <!doctype html>
2
+ <html lang="en">
3
+ <head>
4
+ <meta charset="UTF-8">
5
+ <meta name="viewport" content="width=device-width, initial-scale=1.0">
6
+ <link rel="stylesheet" href="./../assets/css/combined.css">
7
+ <link rel="shortcut icon" href="./../favicon.ico" />
8
+ <script src="http://www.google.com/jsapi" type="text/javascript"></script>
9
+ <script type="text/javascript">
10
+ var path = './../';
11
+ </script>
12
+ <script src="./../assets/js/combined.js"></script>
13
+ <title>Extending Core - General - FuelPHP Documentation</title>
14
+ </head>
15
+ <body>
16
+ <div id="container">
17
+ <header id="header">
18
+ <div class="table">
19
+ <h1>
20
+ <strong>FuelPHP, a PHP 5.3 Framework</strong>
21
+ Documentation
22
+ </h1>
23
+
24
+ <form id="google_search">
25
+ <p>
26
+ <span id="search_clear">&nbsp;</span>
27
+ <input type="submit" name="search_submit" id="search_submit" value="search" />
28
+ <input type="text" value="" id="search_input" name="search_input" />
29
+ </p>
30
+ </form>
31
+ </div>
32
+ <nav>
33
+
34
+ <div class="clear"></div>
35
+ </nav>
36
+ <a href="#" id="toc_handle">table of contents</a>
37
+ <div class="clear"></div>
38
+ </header>
39
+
40
+ <div id="cse">
41
+ <div id="cse_point"></div>
42
+ <div id="cse_content"></div>
43
+ </div>
44
+
45
+ <div id="main">
46
+
47
+ <h2>Extending Core Classes</h2>
48
+
49
+ <p><strong>Be sure to know what you are doing, extended core methods under the same name will be used by the
50
+ core as well as by your application and this may result in unexpected behavior.</strong></p>
51
+
52
+ <ul>
53
+ <li><a href="#extend_dont_replace">Extending but not replacing the core class</a></li>
54
+ <li><a href="#extend_and_replace">Extending &amp; replacing core classes</a></li>
55
+ <li><a href="#extend_from_packages">Extending the Core from packages</a></li>
56
+ <li><a href="#extension_limitations">Extension limitations</a></li>
57
+ </ul>
58
+
59
+ <article>
60
+ <h3 id="extend_dont_replace">Extending but not replacing the core class</h3>
61
+
62
+ <p>These are the easiest and will work like any other class you create; just make them extend the core class
63
+ in the global namespace:</p>
64
+
65
+ <pre><code>class MyConfig extends Config {}</code></pre>
66
+ </article>
67
+
68
+ <article>
69
+ <h3 id="extend_and_replace">Extending &amp; replacing core classes</h3>
70
+
71
+ <p>If you want your core extension to be used by the core as well as by your own application you need to extend
72
+ it under the same name but take it from the "Fuel\Core" namespace. Below is an example for the Lang class
73
+ which you create in "fuel/app/classes/lang.php":</p>
74
+
75
+ <pre><code>class Lang extends Fuel\Core\Lang {}</code></pre>
76
+
77
+ <p>But classes that have the same name as core classes are ignored by default. To make the Autoloader recognize
78
+ your replacement you need to register it in the application bootstrap file. Search for the lines below:</p>
79
+
80
+ <pre><code>Autoloader::add_classes(array(
81
+ // Add classes you want to override here
82
+ // Example: 'View' => APPPATH.'classes/view.php',
83
+ ));</code></pre>
84
+
85
+ <p>As is explained in the comments you need to add the new Lang class as follows:</p>
86
+
87
+ <pre class="php"><code>Autoloader::add_classes(array(
88
+ // Add classes you want to override here
89
+ // Example: 'View' => APPPATH.'classes/view.php',
90
+ 'Lang' => APPPATH.'classes/lang.php',
91
+ ));</code></pre>
92
+
93
+ <p>After this the core class will have been replaced by your extension.</p>
94
+ <p class="note">The core class will still be available when used with full namespace prefixed. With the above example of
95
+ extending "Lang" you can still use the original by calling "Fuel\Core\Lang".</p>
96
+ </article>
97
+
98
+ <article>
99
+ <h3 id="extend_from_packages">Extending the Core from packages</h3>
100
+
101
+ <p>By adding your package as a core namespace the autoloader will attempt to load any class from your package
102
+ before it attempts it from the core. You must register these classes with the Autoloader though in order
103
+ for them to be detected (filesystem autoloader doesn't support aliasing to global). Below is an example for
104
+ extending the <kbd>View</kbd> class.</p>
105
+
106
+ <pre class="php"><code>Autoloader::add_core_namespace('Example');
107
+
108
+ Autoloader::add_classes(array(
109
+ 'Example\\View' => __DIR__.'/classes/view.php',
110
+ ));</code></pre>
111
+ </article>
112
+
113
+ <article>
114
+ <h3 id="extension_limitations">Extension limitations</h3>
115
+
116
+ <p>All classes can be extended from app. Most classes can be extended from packages but there are a few exceptions:</p>
117
+
118
+ <ul>
119
+ <li><kbd>Fuel</kbd></li>
120
+ <li><kbd>Config</kbd></li>
121
+ <li><kbd>Config_Php</kbd></li>
122
+ <li><kbd>Config_File</kbd></li>
123
+ <li><kbd>Config_Interface</kbd></li>
124
+ <li><kbd>Finder</kbd></li>
125
+ <li><kbd>Arr</kbd></li>
126
+ <li><kbd>Input</kbd></li>
127
+ <li><kbd>Security</kbd></li>
128
+ <li><kbd>Event</kbd></li>
129
+ <li><kbd>Event_Instance</kbd></li>
130
+ <li>And any class you use in your main <kbd>app/config/config.php</kbd></li>
131
+ </ul>
132
+
133
+ <p>If you have activated the profiler in your configuration, you can not extend these classes from packages too:</p>
134
+
135
+ <ul>
136
+ <li><kbd>Cookie</kbd></li>
137
+ <li><kbd>Session</kbd></li>
138
+ <li><kbd>Session_Cookie</kbd> (or another session driver class, depending on your session configuration)</li>
139
+ <li><kbd>Session_Driver</kbd></li>
140
+ <li><kbd>Date</kbd></li>
141
+ <li><kbd>Profiler</kbd></li>
142
+ </ul>
143
+
144
+ <p>
145
+ You can work around some of these limitations by manually load your package in the <kbd>app/bootstrap.php</kbd> file,
146
+ by adding <kbd>Package::load('mypackagename');</kbd> just before the <kbd>Fuel::init()</kbd> call. If you do,
147
+ your package can only not extend:
148
+ </p>
149
+
150
+ <ul>
151
+ <li><kbd>Fuel</kbd></li>
152
+ <li><kbd>Config</kbd></li>
153
+ <li><kbd>Package</kbd></li>
154
+ <li><kbd>Arr</kbd></li>
155
+ <li><kbd>Finder</kbd></li>
156
+ </ul>
157
+
158
+ <h4>Autoloader</h4>
159
+ <p>The Autoloader class is a special case, you can only extend it once as <code>Autoloader</code> and
160
+ have it used. After extending it you have to require it manually in the <kbd>app/bootstrap.php</kbd>
161
+ file after the original <code>Fuel\Core\Autoloader</code>, don't forget to remove the line that
162
+ aliases the core class to global.</p>
163
+ </article>
164
+
165
+ </div>
166
+
167
+ <footer>
168
+ <p>
169
+ &copy; FuelPHP Development Team 2010-2013 - <a href="http://fuelphp.com">FuelPHP</a> is released under the MIT license.
170
+ </p>
171
+ </footer>
172
+ </div>
173
+ </body>
174
+ </html>