fkooman\RemoteStorage\DocumentStorage::getDocument PHP Méthode

getDocument() public méthode

public getDocument ( Path $p )
$p Path
    public function getDocument(Path $p)
    {
        $documentPath = $this->baseDir . $p->getPath();
        if (!is_readable($documentPath)) {
            throw new DocumentStorageException('unable to read document');
        }
        $documentContent = @file_get_contents($documentPath);
        if (false === $documentContent) {
            throw new DocumentStorageException('error reading document');
        }
        return $documentContent;
    }