WikiFile::getArchivename PHP Method

getArchivename() public method

Revision can be the following: - revision timestamp (string, e.g. "2001-01-15T14:56:00Z") - revision index (int, e.g. 3) The most recent revision has index 0, and it increments towards older revisions. A timestamp must be in ISO 8601 format.
public getArchivename ( mixed $revision ) : mixed
$revision mixed The index or timestamp of the revision
return mixed The archive name (string), or null if not found
    public function getArchivename($revision)
    {
        // Obtain the properties of the revision
        if (($info = $this->getRevision($revision)) === null) {
            return null;
        }
        // Check for archive name
        if (!isset($info['archivename'])) {
            // Return error message
            $this->error = array();
            $this->error['file'] = 'This revision contains no archive name';
            return null;
        }
        return $info['archivename'];
    }