]> _ Git - fluidbook_tools.git/commitdiff
wip #5977 @0.25
authorVincent Vanwaelscappel <vincent@cubedesigners.com>
Thu, 1 Jun 2023 09:28:07 +0000 (11:28 +0200)
committerVincent Vanwaelscappel <vincent@cubedesigners.com>
Thu, 1 Jun 2023 09:28:07 +0000 (11:28 +0200)
src/Compiler/Compiler.php
src/Compiler/CompilerInterface.php
src/Compiler/DummyCompiler.php
src/Links/ZoomLink.php

index 1a70147413d41d6191a7bc33b1a2243edf03e04f..97b74e31680509bddf08b5b2a37bffa55f25ffd5 100644 (file)
@@ -370,4 +370,17 @@ class Compiler implements ShouldQueue, ShouldBeUnique, CompilerInterface {
     public function getHeightForLinks() {
         return $this->getHeight() / $this->getLinkScale();
     }
+
+
+    public function isSinglePage(): bool {
+        // TODO: Implement isSinglePage() method.
+    }
+
+    public function isDoublePage(): bool {
+        // TODO: Implement isDoublePage() method.
+    }
+
+    public function getPageNumber(): int {
+        return (int)$this->config->pages;
+    }
 }
index 6bcb4fdac009b10f105399fbfd88c6d4aaa9c63a..e03fc20d9f610b5d030c9ca02e0233f25b99527f 100644 (file)
@@ -63,4 +63,6 @@ interface CompilerInterface {
     public function addPDFJS($force = false);
 
     public function addSEOArticle($page, $title, $intro, $image, $id = null, $url = null, $content = '');
+
+    public function getPageNumber(): int;
 }
index 017e438a45c08e9b08a48d8b03051261ffb24419..9a6531ca6b62d312a3993a56ce44392e89c2df0f 100644 (file)
@@ -131,4 +131,8 @@ class DummyCompiler implements CompilerInterface {
     public function isDoublePage(): bool {
         return !$this->isSinglePage();
     }
+
+    public function getPageNumber(): int {
+        // TODO: Implement getPageNumber() method.
+    }
 }
index f4c8260b3f7af0c417a36ab7f16eeb8317044bcb..3b9d5c702d21ba6ffd44a4417f780f53c0fbb4d7 100644 (file)
@@ -150,7 +150,7 @@ class ZoomLink extends NormalLink {
                 null, $extractOptions, $cache);
 
             if (!file_exists($rightfile)) {
-                die('Error generating right part ' . $rightfile);
+                throw new \Exception('Error generating right part ' . $rightfile);
             }
 
             $both = $cache . hash('sha256', $leftfile . $rightfile) . '.jpg';