| @@ 95-110 (lines=16) @@ | ||
| 92 | * @return string $path |
|
| 93 | * @throws InvalidArgumentException |
|
| 94 | */ |
|
| 95 | protected function getTemplatePath($template) |
|
| 96 | {
|
|
| 97 | if( $template === null ) |
|
| 98 | {
|
|
| 99 | $template = str_replace("Xml", "", lcfirst(get_called_class()));
|
|
| 100 | } |
|
| 101 | ||
| 102 | $path = Yii::getPathOfAlias($this->templatesAlias.'.'.$template).'.php'; |
|
| 103 | ||
| 104 | if( !file_exists($path) ) |
|
| 105 | {
|
|
| 106 | throw new InvalidArgumentException('Отсутствует файл шаблона '.$path);
|
|
| 107 | } |
|
| 108 | ||
| 109 | return $path; |
|
| 110 | } |
|
| 111 | ||
| 112 | /** |
|
| 113 | * @return string $filePath |
|
| @@ 102-117 (lines=16) @@ | ||
| 99 | * @return string $path |
|
| 100 | * @throws InvalidArgumentException |
|
| 101 | */ |
|
| 102 | private function getTemplatePath($template) |
|
| 103 | {
|
|
| 104 | if( $template === null ) |
|
| 105 | {
|
|
| 106 | $template = str_replace("Xml", "", lcfirst(get_called_class()));
|
|
| 107 | } |
|
| 108 | ||
| 109 | $path = Yii::getPathOfAlias($this->templatesAlias.'.'.$template).'.php'; |
|
| 110 | ||
| 111 | if( !file_exists($path) ) |
|
| 112 | {
|
|
| 113 | throw new InvalidArgumentException('Отсутствует файл шаблона '.$path);
|
|
| 114 | } |
|
| 115 | ||
| 116 | return $path; |
|
| 117 | } |
|
| 118 | ||
| 119 | /** |
|
| 120 | * @return string $filePath |
|