|
@@ 183-193 (lines=11) @@
|
| 180 |
|
return $this->getBasename(); |
| 181 |
|
} |
| 182 |
|
|
| 183 |
|
public function setFromLocalFile($path, $filename = null, $hash = null, $variant = null, $config = array()) { |
| 184 |
|
$this->assertFilenameValid($filename ?: $path); |
| 185 |
|
$result = $this |
| 186 |
|
->getStore() |
| 187 |
|
->setFromLocalFile($path, $filename, $hash, $variant, $config); |
| 188 |
|
// Update from result |
| 189 |
|
if($result) { |
| 190 |
|
$this->setValue($result); |
| 191 |
|
} |
| 192 |
|
return $result; |
| 193 |
|
} |
| 194 |
|
|
| 195 |
|
public function setFromStream($stream, $filename, $hash = null, $variant = null, $config = array()) { |
| 196 |
|
$this->assertFilenameValid($filename); |
|
@@ 195-205 (lines=11) @@
|
| 192 |
|
return $result; |
| 193 |
|
} |
| 194 |
|
|
| 195 |
|
public function setFromStream($stream, $filename, $hash = null, $variant = null, $config = array()) { |
| 196 |
|
$this->assertFilenameValid($filename); |
| 197 |
|
$result = $this |
| 198 |
|
->getStore() |
| 199 |
|
->setFromStream($stream, $filename, $hash, $variant, $config); |
| 200 |
|
// Update from result |
| 201 |
|
if($result) { |
| 202 |
|
$this->setValue($result); |
| 203 |
|
} |
| 204 |
|
return $result; |
| 205 |
|
} |
| 206 |
|
|
| 207 |
|
public function setFromString($data, $filename, $hash = null, $variant = null, $config = array()) { |
| 208 |
|
$this->assertFilenameValid($filename); |
|
@@ 207-217 (lines=11) @@
|
| 204 |
|
return $result; |
| 205 |
|
} |
| 206 |
|
|
| 207 |
|
public function setFromString($data, $filename, $hash = null, $variant = null, $config = array()) { |
| 208 |
|
$this->assertFilenameValid($filename); |
| 209 |
|
$result = $this |
| 210 |
|
->getStore() |
| 211 |
|
->setFromString($data, $filename, $hash, $variant, $config); |
| 212 |
|
// Update from result |
| 213 |
|
if($result) { |
| 214 |
|
$this->setValue($result); |
| 215 |
|
} |
| 216 |
|
return $result; |
| 217 |
|
} |
| 218 |
|
|
| 219 |
|
public function getStream() { |
| 220 |
|
if(!$this->exists()) { |