@@ -41,7 +41,7 @@ |
||
| 41 | 41 | /** |
| 42 | 42 | * A sort of constructor or entry point for helpers. |
| 43 | 43 | * @param mixed $arguments |
| 44 | - * @return \ntentan\honam\Helper |
|
| 44 | + * @return Helper |
|
| 45 | 45 | */ |
| 46 | 46 | public function help($arguments) |
| 47 | 47 | { |
@@ -229,6 +229,10 @@ |
||
| 229 | 229 | return $englishDate; |
| 230 | 230 | } |
| 231 | 231 | |
| 232 | + /** |
|
| 233 | + * @param double $value |
|
| 234 | + * @param boolean $future |
|
| 235 | + */ |
|
| 232 | 236 | private function getEnglishDate($timeFrame, $value, $future) |
| 233 | 237 | { |
| 234 | 238 | return ($timeFrame['show_elapsed'] ? "$value " : '') . |
@@ -62,7 +62,7 @@ |
||
| 62 | 62 | /** |
| 63 | 63 | * Sets the value that should be assigned as the checked value for |
| 64 | 64 | * this check box. |
| 65 | - * @param $checkedValue The value to be assigned. |
|
| 65 | + * @param string $checkedValue The value to be assigned. |
|
| 66 | 66 | * @return Checkbox |
| 67 | 67 | */ |
| 68 | 68 | public function setCheckedValue($checkedValue) |
@@ -76,6 +76,9 @@ |
||
| 76 | 76 | ); |
| 77 | 77 | } |
| 78 | 78 | |
| 79 | + /** |
|
| 80 | + * @param boolean $showSubmit |
|
| 81 | + */ |
|
| 79 | 82 | public function setShowSubmit($showSubmit) |
| 80 | 83 | { |
| 81 | 84 | $this->showSubmit = $showSubmit; |
@@ -2,8 +2,8 @@ |
||
| 2 | 2 | |
| 3 | 3 | namespace ntentan\honam\helpers; |
| 4 | 4 | |
| 5 | -use ntentan\honam\TemplateEngine; |
|
| 6 | 5 | use ntentan\honam\Helper; |
| 6 | +use ntentan\honam\TemplateEngine; |
|
| 7 | 7 | |
| 8 | 8 | class ListingHelper extends Helper |
| 9 | 9 | { |
@@ -28,7 +28,6 @@ |
||
| 28 | 28 | |
| 29 | 29 | use ntentan\honam\engines\php\HelpersLoader; |
| 30 | 30 | use ntentan\honam\engines\php\Janitor; |
| 31 | -use ntentan\honam\TemplateEngine; |
|
| 32 | 31 | use ntentan\honam\engines\php\Variable; |
| 33 | 32 | |
| 34 | 33 | /** |
@@ -3,9 +3,9 @@ |
||
| 3 | 3 | namespace ntentan\honam\factories; |
| 4 | 4 | |
| 5 | 5 | use ntentan\honam\template_engines\AbstractEngine; |
| 6 | +use ntentan\honam\template_engines\MustacheEngine; |
|
| 6 | 7 | use ntentan\honam\template_engines\mustache\MustacheLoader; |
| 7 | 8 | use ntentan\honam\template_engines\mustache\MustachePartialsLoader; |
| 8 | -use ntentan\honam\template_engines\MustacheEngine; |
|
| 9 | 9 | |
| 10 | 10 | |
| 11 | 11 | class MustacheEngineFactory implements EngineFactoryInterface |
@@ -33,6 +33,11 @@ discard block |
||
| 33 | 33 | array_unshift($this->pathHierarchy, $path); |
| 34 | 34 | } |
| 35 | 35 | |
| 36 | + /** |
|
| 37 | + * @param string $testTemplate |
|
| 38 | + * @param string[] $paths |
|
| 39 | + * @param string $extension |
|
| 40 | + */ |
|
| 36 | 41 | private function testTemplateFile($testTemplate, $paths, $extension) |
| 37 | 42 | { |
| 38 | 43 | $templateFile = ''; |
@@ -46,6 +51,10 @@ discard block |
||
| 46 | 51 | return $templateFile; |
| 47 | 52 | } |
| 48 | 53 | |
| 54 | + /** |
|
| 55 | + * @param string $testTemplate |
|
| 56 | + * @param string[] $paths |
|
| 57 | + */ |
|
| 49 | 58 | private function testNoEngineTemplateFile($testTemplate, $paths) |
| 50 | 59 | { |
| 51 | 60 | $templateFile = ''; |
@@ -53,6 +62,10 @@ discard block |
||
| 53 | 62 | $newTemplateFile = "$testTemplate.*"; |
| 54 | 63 | $files = array_filter( |
| 55 | 64 | scandir($path), |
| 65 | + |
|
| 66 | + /** |
|
| 67 | + * @param string $file |
|
| 68 | + */ |
|
| 56 | 69 | function($file) use($newTemplateFile) { |
| 57 | 70 | return fnmatch($newTemplateFile, $file); |
| 58 | 71 | }); |
@@ -67,6 +80,9 @@ discard block |
||
| 67 | 80 | return $templateFile; |
| 68 | 81 | } |
| 69 | 82 | |
| 83 | + /** |
|
| 84 | + * @param string $template |
|
| 85 | + */ |
|
| 70 | 86 | private function searchTemplateDirectory($template, $ignoreEngine = false) |
| 71 | 87 | { |
| 72 | 88 | $templateFile = ''; |
@@ -117,7 +117,6 @@ |
||
| 117 | 117 | * of rendering the view. |
| 118 | 118 | * |
| 119 | 119 | * @param string $template The template reference file. |
| 120 | - * @param array $templateData The data to be passed to the template. |
|
| 121 | 120 | * @return string |
| 122 | 121 | * @throws \ntentan\honam\exceptions\FileNotFoundException |
| 123 | 122 | */ |
@@ -26,8 +26,6 @@ |
||
| 26 | 26 | |
| 27 | 27 | namespace ntentan\honam; |
| 28 | 28 | |
| 29 | -use ntentan\honam\exceptions\TemplateResolutionException; |
|
| 30 | - |
|
| 31 | 29 | /** |
| 32 | 30 | * The TemplateEngine class does the work of resolving templates, loading template files, |
| 33 | 31 | * loading template engines and rendering templates. The `ntentan/views` package takes a reference to a |