@@ -12,7 +12,6 @@ |
||
| 12 | 12 | namespace Patron; |
| 13 | 13 | |
| 14 | 14 | use Brickrouge\Pager; |
| 15 | - |
|
| 16 | 15 | use ICanBoogie\Core; |
| 17 | 16 | use ICanBoogie\Render\TemplateName; |
| 18 | 17 | |
@@ -1044,6 +1044,10 @@ discard block |
||
| 1044 | 1044 | |
| 1045 | 1045 | var $list_level = 0; |
| 1046 | 1046 | |
| 1047 | + /** |
|
| 1048 | + * @param string $list_str |
|
| 1049 | + * @param string $marker_any_re |
|
| 1050 | + */ |
|
| 1047 | 1051 | function processListItems($list_str, $marker_any_re) { |
| 1048 | 1052 | # |
| 1049 | 1053 | # Process the contents of a single ordered or unordered list, splitting it |
@@ -1644,6 +1648,9 @@ discard block |
||
| 1644 | 1648 | # hanlde UTF-8 if the default function does not exist. |
| 1645 | 1649 | var $utf8_strlen = 'mb_strlen'; |
| 1646 | 1650 | |
| 1651 | + /** |
|
| 1652 | + * @param string $text |
|
| 1653 | + */ |
|
| 1647 | 1654 | function detab($text) { |
| 1648 | 1655 | # |
| 1649 | 1656 | # Replace tabs with the appropriate amount of space. |
@@ -375,6 +375,12 @@ discard block |
||
| 375 | 375 | |
| 376 | 376 | return array($parsed, $text); |
| 377 | 377 | } |
| 378 | + |
|
| 379 | + /** |
|
| 380 | + * @param string $text |
|
| 381 | + * @param string $hash_method |
|
| 382 | + * @param boolean $md_attr |
|
| 383 | + */ |
|
| 378 | 384 | function _hashHTMLBlocks_inHTML($text, $hash_method, $md_attr) { |
| 379 | 385 | # |
| 380 | 386 | # Parse HTML, calling _HashHTMLBlocks_InMarkdown for block tags. |
@@ -804,6 +810,9 @@ discard block |
||
| 804 | 810 | } |
| 805 | 811 | |
| 806 | 812 | |
| 813 | + /** |
|
| 814 | + * @return string |
|
| 815 | + */ |
|
| 807 | 816 | function processDefListItems($list_str) { |
| 808 | 817 | # |
| 809 | 818 | # Process the contents of a single definition list, splitting it |
@@ -219,6 +219,9 @@ discard block |
||
| 219 | 219 | return $text; |
| 220 | 220 | } |
| 221 | 221 | |
| 222 | + /** |
|
| 223 | + * @param string $text |
|
| 224 | + */ |
|
| 222 | 225 | private function doSourcePublish($text) |
| 223 | 226 | { |
| 224 | 227 | return Patron($text); |
@@ -796,6 +799,9 @@ discard block |
||
| 796 | 799 | ** |
| 797 | 800 | */ |
| 798 | 801 | |
| 802 | + /** |
|
| 803 | + * @param string $markup |
|
| 804 | + */ |
|
| 799 | 805 | function createElement($markup, $attrs, $body=NULL) |
| 800 | 806 | { |
| 801 | 807 | $rc = array(); |
@@ -934,6 +940,10 @@ discard block |
||
| 934 | 940 | # PHP source highlighter |
| 935 | 941 | # |
| 936 | 942 | |
| 943 | + /** |
|
| 944 | + * @param string $text |
|
| 945 | + * @param string $marker |
|
| 946 | + */ |
|
| 937 | 947 | function doSourceCommentLine($text, $marker) |
| 938 | 948 | { |
| 939 | 949 | $lines = explode("\n", $text); |
@@ -983,6 +993,9 @@ discard block |
||
| 983 | 993 | const QUOTE_DOUBLE = '"'; |
| 984 | 994 | const ESCAPE = '\\'; |
| 985 | 995 | |
| 996 | + /** |
|
| 997 | + * @param string $text |
|
| 998 | + */ |
|
| 986 | 999 | function doSourceString($text) |
| 987 | 1000 | { |
| 988 | 1001 | $out = NULL; |
@@ -115,6 +115,9 @@ discard block |
||
| 115 | 115 | protected $trace = []; |
| 116 | 116 | protected $errors = []; |
| 117 | 117 | |
| 118 | + /** |
|
| 119 | + * @param string[] $a |
|
| 120 | + */ |
|
| 118 | 121 | public function trace_enter($a) |
| 119 | 122 | { |
| 120 | 123 | array_unshift($this->trace, $a); |
@@ -205,6 +208,9 @@ discard block |
||
| 205 | 208 | return $rc; |
| 206 | 209 | } |
| 207 | 210 | |
| 211 | + /** |
|
| 212 | + * @return string |
|
| 213 | + */ |
|
| 208 | 214 | public function get_file() |
| 209 | 215 | { |
| 210 | 216 | foreach ($this->trace as $trace) |
@@ -233,6 +239,9 @@ discard block |
||
| 233 | 239 | |
| 234 | 240 | protected $templates = []; |
| 235 | 241 | |
| 242 | + /** |
|
| 243 | + * @param string $name |
|
| 244 | + */ |
|
| 236 | 245 | public function addTemplate($name, $template) |
| 237 | 246 | { |
| 238 | 247 | if (isset($this->templates[$name])) |
@@ -317,7 +326,7 @@ discard block |
||
| 317 | 326 | /** |
| 318 | 327 | * Calls a template. |
| 319 | 328 | * |
| 320 | - * @param $name |
|
| 329 | + * @param string $name |
|
| 321 | 330 | * @param array $args |
| 322 | 331 | * |
| 323 | 332 | * @return string |
@@ -376,6 +385,9 @@ discard block |
||
| 376 | 385 | ** |
| 377 | 386 | */ |
| 378 | 387 | |
| 388 | + /** |
|
| 389 | + * @return Node[] |
|
| 390 | + */ |
|
| 379 | 391 | protected function get_compiled($template) |
| 380 | 392 | { |
| 381 | 393 | static $compiler; |
@@ -264,6 +264,10 @@ |
||
| 264 | 264 | return $parts; |
| 265 | 265 | } |
| 266 | 266 | |
| 267 | + /** |
|
| 268 | + * @param string $expression |
|
| 269 | + * @param boolean $silent |
|
| 270 | + */ |
|
| 267 | 271 | protected function evaluate($context, $expression, $tokens, $silent) |
| 268 | 272 | { |
| 269 | 273 | $expression_path = []; |
@@ -38,6 +38,9 @@ discard block |
||
| 38 | 38 | $this->error_handler = $tags[self::T_ERROR_HANDLER]; |
| 39 | 39 | } |
| 40 | 40 | |
| 41 | + /** |
|
| 42 | + * @param string $html |
|
| 43 | + */ |
|
| 41 | 44 | public function parse($html, $namespace=null, $encoding='utf-8') |
| 42 | 45 | { |
| 43 | 46 | $this->encoding = $encoding; |
@@ -87,6 +90,9 @@ discard block |
||
| 87 | 90 | return $tree; |
| 88 | 91 | } |
| 89 | 92 | |
| 93 | + /** |
|
| 94 | + * @return string |
|
| 95 | + */ |
|
| 90 | 96 | protected function escapeSpecials($html) |
| 91 | 97 | { |
| 92 | 98 | # |