Returns the common metadata of this file,
or of its specified revision.

@param   mixed  $revision  The index or timestamp of the revision (optional)
@return  mixed             The common metadata of this file (array),
or null if revision not found
541251
public function getCommonMetadata($revision = null)
	{
		// Without revision, use current info
		if (!isset($revision)) {
			return $this->info['commonmetadata'];
		}

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

		return $info['commonmetadata'];
	}
1248490
public function getUserId($revision = null)
	{
		// Without revision, use current info
		if (!isset($revision)) {
			return (int)$this->info['userid'];
		}

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

		return (int)$info['userid'];
	}
398058
public function getAction(Revision $revision)
    {
        $this->granted('VIEW', $revision->getContent());

        $response = $this->createJsonResponse();
        $response->setData($revision->jsonSerialize(Revision::JSON_REVISION_FORMAT));

        return $response;
    }
832074
public function metaData($key = null)
    {
        if (!$this->resource) {
            return null;
        }

        if (!$meta = stream_get_meta_data($this->resource)) {
            return null;
        }

        if (!$key) {
            return $meta;
        }

        return isset($meta[$key]) ? $meta[$key] : null;
    }
1280308
public function getRevMap()
    {
        if ($this->revMap === null) {
            if ($this->revFile && is_file($this->revFile)) {
                $this->revMap = (array) json_decode(file_get_contents($this->revFile));
            } else {
                $this->revMap = [];
            }
        }

        return $this->revMap;
    }
690221
public function getFilemtimeMetadata($file, $default = 0)
    {
        $this->readMetadataFile();

        return isset($this->metadata[$file]['mt']) ? $this->metadata[$file]['mt'] : $default;
    }
613996
private function getRevisionsFromResult( $array ) {
		$revisions = new Revisions();
		$pageid = $array['pageid'];
		foreach ( $array['revisions'] as $revision ) {
			$revisions->addRevision(
				new Revision(
					$this->getContent( $array['contentmodel'], $revision['*'] ),
					new PageIdentifier( new Title( $array['title'], $array['ns'] ), $pageid ),
					$revision['revid'],
					new EditInfo(
						$revision['comment'],
						array_key_exists( 'minor', $revision ),
						array_key_exists( 'bot', $revision )
					),
					$revision['user'],
					$revision['timestamp']
				)
			);
		}

		return $revisions;
	}
1254108
public function getCanonicalTitle($revision = null)
	{
		// Without revision, use current info
		if (!isset($revision)) {
			return $this->info['canonicaltitle'];
		}

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

		return $info['canonicaltitle'];
	}
1022833
public function get_revision() {
        global $CFG;
        if (empty($CFG->langstringcache)) {
            return -1;
        }
        if (isset($CFG->langrev)) {
            return (int)$CFG->langrev;
        } else {
            return -1;
        }
    }
858692
private function getTokenForRevision( Revision $revision ) {
		$result = $this->api->postRequest(
			new SimpleRequest(
				'query', [
				'prop' => 'revisions',
				'revids' => $revision->getId(),
				'rvtoken' => 'rollback',
			]
			)
		);
		$result = array_shift( $result['query']['pages'] );

		return $result['revisions'][0]['rollbacktoken'];
	}
68212
public function getEntityMetadata($entity)
    {
        if (!$this->isManagedByDoctrine($entity)) {
            return null;
        }

        $cacheKey = 'metadata';
        $entity   = $this->getEntityClassFull($entity);
        $metadata = $this->getFromCache($entity, $cacheKey);

        if (false !== $metadata) {
            return $metadata;
        }

        $metadata = $this->entityManager->getClassMetadata($entity);
        $this->cache[$metadata->getName()][$cacheKey] = $metadata;

        return $metadata;
    }
192638
public function getMetadata($key, $default = null)
    {
        if (!is_string($key)) {
            throw new \InvalidArgumentException('Non-string argument provided as a metadata key');
        }

        if (array_key_exists($key, $this->metadata)) {
            return $this->metadata[$key];
        }

        return $default;
    }
533137
public function getDiffFile($file)
    {
        $args = [
            '-r', '-p', '-m', '-M', '--no-commit-id', '--full-index', $this->revision,
            '--', $this->repository->getWikiDir().$file,
        ];

        $diff = Diff::parse($this->repository->run('diff-tree', $args));
        $diff->setRepository($this->repository);

        return $diff;
    }
36278
function getMetaData($key = null)
    {
        $data = $this->data;
        if ($key !== null)
            $data = ( isset($data[$key]) ) ? $data[$key] : null;


        return $data;
    }
206087
public function getUrl($revision = null)
	{
		// Without revision, use current info
		if (!isset($revision)) {
			return $this->info['url'];
		}

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

		return $info['url'];
	}
1048107
public function getChangedFilesSince(string $revision) : array
    {
        $cmd    = (new ChangedFiles($this->repo->getRoot()))->byRevision($revision);
        $result = $this->runner->run($cmd);

        return $result->getBufferedOutput();
    }
37341
public function getOriginalMetaData(string $key, $default = null)
    {
        $meta = $this->accessMetableAttribute($this->getOriginal('meta'));

        return $meta->get($key, $default);
    }