eZ\Publish\Core\IO\TolerantIOService::loadBinaryFile PHP Метод

loadBinaryFile() публичный Метод

Loads the binary file with $binaryFileId.
public loadBinaryFile ( string $binaryFileId ) : BinaryFile | eZ\Publish\Core\IO\Values\MissingBinaryFile
$binaryFileId string
Результат eZ\Publish\Core\IO\Values\BinaryFile | eZ\Publish\Core\IO\Values\MissingBinaryFile
    public function loadBinaryFile($binaryFileId)
    {
        $this->checkBinaryFileId($binaryFileId);
        if ($this->isAbsolutePath($binaryFileId)) {
            throw new InvalidBinaryAbsolutePathException($binaryFileId);
        }
        try {
            $spiBinaryFile = $this->metadataHandler->load($this->getPrefixedUri($binaryFileId));
        } catch (BinaryFileNotFoundException $e) {
            $this->logMissingFile($binaryFileId);
            return new MissingBinaryFile(['id' => $binaryFileId, 'uri' => $this->binarydataHandler->getUri($this->getPrefixedUri($binaryFileId))]);
        }
        if (!isset($spiBinaryFile->uri)) {
            $spiBinaryFile->uri = $this->binarydataHandler->getUri($spiBinaryFile->id);
        }
        return $this->buildDomainBinaryFileObject($spiBinaryFile);
    }