Returns the description URL of this file,
or of its specified revision.

@param   mixed  $revision  The index or timestamp of the revision (optional)
@return  mixed             The description URL of this file (string),
or null if revision not found
545561
public function getDescriptionUrl($revision = null)
	{
		// Without revision, use current info
		if (!isset($revision)) {
			return $this->info['descriptionurl'];
		}

		// Obtain the properties of the revision
		if (($info = $this->getRevision($revision)) === null) {
			return null;
		}

		return $info['descriptionurl'];
	}
175853
public function url($reset = true)
    {
        $output = preg_replace('|^' . preg_quote(GRAV_ROOT, '|') . '|', '', $this->get('filepath'));

        $locator = Grav::instance()['locator'];
        if ($locator->isStream($output)) {
            $output = $locator->findResource($output, false);
        }

        if ($reset) {
            $this->reset();
        }

        return trim(Grav::instance()['base_url'] . '/' . $this->urlQuerystring($output), '\\');
    }
176296
private function _getObject($id, $revision = null)
    {
        if ($revision === null) {
            $select = Statement::get(
                'GET_CURRENT_OBJECT',
                [
                    '@collection' => $this->_name,
                    '@id' => $this->_connector->quote($id)
                ]
            );
            $record = $this->_connector->query($select)->fetch();
            if ($record) {
                return json_decode($record['obj']);
            }
        }
        return null;
    }
666785
public function get(string $uri): Description
    {
        if (!$uri) {
            throw new \InvalidArgumentException("No document URI provided");
        }
        if ($this->basePath) {
            $uri = "$this->basePath/$uri";
        }
        if (!isset($this->specifications[$uri])) {
            $this->specifications[$uri] = $this->load($uri);
        }

        return $this->specifications[$uri];
    }
743609
public function getWidth($revision = null)
	{
		// Without revision, use current info
		if (!isset($revision)) {
			return (int)$this->info['width'];
		}

		// Obtain the properties of the revision
		if (($info = $this->getRevision($revision)) === null) {
			return -1;
		}

		return (int)$info['width'];
	}
337352
public function url($project = null, $ref = null, $doc = null)
    {
        $uri = $this->config('base_route');

        if ( ! is_null($project) )
        {
            if ( ! $project instanceof Project )
            {
                $project = $this->getProject($project);
            }
            $uri .= '/' . $project->getName();


            if ( ! is_null($ref) )
            {
                $uri .= '/' . $ref;
            }
            else
            {
                $uri .= '/' . $project->getDefaultRef();
            }


            if ( ! is_null($doc) )
            {
                $uri .= '/' . $doc;
            }
        }

        return url($uri);
    }
458630
private function checkContent(Revision $revision)
    {
        $content = $revision->getContent();

        if (null === $content || !($content instanceof AbstractClassContent)) {
            $this->_em->remove($revision);
            throw new ClassContentException('Orphan revision, deleted', ClassContentException::REVISION_ORPHAN);
        }

        if ($revision->getRevision() != $content->getRevision()) {
            throw new ClassContentException('Content is out of date', ClassContentException::REVISION_OUTOFDATE);
        }

        return $content;
    }
823345
public function log($path, $revision=null, $limit=null)
    {
        return $this->execute('log', array(
                '-r' => $revision ? $revision : false,
                '--limit' => $limit ? $limit : false,
                '--xml' => true,
                $this->getSvnUrl($path)
                )
        );
    }
1043360
public function getUser($revision = null)
	{
		// Without revision, use current info
		if (!isset($revision)) {
			return $this->info['user'];
		}

		// Obtain the properties of the revision
		if (($info = $this->getRevision($revision)) === null) {
			return null;
		}

		return $info['user'];
	}
346518
public function url($default = null): ?string
    {
        $disk = $this->getAttribute('disk');

        if (Storage::disk($disk)->exists($this->physicalPath())) {
            return Storage::disk($disk)->url($this->physicalPath());
        }

        return $default;
    }
169867
public function loadSubcontents(Revision $revision)
    {
        $content = $revision->getContent();
        if ($content instanceof ContentSet) {
            while ($subcontent = $revision->next()) {
                if (!($subcontent instanceof AbstractClassContent)) {
                    continue;
                }

                if ($this->_em->contains($subcontent)) {
                    continue;
                }

                $subcontent = $this->_em->find(get_class($subcontent), $subcontent->getUid());
            }
        } else {
            foreach ($revision->getData() as $key => $value) {
                if (is_array($value)) {
                    foreach ($value as &$val) {
                        if ($val instanceof AbstractClassContent) {
                            if (null !== $entity = $this->_em->find(get_class($val), $val->getUid())) {
                                $val = $entity;
                            }
                        }
                    }

                    unset($val);
                } elseif ($value instanceof AbstractClassContent) {
                    if (null !== $entity = $this->_em->find(get_class($value), $value->getUid())) {
                        $value = $entity;
                    }
                }

                $revision->$key = $value;
            }
        }

        return $revision;
    }
931656
protected function getVersion($version)
    {
        if (!$this->{$version.'Version'}) {
            $revisioned = get_class($this->revisioned);

            $revision = new $revisioned();
            $revision->setRawAttributes($this->{$version});

            $this->{$version.'Version'} = $revision;
        }

        return $this->{$version.'Version'};
    }
100500
public function getURL($grant = true)
    {
        if ($this->File->exists()) {
            return $this->File->getURL($grant);
        }
        return null;
    }
991780
private function rollbackToRevision(Revision $revision) {
        if ($revision == null) {
            return null;
        }

        $current = $revision->revisioned;

        // delete the old revisions for this model if needed
        if($this->getConfigRollbackCleanup()) {
            $revisionsToDelete = $current->revisions()->where('id', '>=', $revision->id)->delete();
        }

        $current->fill($revision->old);
        $current->save();

        // reload the relations
        $current = $current->load('revisions');

        return $current;
    }
446627
public function getRevFile($file)
    {
        $map = $this->getRevMap();
        if (isset($map[$file])) {
            $index = strrpos($file, '.');
            $file = $this->revPrefix . substr($file, 0, $index) . '-' . $map[$file] . substr($file, $index);
        }

        return $file;
    }
539053
private function get_po_revision( $file ) {
		$file        = $this->language_files_dir . '/' . $file;
		$headers     = array( 'PO-Revision-Date' => '"PO-Revision-Date' );
		$all_headers = array();

		$fp = fopen( $file, 'r' );

		// Pull only the first 1kiB of the file in.
		$contents = fread( $fp, 1024 );

		fclose( $fp );

		foreach ( $headers as $field => $regex ) {
			if ( preg_match( '/^[ \t\/*#@]*' . preg_quote( $regex, '/' ) . ':(.*)$/mi', $contents, $match ) && $match[1] ) {
				$value                 = $this->_cleanup_header_comment( $match[1] );
				$value                 = preg_replace( '~(\\\n)?"$~', '', $value );
				$all_headers[ $field ] = $value;
			} else {
				$all_headers[ $field ] = '';
			}
		}

		return $all_headers['PO-Revision-Date'];
	}
648484
public function getXsltLocation(string $version): string
    {
        if (array_key_exists($version, $this->xsltLocations)) {
            return $this->xsltLocations[$version];
        }
        return '';
    }