@@ -127,6 +127,9 @@ discard block |
||
| 127 | 127 | return $type2extension[$type]; |
| 128 | 128 | } |
| 129 | 129 | |
| 130 | + /** |
|
| 131 | + * @param string $extension |
|
| 132 | + */ |
|
| 130 | 133 | public function getTypeByExtension($extension) |
| 131 | 134 | { |
| 132 | 135 | return static::$_extension2type[$extension]; |
@@ -137,6 +140,9 @@ discard block |
||
| 137 | 140 | return ($this->goal ? $this->goal->fileType : null) ?: static::getTypeByExtension($this->_extension) ?: 'template'; |
| 138 | 141 | } |
| 139 | 142 | |
| 143 | + /** |
|
| 144 | + * @param string $path |
|
| 145 | + */ |
|
| 140 | 146 | public function setPath($path) |
| 141 | 147 | { |
| 142 | 148 | $path = Yii::getAlias($path); |
@@ -213,6 +219,9 @@ discard block |
||
| 213 | 219 | return $this->handler->renderPath($this->path, $this->data); |
| 214 | 220 | } |
| 215 | 221 | |
| 222 | + /** |
|
| 223 | + * @param string $content |
|
| 224 | + */ |
|
| 216 | 225 | public function write($content) |
| 217 | 226 | { |
| 218 | 227 | return $this->handler->write($this->path, $content); |
@@ -223,6 +232,9 @@ discard block |
||
| 223 | 232 | return $this->data = $this->handler->parsePath($this->path, $this->minimalPath); |
| 224 | 233 | } |
| 225 | 234 | |
| 235 | + /** |
|
| 236 | + * @return string |
|
| 237 | + */ |
|
| 226 | 238 | public function read() |
| 227 | 239 | { |
| 228 | 240 | return $this->handler->read($this->path); |
@@ -289,6 +301,9 @@ discard block |
||
| 289 | 301 | return is_null($field) ? $this->_stat : $this->_stat[$field]; |
| 290 | 302 | } |
| 291 | 303 | |
| 304 | + /** |
|
| 305 | + * @return integer |
|
| 306 | + */ |
|
| 292 | 307 | public function getUid() |
| 293 | 308 | { |
| 294 | 309 | return $this->getStat(4); |
@@ -303,6 +318,9 @@ discard block |
||
| 303 | 318 | return $this->getStat('owner')['name']; |
| 304 | 319 | } |
| 305 | 320 | |
| 321 | + /** |
|
| 322 | + * @return integer |
|
| 323 | + */ |
|
| 306 | 324 | public function getGid() |
| 307 | 325 | { |
| 308 | 326 | return $this->getStat(5); |