@@ -31,7 +31,7 @@ discard block |
||
31 | 31 | * - |
32 | 32 | * - |
33 | 33 | * |
34 | - * @return object A Symfony\Component\HttpFoundation\Response |
|
34 | + * @return Response A Symfony\Component\HttpFoundation\Response |
|
35 | 35 | */ |
36 | 36 | public static function dispatch($file, $options = array()) |
37 | 37 | { |
@@ -223,6 +223,9 @@ discard block |
||
223 | 223 | return ($image) ? $image : static::dispatch($file, array('expires' => 31536000)); |
224 | 224 | } |
225 | 225 | |
226 | + /** |
|
227 | + * @param string $html |
|
228 | + */ |
|
226 | 229 | public static function urls($html) |
227 | 230 | { |
228 | 231 | if (is_null(static::$instance) || empty($html)) { |
@@ -463,6 +466,9 @@ discard block |
||
463 | 466 | return ($mime && $single) ? array_shift($mime) : $mime; |
464 | 467 | } |
465 | 468 | |
469 | + /** |
|
470 | + * @return string |
|
471 | + */ |
|
466 | 472 | private function css($file, $row) |
467 | 473 | { |
468 | 474 | $page = Page::html(); |
@@ -577,6 +583,9 @@ discard block |
||
577 | 583 | return; |
578 | 584 | } |
579 | 585 | |
586 | + /** |
|
587 | + * @param integer $count |
|
588 | + */ |
|
580 | 589 | private function ids($count) |
581 | 590 | { |
582 | 591 | $ids = array(); |
@@ -4,12 +4,12 @@ |
||
4 | 4 | |
5 | 5 | use BootPress\Page\Component as Page; |
6 | 6 | use BootPress\SQLite\Component as SQLite; |
7 | -use Symfony\Component\HttpFoundation\Response; |
|
8 | -use Symfony\Component\HttpFoundation\StreamedResponse; |
|
9 | -use Symfony\Component\HttpFoundation\BinaryFileResponse; |
|
10 | 7 | use League\Glide\Responses\SymfonyResponseFactory; |
11 | 8 | use League\Glide\ServerFactory; |
12 | 9 | use MatthiasMullie\Minify; |
10 | +use Symfony\Component\HttpFoundation\BinaryFileResponse; |
|
11 | +use Symfony\Component\HttpFoundation\Response; |
|
12 | +use Symfony\Component\HttpFoundation\StreamedResponse; |
|
13 | 13 | use phpUri; |
14 | 14 | |
15 | 15 | class Component |
@@ -779,7 +779,7 @@ |
||
779 | 779 | * @param string $group The name of the group. To verify $user_id against multiple groups then make this an ``array($group, ...)`` of groups. |
780 | 780 | * @param string $check If '**all**' (default) then they must be in every group specified. If '**any**' then they must be in at least one of the groups specified. |
781 | 781 | * |
782 | - * @return array True or False, whether or not your conditions were met. |
|
782 | + * @return boolean True or False, whether or not your conditions were met. |
|
783 | 783 | * |
784 | 784 | * ```php |
785 | 785 | * if ($auth->userInGroup($user_id, array('rothschild', 'white house', 'al-Qaeda'), 'any') { |
@@ -113,6 +113,9 @@ discard block |
||
113 | 113 | } |
114 | 114 | } |
115 | 115 | |
116 | + /** |
|
117 | + * @param string $type |
|
118 | + */ |
|
116 | 119 | public function query($type, $params = null) |
117 | 120 | { |
118 | 121 | $posts = array(); |
@@ -652,6 +655,9 @@ discard block |
||
652 | 655 | return ($single) ? array_shift($posts) : $posts; |
653 | 656 | } |
654 | 657 | |
658 | + /** |
|
659 | + * @param string $value |
|
660 | + */ |
|
655 | 661 | public function config($table = null, $path = null, $value = null) |
656 | 662 | { |
657 | 663 | if (is_null($this->config)) { |
@@ -698,6 +704,9 @@ discard block |
||
698 | 704 | return $param; |
699 | 705 | } |
700 | 706 | |
707 | + /** |
|
708 | + * @param string $table |
|
709 | + */ |
|
701 | 710 | private function configInfo($table, $path, $name) |
702 | 711 | { |
703 | 712 | if (empty($path)) { |
@@ -809,6 +818,9 @@ discard block |
||
809 | 818 | $this->updateConfig(); |
810 | 819 | } |
811 | 820 | |
821 | + /** |
|
822 | + * @param string $table |
|
823 | + */ |
|
812 | 824 | private function getId($table, $value) |
813 | 825 | { |
814 | 826 | if (is_null($this->ids)) { |
@@ -2,12 +2,12 @@ |
||
2 | 2 | |
3 | 3 | namespace BootPress\Blog; |
4 | 4 | |
5 | +use BootPress\Hierarchy\Component as Hierarchy; |
|
5 | 6 | use BootPress\Page\Component as Page; |
6 | -use BootPress\Theme\Component as Theme; |
|
7 | +use BootPress\Pagination\Component as Pagination; |
|
7 | 8 | use BootPress\SQLite\Component as SQLite; |
8 | 9 | use BootPress\Sitemap\Component as Sitemap; |
9 | -use BootPress\Hierarchy\Component as Hierarchy; |
|
10 | -use BootPress\Pagination\Component as Pagination; |
|
10 | +use BootPress\Theme\Component as Theme; |
|
11 | 11 | use Symfony\Component\Finder\Finder; |
12 | 12 | use Symfony\Component\Yaml\Yaml; |
13 | 13 |
@@ -48,8 +48,6 @@ discard block |
||
48 | 48 | /** |
49 | 49 | * This method works in conjunction with ``$bp->col()`` below. It makes things a little less verbose, but much easier to edit, modify, and see at a glance what in the world is going on. |
50 | 50 | * |
51 | - * @param string $size This value can be either '**xs**' < 768px, '**sm**' >= 768px, '**md**' >= 992 , or '**lg**' >= 1200. This is the point at which your grid will break, if no smaller size is indicated. With this method you can indicate multiple sizes by simply inserting another argument. All of your ``$size``'s must correspond with the values given in the ``$bp->col()``'s or ``$columns`` below. |
|
52 | - * @param array $columns An array of ``$bp->col()``'s. This argument does not need to be the second one in line. It is merely the last one given. |
|
53 | 51 | * |
54 | 52 | * @return string |
55 | 53 | * |
@@ -91,8 +89,6 @@ discard block |
||
91 | 89 | /** |
92 | 90 | * This is a helper method for ``$bp->row()`` above. It only returns it's own arguments, but it helps to keep things straight. Including arrays within arrays can get to be a little unwieldly, especially in a Smarty template. Just take a look at the ``$bp->media()`` method. |
93 | 91 | * |
94 | - * @param mixed $number This parameter must correspond with it's parent ``$bp->row($size)``. It can be an integer between 1 and 12, as long as all of the ``$bp->col()``'s respective numbers add up to 12 or less. To get fancy you can add a space, then an '**offset-**', '**push-**', or '**pull-**' followed by the number of columns that you would like to affect. All of these will be preceded by ``col-{$size}-...``. To include additional classes just keep on going with a space in between each like you normally would. |
|
95 | - * @param string $column The actual html content you would like to be placed in this column. |
|
96 | 92 | * |
97 | 93 | * @return array An array of it's own parameters. |
98 | 94 | * |
@@ -233,7 +229,7 @@ discard block |
||
233 | 229 | * @param string $name The name of the form. |
234 | 230 | * @param string $method The form's method for sending. |
235 | 231 | * |
236 | - * @return object |
|
232 | + * @return Bootstrap3Form |
|
237 | 233 | * |
238 | 234 | * ```php |
239 | 235 | * $form = $bp->form('example'); |
@@ -1204,6 +1200,9 @@ discard block |
||
1204 | 1200 | return array($html, $id); |
1205 | 1201 | } |
1206 | 1202 | |
1203 | + /** |
|
1204 | + * @param integer $count |
|
1205 | + */ |
|
1207 | 1206 | protected function listItem($link, $options, $name, $href, $count) |
1208 | 1207 | { |
1209 | 1208 | $name = trim(preg_replace('/(\<[^\<]+\<\/[^\>]+\>)/i', '', $name)); // remove tags and their contents |
@@ -2,8 +2,8 @@ |
||
2 | 2 | |
3 | 3 | namespace BootPress\Bootstrap; |
4 | 4 | |
5 | -use BootPress\Page\Component as Page; |
|
6 | 5 | use BootPress\Form\Component as Form; |
6 | +use BootPress\Page\Component as Page; |
|
7 | 7 | |
8 | 8 | class Bootstrap3 |
9 | 9 | { |
@@ -238,7 +238,7 @@ |
||
238 | 238 | /** |
239 | 239 | * This is to add html tags, or semicolons, or asterisks, or whatever you would like include with all of the form's prompts. |
240 | 240 | * |
241 | - * @param string|array $prompt The form label reference. If you want to include additional information relative to the field, then you can make this an ``array($prompt => $info)``, or an ``array($prompt, $info)`` that will appear when cliked or hovered over. To customize the icon set ``$form->prompt('info', 'fa fa-info-circle')``. |
|
241 | + * @param string $prompt The form label reference. If you want to include additional information relative to the field, then you can make this an ``array($prompt => $info)``, or an ``array($prompt, $info)`` that will appear when cliked or hovered over. To customize the icon set ``$form->prompt('info', 'fa fa-info-circle')``. |
|
242 | 242 | * @param string $name The name of the associated input field. |
243 | 243 | * @param string $id The id of the associated input field. |
244 | 244 | * |
@@ -153,6 +153,9 @@ |
||
153 | 153 | return $stmt; |
154 | 154 | } |
155 | 155 | |
156 | + /** |
|
157 | + * @param string $fetch |
|
158 | + */ |
|
156 | 159 | public function prepare($query, $fetch = null) |
157 | 160 | { |
158 | 161 | $query = (is_array($query)) ? trim(implode("\n", $query)) : trim($query); |
@@ -166,7 +166,7 @@ discard block |
||
166 | 166 | } |
167 | 167 | |
168 | 168 | /** |
169 | - * @return object The database connection. This is how we create lazy connections. |
|
169 | + * @return null|\PDO The database connection. This is how we create lazy connections. |
|
170 | 170 | */ |
171 | 171 | public function connection() |
172 | 172 | { |
@@ -185,6 +185,9 @@ discard block |
||
185 | 185 | return $this->connection; |
186 | 186 | } |
187 | 187 | |
188 | + /** |
|
189 | + * @param string $query |
|
190 | + */ |
|
188 | 191 | protected function dbPrepare($query) |
189 | 192 | { |
190 | 193 | return $this->connection->prepare($query); // returns (mixed) $stmt object or false |
@@ -205,6 +208,9 @@ discard block |
||
205 | 208 | return ($info = $stmt->errorInfo()) ? "Code: {$info[0]} Error: ({$info[1]}) {$info[2]}" : false; // returns (string) error or false |
206 | 209 | } |
207 | 210 | |
211 | + /** |
|
212 | + * @param string $fetch |
|
213 | + */ |
|
208 | 214 | protected function dbStyle($fetch) |
209 | 215 | { |
210 | 216 | switch ($fetch) { |
@@ -215,9 +215,9 @@ |
||
215 | 215 | * Retrieves an input's default value to display using the Validator::value method. This is used internally when creating form fields using this class. |
216 | 216 | * |
217 | 217 | * @param string $field The input's name. |
218 | - * @param false|mixed $escape If set to anything but false, then we run the value(s) through ``htmlspecialchars``. |
|
218 | + * @param string $escape If set to anything but false, then we run the value(s) through ``htmlspecialchars``. |
|
219 | 219 | * |
220 | - * @return array|string The field's default value. |
|
220 | + * @return string|null The field's default value. |
|
221 | 221 | */ |
222 | 222 | public function defaultValue($field, $escape = false) |
223 | 223 | { |
@@ -31,6 +31,9 @@ discard block |
||
31 | 31 | All you need to worry about is the 'id' and 'parent'. This class will take care of the rest. |
32 | 32 | */ |
33 | 33 | |
34 | + /** |
|
35 | + * @param string $table |
|
36 | + */ |
|
34 | 37 | public function __construct(Database $db, $table, $id = 'id') |
35 | 38 | { |
36 | 39 | $this->db = $db; |
@@ -41,6 +44,10 @@ discard block |
||
41 | 44 | // this should be called any time you insert into or delete from your hierarchical table |
42 | 45 | // http://stackoverflow.com/questions/4664517/how-do-you-convert-a-parent-child-adjacency-table-to-a-nested-set-using-php-an |
43 | 46 | // http://gen5.info/q/2008/11/04/nested-sets-php-verb-objects-and-noun-objects/ |
47 | + |
|
48 | + /** |
|
49 | + * @param string $order |
|
50 | + */ |
|
44 | 51 | public function refresh($order = null) |
45 | 52 | { |
46 | 53 | if (is_null($order)) { |
@@ -150,6 +157,10 @@ discard block |
||
150 | 157 | return $level; |
151 | 158 | } |
152 | 159 | |
160 | + /** |
|
161 | + * @param string $table |
|
162 | + * @param string $match |
|
163 | + */ |
|
153 | 164 | public function counts($table, $match, $id = null) |
154 | 165 | { |
155 | 166 | if (!is_null($id)) { |
@@ -287,6 +298,9 @@ discard block |
||
287 | 298 | return $children; |
288 | 299 | } |
289 | 300 | |
301 | + /** |
|
302 | + * @param integer $id |
|
303 | + */ |
|
290 | 304 | private function traverse($id, $level = -1) |
291 | 305 | { |
292 | 306 | $lft = $this->count; |
@@ -302,6 +316,9 @@ discard block |
||
302 | 316 | $this->update[$id] = array('level' => $level, 'lft' => $lft, 'rgt' => $rgt); |
303 | 317 | } |
304 | 318 | |
319 | + /** |
|
320 | + * @param string $prefix |
|
321 | + */ |
|
305 | 322 | private function fields($prefix, array $fields) |
306 | 323 | { |
307 | 324 | return $prefix.'.'.implode(', '.$prefix.'.', $fields); |