| @@ 45-55 (lines=11) @@ | ||
| 42 | * |
|
| 43 | * @return string |
|
| 44 | */ |
|
| 45 | public function __toString() |
|
| 46 | {
|
|
| 47 | if( !empty($this->name) && file_exists($this->getFullPath()) ) |
|
| 48 | {
|
|
| 49 | return '/' . $this->getFullPath(); |
|
| 50 | } |
|
| 51 | else |
|
| 52 | {
|
|
| 53 | return $this->defaultImage; |
|
| 54 | } |
|
| 55 | } |
|
| 56 | ||
| 57 | /** |
|
| 58 | * Получение неоригинального изображения |
|
| @@ 102-112 (lines=11) @@ | ||
| 99 | * |
|
| 100 | * @return string |
|
| 101 | */ |
|
| 102 | public function __toString() |
|
| 103 | {
|
|
| 104 | if( !empty($this->name) && file_exists($this->getFullPath()) ) |
|
| 105 | {
|
|
| 106 | return '/' . $this->getFullPath(); |
|
| 107 | } |
|
| 108 | else |
|
| 109 | {
|
|
| 110 | return $this->defaultImage; |
|
| 111 | } |
|
| 112 | } |
|
| 113 | ||
| 114 | /** |
|
| 115 | * Создание пути для файла |
|