@@ -85,7 +85,7 @@ |
||
| 85 | 85 | /** |
| 86 | 86 | * Returns the folder containing the document |
| 87 | 87 | * |
| 88 | - * @param $path |
|
| 88 | + * @param string $path |
|
| 89 | 89 | * |
| 90 | 90 | * @return bool|\library\storage\Document |
| 91 | 91 | * @throws \Exception |
@@ -35,7 +35,7 @@ discard block |
||
| 35 | 35 | */ |
| 36 | 36 | public function getDocumentBySlug($slug) |
| 37 | 37 | { |
| 38 | - $path = '/' . $slug; |
|
| 38 | + $path = '/'.$slug; |
|
| 39 | 39 | |
| 40 | 40 | return $this->repository->getDocumentByPath($path); |
| 41 | 41 | } |
@@ -45,14 +45,14 @@ discard block |
||
| 45 | 45 | */ |
| 46 | 46 | public function saveDocument($postValues) |
| 47 | 47 | { |
| 48 | - $oldPath = '/' . $postValues['path']; |
|
| 48 | + $oldPath = '/'.$postValues['path']; |
|
| 49 | 49 | |
| 50 | 50 | $container = $this->getDocumentContainerByPath($oldPath); |
| 51 | 51 | $documentObject = DocumentFactory::createDocumentFromPostValues($postValues, new DocumentTypesStorage($this->repository)); |
| 52 | 52 | if ($container->path === '/') { |
| 53 | - $newPath = $container->path . $documentObject->slug; |
|
| 53 | + $newPath = $container->path.$documentObject->slug; |
|
| 54 | 54 | } else { |
| 55 | - $newPath = $container->path . '/' . $documentObject->slug; |
|
| 55 | + $newPath = $container->path.'/'.$documentObject->slug; |
|
| 56 | 56 | } |
| 57 | 57 | $documentObject->path = $newPath; |
| 58 | 58 | $this->repository->saveDocument($documentObject); |
@@ -65,9 +65,9 @@ discard block |
||
| 65 | 65 | { |
| 66 | 66 | $documentObject = DocumentFactory::createDocumentFromPostValues($postValues, $this); |
| 67 | 67 | if ($postValues['path'] === '/') { |
| 68 | - $documentObject->path = $postValues['path'] . $documentObject->slug; |
|
| 68 | + $documentObject->path = $postValues['path'].$documentObject->slug; |
|
| 69 | 69 | } else { |
| 70 | - $documentObject->path = $postValues['path'] . '/' . $documentObject->slug; |
|
| 70 | + $documentObject->path = $postValues['path'].'/'.$documentObject->slug; |
|
| 71 | 71 | } |
| 72 | 72 | |
| 73 | 73 | $this->repository->saveDocument($documentObject); |
@@ -78,7 +78,7 @@ discard block |
||
| 78 | 78 | */ |
| 79 | 79 | public function deleteDocumentBySlug($slug) |
| 80 | 80 | { |
| 81 | - $path = '/' . $slug; |
|
| 81 | + $path = '/'.$slug; |
|
| 82 | 82 | $this->repository->deleteDocumentByPath($path); |
| 83 | 83 | } |
| 84 | 84 | |
@@ -82,7 +82,7 @@ discard block |
||
| 82 | 82 | */ |
| 83 | 83 | private function config() |
| 84 | 84 | { |
| 85 | - $storagePath = __DIR__ . '/../../' . $this->storageDir; |
|
| 85 | + $storagePath = __DIR__.'/../../'.$this->storageDir; |
|
| 86 | 86 | if (realpath($storagePath) === false) { |
| 87 | 87 | initFramework(); |
| 88 | 88 | if (Repository::create($storagePath)) { |
@@ -90,7 +90,7 @@ discard block |
||
| 90 | 90 | $repository->init(); |
| 91 | 91 | $this->repository = $repository; |
| 92 | 92 | } else { |
| 93 | - throw new \Exception('Could not create repository directory: ' . $storagePath); |
|
| 93 | + throw new \Exception('Could not create repository directory: '.$storagePath); |
|
| 94 | 94 | } |
| 95 | 95 | } else { |
| 96 | 96 | $this->repository = new Repository($storagePath); |
@@ -133,9 +133,9 @@ discard block |
||
| 133 | 133 | { |
| 134 | 134 | $documentFolderObject = DocumentFolderFactory::createDocumentFolderFromPostValues($postValues); |
| 135 | 135 | if ($postValues['path'] === '/') { |
| 136 | - $documentFolderObject->path = $postValues['path'] . $documentFolderObject->slug; |
|
| 136 | + $documentFolderObject->path = $postValues['path'].$documentFolderObject->slug; |
|
| 137 | 137 | } else { |
| 138 | - $documentFolderObject->path = $postValues['path'] . '/' . $documentFolderObject->slug; |
|
| 138 | + $documentFolderObject->path = $postValues['path'].'/'.$documentFolderObject->slug; |
|
| 139 | 139 | } |
| 140 | 140 | $this->repository->saveDocument($documentFolderObject); |
| 141 | 141 | } |
@@ -149,7 +149,7 @@ discard block |
||
| 149 | 149 | */ |
| 150 | 150 | public function deleteDocumentFolderBySlug($slug) |
| 151 | 151 | { |
| 152 | - $path = '/' . $slug; |
|
| 152 | + $path = '/'.$slug; |
|
| 153 | 153 | $this->repository->deleteDocumentByPath($path); |
| 154 | 154 | } |
| 155 | 155 | |
@@ -163,7 +163,7 @@ discard block |
||
| 163 | 163 | */ |
| 164 | 164 | public function getDocumentFolderBySlug($slug) |
| 165 | 165 | { |
| 166 | - $path = '/' . $slug; |
|
| 166 | + $path = '/'.$slug; |
|
| 167 | 167 | |
| 168 | 168 | return $this->repository->getDocumentByPath($path); |
| 169 | 169 | } |
@@ -58,7 +58,7 @@ discard block |
||
| 58 | 58 | $this->resetIndex(); |
| 59 | 59 | $this->addLog('Retrieving documents to be indexed.'); |
| 60 | 60 | $documents = $this->storage->getDocuments()->getDocuments(); |
| 61 | - $this->addLog('Start Document Term Count for ' . count($documents) . ' documents'); |
|
| 61 | + $this->addLog('Start Document Term Count for '.count($documents).' documents'); |
|
| 62 | 62 | $this->createDocumentTermCount($documents); |
| 63 | 63 | $this->addLog('Start Document Term Frequency.'); |
| 64 | 64 | $this->createDocumentTermFrequency(); |
@@ -159,7 +159,7 @@ discard block |
||
| 159 | 159 | private function addLog($string) |
| 160 | 160 | { |
| 161 | 161 | $currentTime = round(microtime(true) * 1000); |
| 162 | - $this->log .= date('d-m-Y H:i:s - ') . str_pad($string, 50, " ", STR_PAD_RIGHT) . "\t" . ($currentTime - $this->lastLog) . 'ms since last log. ' . "\t" . ($currentTime - $this->loggingStart) . 'ms since start.' . PHP_EOL; |
|
| 162 | + $this->log .= date('d-m-Y H:i:s - ').str_pad($string, 50, " ", STR_PAD_RIGHT)."\t".($currentTime - $this->lastLog).'ms since last log. '."\t".($currentTime - $this->loggingStart).'ms since start.'.PHP_EOL; |
|
| 163 | 163 | $this->lastLog = round(microtime(true) * 1000); |
| 164 | 164 | } |
| 165 | 165 | |
@@ -171,8 +171,8 @@ discard block |
||
| 171 | 171 | protected function getSearchDbHandle() |
| 172 | 172 | { |
| 173 | 173 | if ($this->searchDbHandle === null) { |
| 174 | - $path = __DIR__ . DIRECTORY_SEPARATOR . '..' . DIRECTORY_SEPARATOR . '..' . DIRECTORY_SEPARATOR . $this->storageDir . DIRECTORY_SEPARATOR; |
|
| 175 | - $this->searchDbHandle = new \PDO('sqlite:' . $path . self::SEARCH_TEMP_DB); |
|
| 174 | + $path = __DIR__.DIRECTORY_SEPARATOR.'..'.DIRECTORY_SEPARATOR.'..'.DIRECTORY_SEPARATOR.$this->storageDir.DIRECTORY_SEPARATOR; |
|
| 175 | + $this->searchDbHandle = new \PDO('sqlite:'.$path.self::SEARCH_TEMP_DB); |
|
| 176 | 176 | } |
| 177 | 177 | return $this->searchDbHandle; |
| 178 | 178 | } |
@@ -183,7 +183,7 @@ discard block |
||
| 183 | 183 | public function replaceOldIndex() |
| 184 | 184 | { |
| 185 | 185 | $this->searchDbHandle = null; |
| 186 | - $path = __DIR__ . DIRECTORY_SEPARATOR . '..' . DIRECTORY_SEPARATOR . '..' . DIRECTORY_SEPARATOR . $this->storageDir . DIRECTORY_SEPARATOR; |
|
| 187 | - rename($path . self::SEARCH_TEMP_DB, $path . 'search.db'); |
|
| 186 | + $path = __DIR__.DIRECTORY_SEPARATOR.'..'.DIRECTORY_SEPARATOR.'..'.DIRECTORY_SEPARATOR.$this->storageDir.DIRECTORY_SEPARATOR; |
|
| 187 | + rename($path.self::SEARCH_TEMP_DB, $path.'search.db'); |
|
| 188 | 188 | } |
| 189 | 189 | } |
| 190 | 190 | \ No newline at end of file |
@@ -12,58 +12,58 @@ |
||
| 12 | 12 | |
| 13 | 13 | class DocumentRouting implements CmsRouting |
| 14 | 14 | { |
| 15 | - /** |
|
| 16 | - * DocumentRouting constructor. |
|
| 17 | - * @param $request |
|
| 18 | - * @param $relativeCmsUri |
|
| 19 | - * @param CmsComponent $cmsComponent |
|
| 20 | - */ |
|
| 21 | - public function __construct($request, $relativeCmsUri, $cmsComponent) |
|
| 22 | - { |
|
| 23 | - if ($relativeCmsUri == '/documents') { |
|
| 24 | - $cmsComponent->subTemplate = 'cms/documents'; |
|
| 25 | - $cmsComponent->setParameter(CmsComponent::PARAMETER_DOCUMENTS, $cmsComponent->storage->getDocuments()->getDocuments()); |
|
| 26 | - $cmsComponent->setParameter(CmsComponent::PARAMETER_MAIN_NAV_CLASS, CmsComponent::PARAMETER_DOCUMENTS); |
|
| 27 | - } |
|
| 28 | - $this->documentRouting($request, $relativeCmsUri, $cmsComponent); |
|
| 29 | - $this->folderRouting($request, $relativeCmsUri, $cmsComponent); |
|
| 30 | - } |
|
| 31 | - |
|
| 32 | - |
|
| 33 | - /** |
|
| 34 | - * @param $request |
|
| 35 | - * @param $relativeCmsUri |
|
| 36 | - * @param CmsComponent $cmsComponent |
|
| 37 | - * @throws \Exception |
|
| 38 | - */ |
|
| 39 | - private function documentRouting($request, $relativeCmsUri, $cmsComponent) |
|
| 40 | - { |
|
| 41 | - if ($relativeCmsUri == '/documents/new-document' && isset($request::$get[CmsComponent::GET_PARAMETER_PATH])) { |
|
| 15 | + /** |
|
| 16 | + * DocumentRouting constructor. |
|
| 17 | + * @param $request |
|
| 18 | + * @param $relativeCmsUri |
|
| 19 | + * @param CmsComponent $cmsComponent |
|
| 20 | + */ |
|
| 21 | + public function __construct($request, $relativeCmsUri, $cmsComponent) |
|
| 22 | + { |
|
| 23 | + if ($relativeCmsUri == '/documents') { |
|
| 24 | + $cmsComponent->subTemplate = 'cms/documents'; |
|
| 25 | + $cmsComponent->setParameter(CmsComponent::PARAMETER_DOCUMENTS, $cmsComponent->storage->getDocuments()->getDocuments()); |
|
| 26 | + $cmsComponent->setParameter(CmsComponent::PARAMETER_MAIN_NAV_CLASS, CmsComponent::PARAMETER_DOCUMENTS); |
|
| 27 | + } |
|
| 28 | + $this->documentRouting($request, $relativeCmsUri, $cmsComponent); |
|
| 29 | + $this->folderRouting($request, $relativeCmsUri, $cmsComponent); |
|
| 30 | + } |
|
| 31 | + |
|
| 32 | + |
|
| 33 | + /** |
|
| 34 | + * @param $request |
|
| 35 | + * @param $relativeCmsUri |
|
| 36 | + * @param CmsComponent $cmsComponent |
|
| 37 | + * @throws \Exception |
|
| 38 | + */ |
|
| 39 | + private function documentRouting($request, $relativeCmsUri, $cmsComponent) |
|
| 40 | + { |
|
| 41 | + if ($relativeCmsUri == '/documents/new-document' && isset($request::$get[CmsComponent::GET_PARAMETER_PATH])) { |
|
| 42 | 42 | $this->documentOverviewRoute($request, $cmsComponent); |
| 43 | - } elseif ($relativeCmsUri == '/documents/edit-document' && isset($request::$get[CmsComponent::GET_PARAMETER_SLUG])) { |
|
| 43 | + } elseif ($relativeCmsUri == '/documents/edit-document' && isset($request::$get[CmsComponent::GET_PARAMETER_SLUG])) { |
|
| 44 | 44 | $this->editDocumentRoute($request, $cmsComponent); |
| 45 | - } elseif ($relativeCmsUri == '/documents/get-brick' && isset($request::$get[CmsComponent::GET_PARAMETER_SLUG])) { |
|
| 45 | + } elseif ($relativeCmsUri == '/documents/get-brick' && isset($request::$get[CmsComponent::GET_PARAMETER_SLUG])) { |
|
| 46 | 46 | $this->getBrickRoute($request, $cmsComponent); |
| 47 | - } else if ($relativeCmsUri == '/documents/delete-document' && isset($request::$get[CmsComponent::GET_PARAMETER_SLUG])) { |
|
| 47 | + } else if ($relativeCmsUri == '/documents/delete-document' && isset($request::$get[CmsComponent::GET_PARAMETER_SLUG])) { |
|
| 48 | 48 | $this->deleteDocumentRoute($request, $cmsComponent); |
| 49 | - } |
|
| 50 | - } |
|
| 51 | - |
|
| 52 | - /** |
|
| 53 | - * @param $request |
|
| 54 | - * @param $relativeCmsUri |
|
| 55 | - * @param CmsComponent $cmsComponent |
|
| 56 | - */ |
|
| 57 | - private function folderRouting($request, $relativeCmsUri, $cmsComponent) |
|
| 58 | - { |
|
| 59 | - if ($relativeCmsUri == '/documents/new-folder' && isset($request::$get[CmsComponent::GET_PARAMETER_PATH])) { |
|
| 49 | + } |
|
| 50 | + } |
|
| 51 | + |
|
| 52 | + /** |
|
| 53 | + * @param $request |
|
| 54 | + * @param $relativeCmsUri |
|
| 55 | + * @param CmsComponent $cmsComponent |
|
| 56 | + */ |
|
| 57 | + private function folderRouting($request, $relativeCmsUri, $cmsComponent) |
|
| 58 | + { |
|
| 59 | + if ($relativeCmsUri == '/documents/new-folder' && isset($request::$get[CmsComponent::GET_PARAMETER_PATH])) { |
|
| 60 | 60 | $this->newFolderRoute($request, $cmsComponent); |
| 61 | - } else if ($relativeCmsUri == '/documents/edit-folder' && isset($request::$get[CmsComponent::GET_PARAMETER_SLUG])) { |
|
| 61 | + } else if ($relativeCmsUri == '/documents/edit-folder' && isset($request::$get[CmsComponent::GET_PARAMETER_SLUG])) { |
|
| 62 | 62 | $this->editFolderRoute($request, $cmsComponent); |
| 63 | - } else if ($relativeCmsUri == '/documents/delete-folder' && isset($request::$get[CmsComponent::GET_PARAMETER_SLUG])) { |
|
| 63 | + } else if ($relativeCmsUri == '/documents/delete-folder' && isset($request::$get[CmsComponent::GET_PARAMETER_SLUG])) { |
|
| 64 | 64 | $this->deleteFolderRoute($request, $cmsComponent); |
| 65 | - } |
|
| 66 | - } |
|
| 65 | + } |
|
| 66 | + } |
|
| 67 | 67 | |
| 68 | 68 | /** |
| 69 | 69 | * @param $request |
@@ -79,7 +79,7 @@ discard block |
||
| 79 | 79 | if (isset($request::$get[CmsComponent::PARAMETER_DOCUMENT_TYPE])) { |
| 80 | 80 | if (isset($request::$post[CmsComponent::POST_PARAMETER_TITLE], $request::$get[CmsComponent::PARAMETER_DOCUMENT_TYPE], $request::$get[CmsComponent::GET_PARAMETER_PATH])) { |
| 81 | 81 | $cmsComponent->storage->getDocuments()->addDocument($request::$post); |
| 82 | - header('Location: ' . $request::$subfolders . $cmsComponent->getParameter(CmsComponent::PARAMETER_CMS_PREFIX) . '/documents'); |
|
| 82 | + header('Location: '.$request::$subfolders.$cmsComponent->getParameter(CmsComponent::PARAMETER_CMS_PREFIX).'/documents'); |
|
| 83 | 83 | exit; |
| 84 | 84 | } |
| 85 | 85 | $cmsComponent->setParameter(CmsComponent::PARAMETER_DOCUMENT_TYPE, $cmsComponent->storage->getDocumentTypeBySlug($request::$get[CmsComponent::PARAMETER_DOCUMENT_TYPE], true)); |
@@ -87,7 +87,7 @@ discard block |
||
| 87 | 87 | } else { |
| 88 | 88 | $documentTypes = $cmsComponent->storage->getDocumentTypes(); |
| 89 | 89 | if (count($documentTypes) < 1) { |
| 90 | - throw new \Exception('No Document Types defined yet. <a href="' . $request::$subfolders . $cmsComponent->getParameter(CmsComponent::PARAMETER_CMS_PREFIX) . '/configuration/document-types/new">Please do so first.</a>'); |
|
| 90 | + throw new \Exception('No Document Types defined yet. <a href="'.$request::$subfolders.$cmsComponent->getParameter(CmsComponent::PARAMETER_CMS_PREFIX).'/configuration/document-types/new">Please do so first.</a>'); |
|
| 91 | 91 | } |
| 92 | 92 | $cmsComponent->setParameter(CmsComponent::PARAMETER_DOCUMENT_TYPES, $documentTypes); |
| 93 | 93 | } |
@@ -104,7 +104,7 @@ discard block |
||
| 104 | 104 | $cmsComponent->setParameter(CmsComponent::PARAMETER_SMALLEST_IMAGE, $cmsComponent->storage->getImageSet()->getSmallestImageSet()->slug); |
| 105 | 105 | if (isset($request::$post[CmsComponent::POST_PARAMETER_TITLE], $request::$get[CmsComponent::GET_PARAMETER_SLUG])) { |
| 106 | 106 | $cmsComponent->storage->getDocuments()->saveDocument($request::$post); |
| 107 | - header('Location: ' . $request::$subfolders . $cmsComponent->getParameter(CmsComponent::PARAMETER_CMS_PREFIX) . '/documents'); |
|
| 107 | + header('Location: '.$request::$subfolders.$cmsComponent->getParameter(CmsComponent::PARAMETER_CMS_PREFIX).'/documents'); |
|
| 108 | 108 | exit; |
| 109 | 109 | } |
| 110 | 110 | $cmsComponent->setParameter(CmsComponent::PARAMETER_DOCUMENT, $cmsComponent->storage->getDocuments()->getDocumentBySlug($request::$get[CmsComponent::GET_PARAMETER_SLUG])); |
@@ -141,7 +141,7 @@ discard block |
||
| 141 | 141 | private function deleteDocumentRoute($request, $cmsComponent) |
| 142 | 142 | { |
| 143 | 143 | $cmsComponent->storage->getDocuments()->deleteDocumentBySlug($request::$get[CmsComponent::GET_PARAMETER_SLUG]); |
| 144 | - header('Location: ' . $request::$subfolders . $cmsComponent->getParameter(CmsComponent::PARAMETER_CMS_PREFIX) . '/documents'); |
|
| 144 | + header('Location: '.$request::$subfolders.$cmsComponent->getParameter(CmsComponent::PARAMETER_CMS_PREFIX).'/documents'); |
|
| 145 | 145 | exit; |
| 146 | 146 | } |
| 147 | 147 | |
@@ -155,7 +155,7 @@ discard block |
||
| 155 | 155 | $cmsComponent->setParameter(CmsComponent::PARAMETER_MAIN_NAV_CLASS, CmsComponent::PARAMETER_DOCUMENTS); |
| 156 | 156 | if (isset($request::$post[CmsComponent::POST_PARAMETER_TITLE], $request::$post[CmsComponent::GET_PARAMETER_PATH])) { |
| 157 | 157 | $cmsComponent->storage->addDocumentFolder($request::$post); |
| 158 | - header('Location: ' . $request::$subfolders . $cmsComponent->getParameter(CmsComponent::PARAMETER_CMS_PREFIX) . '/documents'); |
|
| 158 | + header('Location: '.$request::$subfolders.$cmsComponent->getParameter(CmsComponent::PARAMETER_CMS_PREFIX).'/documents'); |
|
| 159 | 159 | exit; |
| 160 | 160 | } |
| 161 | 161 | } |
@@ -174,11 +174,11 @@ discard block |
||
| 174 | 174 | array_pop($path); |
| 175 | 175 | $path = implode('/', $path); |
| 176 | 176 | |
| 177 | - $request::$get[CmsComponent::GET_PARAMETER_PATH] = '/' . $path; |
|
| 177 | + $request::$get[CmsComponent::GET_PARAMETER_PATH] = '/'.$path; |
|
| 178 | 178 | |
| 179 | 179 | if (isset($request::$post[CmsComponent::POST_PARAMETER_TITLE], $request::$post['content'])) { |
| 180 | 180 | $cmsComponent->storage->saveDocumentFolder($request::$post); |
| 181 | - header('Location: ' . $request::$subfolders . $cmsComponent->getParameter(CmsComponent::PARAMETER_CMS_PREFIX) . '/documents'); |
|
| 181 | + header('Location: '.$request::$subfolders.$cmsComponent->getParameter(CmsComponent::PARAMETER_CMS_PREFIX).'/documents'); |
|
| 182 | 182 | exit; |
| 183 | 183 | } |
| 184 | 184 | |
@@ -193,7 +193,7 @@ discard block |
||
| 193 | 193 | private function deleteFolderRoute($request, $cmsComponent) |
| 194 | 194 | { |
| 195 | 195 | $cmsComponent->storage->deleteDocumentFolderBySlug($request::$get[CmsComponent::GET_PARAMETER_SLUG]); |
| 196 | - header('Location: ' . $request::$subfolders . $cmsComponent->getParameter(CmsComponent::PARAMETER_CMS_PREFIX) . '/documents'); |
|
| 196 | + header('Location: '.$request::$subfolders.$cmsComponent->getParameter(CmsComponent::PARAMETER_CMS_PREFIX).'/documents'); |
|
| 197 | 197 | exit; |
| 198 | 198 | } |
| 199 | 199 | } |
| 200 | 200 | \ No newline at end of file |
@@ -85,7 +85,7 @@ discard block |
||
| 85 | 85 | if (isset($this->parameters['document'])) { |
| 86 | 86 | $this->runByDocumentParameter(); |
| 87 | 87 | } else { |
| 88 | - throw new \Exception('When not using a regex, you need to set the parameter `document` with the path to the document in this sitemap item: ' . $this->matchedSitemapItem->title); |
|
| 88 | + throw new \Exception('When not using a regex, you need to set the parameter `document` with the path to the document in this sitemap item: '.$this->matchedSitemapItem->title); |
|
| 89 | 89 | } |
| 90 | 90 | } |
| 91 | 91 | |
@@ -102,9 +102,9 @@ discard block |
||
| 102 | 102 | $relativeDocumentUri = current($this->matchedSitemapItem->matches[1]); |
| 103 | 103 | if (isset($this->parameters['folder'])) { |
| 104 | 104 | if (substr($this->parameters['folder'], -1) !== '/') { |
| 105 | - $this->parameters['folder'] = $this->parameters['folder'] . '/'; |
|
| 105 | + $this->parameters['folder'] = $this->parameters['folder'].'/'; |
|
| 106 | 106 | } |
| 107 | - $relativeDocumentUri = $this->parameters['folder'] . $relativeDocumentUri; |
|
| 107 | + $relativeDocumentUri = $this->parameters['folder'].$relativeDocumentUri; |
|
| 108 | 108 | } |
| 109 | 109 | |
| 110 | 110 | $document = $this->storage->getDocuments()->getDocumentBySlug($relativeDocumentUri); |