6use OutOfBoundsException;
18 protected function getRevision() : Revision
20 if ($this->revision_number !==
null) {
21 if ($this->resource->hasSpecificRevision($this->revision_number)) {
22 $revision = $this->resource->getSpecificRevision($this->revision_number);
24 throw new OutOfBoundsException(
"there is no version $this->revision_number of resource {$this->resource->getIdentification()->serialize()}");
27 $revision = $this->resource->getCurrentRevision();
An exception for terminatinating execution or to throw for unit testing.