Page MenuHomec4science

PhabricatorFileBundleLoader.php
No OneTemporary

File Metadata

Created
Mon, Dec 2, 18:58

PhabricatorFileBundleLoader.php

<?php
/**
* Callback provider for loading @{class@arcanist:ArcanistBundle} file data
* stored in the Files application.
*/
final class PhabricatorFileBundleLoader {
private $viewer;
public function setViewer(PhabricatorUser $viewer) {
$this->viewer = $viewer;
return $this;
}
public function loadFileData($phid) {
$file = id(new PhabricatorFileQuery())
->setViewer($this->viewer)
->withPHIDs(array($phid))
->executeOne();
if (!$file) {
return null;
}
return $file->loadFileData();
}
}

Event Timeline