Changeset View
Changeset View
Standalone View
Standalone View
src/applications/files/document/PhabricatorDocumentRef.php
<?php | <?php | ||||
final class PhabricatorDocumentRef | final class PhabricatorDocumentRef | ||||
extends Phobject { | extends Phobject { | ||||
private $name; | private $name; | ||||
private $mimeType; | private $mimeType; | ||||
private $file; | private $file; | ||||
private $byteLength; | private $byteLength; | ||||
private $snippet; | private $snippet; | ||||
private $symbolMetadata = array(); | |||||
public function setFile(PhabricatorFile $file) { | public function setFile(PhabricatorFile $file) { | ||||
$this->file = $file; | $this->file = $file; | ||||
return $this; | return $this; | ||||
} | } | ||||
public function getFile() { | public function getFile() { | ||||
return $this->file; | return $this->file; | ||||
▲ Show 20 Lines • Show All 107 Lines • ▼ Show 20 Lines | final class PhabricatorDocumentRef | ||||
public function getSnippet() { | public function getSnippet() { | ||||
if ($this->snippet === null) { | if ($this->snippet === null) { | ||||
$this->snippet = $this->loadData(null, (1024 * 1024 * 1)); | $this->snippet = $this->loadData(null, (1024 * 1024 * 1)); | ||||
} | } | ||||
return $this->snippet; | return $this->snippet; | ||||
} | } | ||||
public function setSymbolMetadata(array $metadata) { | |||||
$this->symbolMetadata = $metadata; | |||||
return $this; | |||||
} | |||||
public function getSymbolMetadata() { | |||||
return $this->symbolMetadata; | |||||
} | |||||
} | } |