@@ -33,8 +33,8 @@ discard block |
||
33 | 33 | // Load current document. |
34 | 34 | $this->loadDocument($this->requestData); |
35 | 35 | if ( |
36 | - $this->document === null |
|
37 | - || $this->document->getDoc() === null |
|
36 | + $this->document === NULL |
|
37 | + || $this->document->getDoc() === NULL |
|
38 | 38 | || $this->document->getDoc()->metadataArray['LOG_0001']['type'][0] != 'object' |
39 | 39 | ) { |
40 | 40 | // Quit without doing anything if required variables are not set. |
@@ -45,7 +45,7 @@ discard block |
||
45 | 45 | // Configure @action URL for form. |
46 | 46 | $uri = $this->uriBuilder->reset() |
47 | 47 | ->setTargetPageUid($GLOBALS['TSFE']->id) |
48 | - ->setCreateAbsoluteUri(!empty($this->settings['forceAbsoluteUrl']) ? true : false) |
|
48 | + ->setCreateAbsoluteUri(!empty($this->settings['forceAbsoluteUrl']) ? TRUE : FALSE) |
|
49 | 49 | ->setArguments([ |
50 | 50 | 'eID' => 'tx_dlf_pageview_proxy', |
51 | 51 | 'url' => urlencode($url), |
@@ -162,7 +162,7 @@ discard block |
||
162 | 162 | |
163 | 163 | $countDocs = 0; |
164 | 164 | if ($basket->getDocIds()) { |
165 | - $countDocs = count(json_decode($basket->getDocIds(), true)); |
|
165 | + $countDocs = count(json_decode($basket->getDocIds(), TRUE)); |
|
166 | 166 | } |
167 | 167 | $this->view->assign('countDocs', $countDocs); |
168 | 168 | |
@@ -212,13 +212,13 @@ discard block |
||
212 | 212 | $basket = $this->basketRepository->findOneByFeUserId((int) $GLOBALS['TSFE']->fe_user->user['uid']); |
213 | 213 | } else { |
214 | 214 | $GLOBALS['TSFE']->fe_user->setKey('ses', 'tx_dlf_basket', ''); |
215 | - $GLOBALS['TSFE']->fe_user->sesData_change = true; |
|
215 | + $GLOBALS['TSFE']->fe_user->sesData_change = TRUE; |
|
216 | 216 | $GLOBALS['TSFE']->fe_user->storeSessionData(); |
217 | 217 | |
218 | 218 | $basket = $this->basketRepository->findOneBySessionId($sessionId); |
219 | 219 | } |
220 | 220 | // session does not exist |
221 | - if ($basket === null) { |
|
221 | + if ($basket === NULL) { |
|
222 | 222 | // create new basket in db |
223 | 223 | $basket = GeneralUtility::makeInstance(Basket::class); |
224 | 224 | $basket->setSessionId($sessionId); |
@@ -347,7 +347,7 @@ discard block |
||
347 | 347 | 'record_id' => $this->document->getRecordId(), |
348 | 348 | ]; |
349 | 349 | } |
350 | - return false; |
|
350 | + return FALSE; |
|
351 | 351 | } |
352 | 352 | |
353 | 353 | /** |
@@ -369,7 +369,7 @@ discard block |
||
369 | 369 | } else { |
370 | 370 | $page = (int) $_piVars['startpage']; |
371 | 371 | } |
372 | - if ($page != null || $_piVars['addToBasket'] == 'list') { |
|
372 | + if ($page != NULL || $_piVars['addToBasket'] == 'list') { |
|
373 | 373 | $documentItem = [ |
374 | 374 | 'id' => (int) $_piVars['id'], |
375 | 375 | 'startpage' => (int) $_piVars['startpage'], |
@@ -391,8 +391,8 @@ discard block |
||
391 | 391 | // get document instance to load further information |
392 | 392 | $this->loadDocument(['id' => $documentItem['id']]); |
393 | 393 | if ( |
394 | - $this->document === null |
|
395 | - || $this->document->getDoc() === null |
|
394 | + $this->document === NULL |
|
395 | + || $this->document->getDoc() === NULL |
|
396 | 396 | ) { |
397 | 397 | // Quit without doing anything if required variables are not set. |
398 | 398 | return; |
@@ -447,7 +447,7 @@ discard block |
||
447 | 447 | } |
448 | 448 | |
449 | 449 | $basket->setDocIds(json_encode($items)); |
450 | - if ($basket->getUid() === null) { |
|
450 | + if ($basket->getUid() === NULL) { |
|
451 | 451 | $this->basketRepository->add($basket); |
452 | 452 | } else { |
453 | 453 | $this->basketRepository->update($basket); |
@@ -87,7 +87,7 @@ discard block |
||
87 | 87 | * @var bool |
88 | 88 | * @access protected |
89 | 89 | */ |
90 | - protected $hasFulltextSet = false; |
|
90 | + protected $hasFulltextSet = FALSE; |
|
91 | 91 | |
92 | 92 | /** |
93 | 93 | * This holds the original manifest's parsed metadata array with their corresponding |
@@ -120,7 +120,7 @@ discard block |
||
120 | 120 | */ |
121 | 121 | protected function establishRecordId($pid) |
122 | 122 | { |
123 | - if ($this->iiif !== null) { |
|
123 | + if ($this->iiif !== NULL) { |
|
124 | 124 | /* |
125 | 125 | * FIXME This will not consistently work because we can not be sure to have the pid at hand. It may miss |
126 | 126 | * if the plugin that actually loads the manifest allows content from other pages. |
@@ -208,7 +208,7 @@ discard block |
||
208 | 208 | * @var bool |
209 | 209 | * @access protected |
210 | 210 | */ |
211 | - protected $useGrpsLoaded = false; |
|
211 | + protected $useGrpsLoaded = FALSE; |
|
212 | 212 | |
213 | 213 | /** |
214 | 214 | * Holds the configured useGrps as array. |
@@ -250,7 +250,7 @@ discard block |
||
250 | 250 | if (!empty($extConf['fileGrpAudio'])) { |
251 | 251 | $this->useGrps['fileGrpAudio'] = GeneralUtility::trimExplode(',', $extConf['fileGrpAudio']); |
252 | 252 | } |
253 | - $this->useGrpsLoaded = true; |
|
253 | + $this->useGrpsLoaded = TRUE; |
|
254 | 254 | } |
255 | 255 | return array_key_exists($use, $this->useGrps) ? $this->useGrps[$use] : []; |
256 | 256 | } |
@@ -263,8 +263,8 @@ discard block |
||
263 | 263 | { |
264 | 264 | // Is there no physical structure array yet? |
265 | 265 | if (!$this->physicalStructureLoaded) { |
266 | - if ($this->iiif == null || !($this->iiif instanceof ManifestInterface)) { |
|
267 | - return null; |
|
266 | + if ($this->iiif == NULL || !($this->iiif instanceof ManifestInterface)) { |
|
267 | + return NULL; |
|
268 | 268 | } |
269 | 269 | $extConf = GeneralUtility::makeInstance(ExtensionConfiguration::class)->get(self::$extKey); |
270 | 270 | $iiifId = $this->iiif->getId(); |
@@ -274,7 +274,7 @@ discard block |
||
274 | 274 | $this->physicalStructureInfo[$physSeq[0]]['label'] = $this->iiif->getLabelForDisplay(); |
275 | 275 | $this->physicalStructureInfo[$physSeq[0]]['orderlabel'] = $this->iiif->getLabelForDisplay(); |
276 | 276 | $this->physicalStructureInfo[$physSeq[0]]['type'] = 'physSequence'; |
277 | - $this->physicalStructureInfo[$physSeq[0]]['contentIds'] = null; |
|
277 | + $this->physicalStructureInfo[$physSeq[0]]['contentIds'] = NULL; |
|
278 | 278 | $fileUseDownload = $this->getUseGroups('fileGrpDownload'); |
279 | 279 | $fileUseFulltext = $this->getUseGroups('fileGrpFulltext'); |
280 | 280 | $fileUseThumbs = $this->getUseGroups('fileGrpThumbs'); |
@@ -288,13 +288,13 @@ discard block |
||
288 | 288 | if (!empty($fileUseFulltext)) { |
289 | 289 | $iiifAlto = $this->iiif->getSeeAlsoUrlsForFormat('application/alto+xml'); |
290 | 290 | if (empty($iiifAlto)) { |
291 | - $iiifAlto = $this->iiif->getSeeAlsoUrlsForProfile('http://www.loc.gov/standards/alto/', true); |
|
291 | + $iiifAlto = $this->iiif->getSeeAlsoUrlsForProfile('http://www.loc.gov/standards/alto/', TRUE); |
|
292 | 292 | } |
293 | 293 | if (!empty($iiifAlto)) { |
294 | 294 | $this->mimeTypes[$iiifAlto[0]] = 'application/alto+xml'; |
295 | 295 | $this->physicalStructureInfo[$physSeq[0]]['files'][$fileUseFulltext[0]] = $iiifAlto[0]; |
296 | - $this->hasFulltext = true; |
|
297 | - $this->hasFulltextSet = true; |
|
296 | + $this->hasFulltext = TRUE; |
|
297 | + $this->hasFulltextSet = TRUE; |
|
298 | 298 | } |
299 | 299 | } |
300 | 300 | if (!empty($this->iiif->getDefaultCanvases())) { |
@@ -313,39 +313,39 @@ discard block |
||
313 | 313 | // populate structural metadata info |
314 | 314 | $elements[$canvasOrder] = $canvas->getId(); |
315 | 315 | $this->physicalStructureInfo[$elements[$canvasOrder]]['id'] = $canvas->getId(); |
316 | - $this->physicalStructureInfo[$elements[$canvasOrder]]['dmdId'] = null; |
|
316 | + $this->physicalStructureInfo[$elements[$canvasOrder]]['dmdId'] = NULL; |
|
317 | 317 | $this->physicalStructureInfo[$elements[$canvasOrder]]['label'] = $canvas->getLabelForDisplay(); |
318 | 318 | $this->physicalStructureInfo[$elements[$canvasOrder]]['orderlabel'] = $canvas->getLabelForDisplay(); |
319 | 319 | // assume that a canvas always represents a page |
320 | 320 | $this->physicalStructureInfo[$elements[$canvasOrder]]['type'] = 'page'; |
321 | - $this->physicalStructureInfo[$elements[$canvasOrder]]['contentIds'] = null; |
|
322 | - $this->physicalStructureInfo[$elements[$canvasOrder]]['annotationContainers'] = null; |
|
321 | + $this->physicalStructureInfo[$elements[$canvasOrder]]['contentIds'] = NULL; |
|
322 | + $this->physicalStructureInfo[$elements[$canvasOrder]]['annotationContainers'] = NULL; |
|
323 | 323 | if (!empty($canvas->getPossibleTextAnnotationContainers(Motivation::PAINTING))) { |
324 | 324 | $this->physicalStructureInfo[$elements[$canvasOrder]]['annotationContainers'] = []; |
325 | 325 | foreach ($canvas->getPossibleTextAnnotationContainers(Motivation::PAINTING) as $annotationContainer) { |
326 | 326 | $this->physicalStructureInfo[$elements[$canvasOrder]]['annotationContainers'][] = $annotationContainer->getId(); |
327 | 327 | if ($extConf['indexAnnotations']) { |
328 | - $this->hasFulltext = true; |
|
329 | - $this->hasFulltextSet = true; |
|
328 | + $this->hasFulltext = TRUE; |
|
329 | + $this->hasFulltextSet = TRUE; |
|
330 | 330 | } |
331 | 331 | } |
332 | 332 | } |
333 | 333 | if (!empty($fileUseFulltext)) { |
334 | 334 | $alto = $canvas->getSeeAlsoUrlsForFormat('application/alto+xml'); |
335 | 335 | if (empty($alto)) { |
336 | - $alto = $canvas->getSeeAlsoUrlsForProfile('http://www.loc.gov/standards/alto/', true); |
|
336 | + $alto = $canvas->getSeeAlsoUrlsForProfile('http://www.loc.gov/standards/alto/', TRUE); |
|
337 | 337 | } |
338 | 338 | if (!empty($alto)) { |
339 | 339 | $this->mimeTypes[$alto[0]] = 'application/alto+xml'; |
340 | 340 | $this->physicalStructureInfo[$elements[$canvasOrder]]['files'][$fileUseFulltext[0]] = $alto[0]; |
341 | - $this->hasFulltext = true; |
|
342 | - $this->hasFulltextSet = true; |
|
341 | + $this->hasFulltext = TRUE; |
|
342 | + $this->hasFulltextSet = TRUE; |
|
343 | 343 | } |
344 | 344 | } |
345 | 345 | if (!empty($fileUses)) { |
346 | 346 | $image = $canvas->getImageAnnotations()[0]; |
347 | 347 | foreach ($fileUses as $fileUse) { |
348 | - if ($image->getBody() !== null && $image->getBody() instanceof ContentResourceInterface) { |
|
348 | + if ($image->getBody() !== NULL && $image->getBody() instanceof ContentResourceInterface) { |
|
349 | 349 | $this->physicalStructureInfo[$elements[$canvasOrder]]['files'][$fileUse] = $image->getBody()->getId(); |
350 | 350 | } |
351 | 351 | } |
@@ -364,7 +364,7 @@ discard block |
||
364 | 364 | // Merge and re-index the array to get nice numeric indexes. |
365 | 365 | $this->physicalStructure = array_merge($physSeq, $elements); |
366 | 366 | } |
367 | - $this->physicalStructureLoaded = true; |
|
367 | + $this->physicalStructureLoaded = TRUE; |
|
368 | 368 | } |
369 | 369 | return $this->physicalStructure; |
370 | 370 | } |
@@ -389,15 +389,15 @@ discard block |
||
389 | 389 | */ |
390 | 390 | public function getFileLocation($id) |
391 | 391 | { |
392 | - if ($id == null) { |
|
393 | - return null; |
|
392 | + if ($id == NULL) { |
|
393 | + return NULL; |
|
394 | 394 | } |
395 | 395 | $resource = $this->iiif->getContainedResourceById($id); |
396 | 396 | if (isset($resource)) { |
397 | 397 | if ($resource instanceof CanvasInterface) { |
398 | - return (!empty($resource->getImageAnnotations()) && $resource->getImageAnnotations()->getSingleService() != null) ? $resource->getImageAnnotations()[0]->getSingleService()->getId() : $id; |
|
398 | + return (!empty($resource->getImageAnnotations()) && $resource->getImageAnnotations()->getSingleService() != NULL) ? $resource->getImageAnnotations()[0]->getSingleService()->getId() : $id; |
|
399 | 399 | } elseif ($resource instanceof ContentResourceInterface) { |
400 | - return $resource->getSingleService() != null && $resource->getSingleService() instanceof Service ? $resource->getSingleService()->getId() : $id; |
|
400 | + return $resource->getSingleService() != NULL && $resource->getSingleService() instanceof Service ? $resource->getSingleService()->getId() : $id; |
|
401 | 401 | } elseif ($resource instanceof AbstractImageService) { |
402 | 402 | return $resource->getId(); |
403 | 403 | } elseif ($resource instanceof AnnotationContainerInterface) { |
@@ -420,7 +420,7 @@ discard block |
||
420 | 420 | } elseif ($fileResource instanceof AnnotationInterface) { |
421 | 421 | $format = "application/vnd.kitodo.iiif"; |
422 | 422 | } elseif ($fileResource instanceof ContentResourceInterface) { |
423 | - if ($fileResource->isText() || $fileResource->isImage() && ($fileResource->getSingleService() == null || !($fileResource->getSingleService() instanceof AbstractImageService))) { |
|
423 | + if ($fileResource->isText() || $fileResource->isImage() && ($fileResource->getSingleService() == NULL || !($fileResource->getSingleService() instanceof AbstractImageService))) { |
|
424 | 424 | // Support static images without an image service |
425 | 425 | return $fileResource->getFormat(); |
426 | 426 | } |
@@ -438,7 +438,7 @@ discard block |
||
438 | 438 | * {@inheritDoc} |
439 | 439 | * @see Doc::getLogicalStructure() |
440 | 440 | */ |
441 | - public function getLogicalStructure($id, $recursive = false) |
|
441 | + public function getLogicalStructure($id, $recursive = FALSE) |
|
442 | 442 | { |
443 | 443 | $details = []; |
444 | 444 | if (!$recursive && !empty($this->logicalUnits[$id])) { |
@@ -455,8 +455,8 @@ discard block |
||
455 | 455 | // cache the ranges - they might occur multiple times in the structures "tree" - with full data as well as referenced as id |
456 | 456 | $processedStructures = []; |
457 | 457 | foreach ($logUnits as $logUnit) { |
458 | - if (array_search($logUnit->getId(), $processedStructures) == false) { |
|
459 | - $this->tableOfContents[] = $this->getLogicalStructureInfo($logUnit, true, $processedStructures); |
|
458 | + if (array_search($logUnit->getId(), $processedStructures) == FALSE) { |
|
459 | + $this->tableOfContents[] = $this->getLogicalStructureInfo($logUnit, TRUE, $processedStructures); |
|
460 | 460 | } |
461 | 461 | } |
462 | 462 | } |
@@ -474,13 +474,13 @@ discard block |
||
474 | 474 | * @param array $processedStructures: IIIF resources that already have been processed |
475 | 475 | * @return array Logical structure array |
476 | 476 | */ |
477 | - protected function getLogicalStructureInfo(IiifResourceInterface $resource, $recursive = false, &$processedStructures = []) |
|
477 | + protected function getLogicalStructureInfo(IiifResourceInterface $resource, $recursive = FALSE, &$processedStructures = []) |
|
478 | 478 | { |
479 | 479 | $details = []; |
480 | 480 | $details['id'] = $resource->getId(); |
481 | 481 | $details['dmdId'] = ''; |
482 | - $details['label'] = $resource->getLabelForDisplay() !== null ? $resource->getLabelForDisplay() : ''; |
|
483 | - $details['orderlabel'] = $resource->getLabelForDisplay() !== null ? $resource->getLabelForDisplay() : ''; |
|
482 | + $details['label'] = $resource->getLabelForDisplay() !== NULL ? $resource->getLabelForDisplay() : ''; |
|
483 | + $details['orderlabel'] = $resource->getLabelForDisplay() !== NULL ? $resource->getLabelForDisplay() : ''; |
|
484 | 484 | $details['contentIds'] = ''; |
485 | 485 | $details['volume'] = ''; |
486 | 486 | $details['pagination'] = ''; |
@@ -505,10 +505,10 @@ discard block |
||
505 | 505 | $startCanvas = $resource->getStartCanvasOrFirstCanvas(); |
506 | 506 | $canvases = $resource->getAllCanvases(); |
507 | 507 | } |
508 | - if ($startCanvas != null) { |
|
508 | + if ($startCanvas != NULL) { |
|
509 | 509 | $details['pagination'] = $startCanvas->getLabel(); |
510 | 510 | $startCanvasIndex = array_search($startCanvas, $this->iiif->getDefaultCanvases()); |
511 | - if ($startCanvasIndex !== false) { |
|
511 | + if ($startCanvasIndex !== FALSE) { |
|
512 | 512 | $details['points'] = $startCanvasIndex + 1; |
513 | 513 | } |
514 | 514 | } |
@@ -522,7 +522,7 @@ discard block |
||
522 | 522 | if ($recursive) { |
523 | 523 | $processedStructures[] = $resource->getId(); |
524 | 524 | $details['children'] = []; |
525 | - if ($resource instanceof ManifestInterface && $resource->getRootRanges() != null) { |
|
525 | + if ($resource instanceof ManifestInterface && $resource->getRootRanges() != NULL) { |
|
526 | 526 | $rangesToAdd = []; |
527 | 527 | $rootRanges = []; |
528 | 528 | if (sizeof($this->iiif->getRootRanges()) == 1 && $this->iiif->getRootRanges()[0]->isTopRange()) { |
@@ -534,15 +534,15 @@ discard block |
||
534 | 534 | $rootRanges[] = $range; |
535 | 535 | } |
536 | 536 | foreach ($rootRanges as $range) { |
537 | - if ((array_search($range->getId(), $processedStructures) == false)) { |
|
538 | - $details['children'][] = $this->getLogicalStructureInfo($range, true, $processedStructures); |
|
537 | + if ((array_search($range->getId(), $processedStructures) == FALSE)) { |
|
538 | + $details['children'][] = $this->getLogicalStructureInfo($range, TRUE, $processedStructures); |
|
539 | 539 | } |
540 | 540 | } |
541 | 541 | } elseif ($resource instanceof RangeInterface) { |
542 | 542 | if (!empty($resource->getAllRanges())) { |
543 | 543 | foreach ($resource->getAllRanges() as $range) { |
544 | - if ((array_search($range->getId(), $processedStructures) == false)) { |
|
545 | - $details['children'][] = $this->getLogicalStructureInfo($range, true, $processedStructures); |
|
544 | + if ((array_search($range->getId(), $processedStructures) == FALSE)) { |
|
545 | + $details['children'][] = $this->getLogicalStructureInfo($range, TRUE, $processedStructures); |
|
546 | 546 | } |
547 | 547 | } |
548 | 548 | } |
@@ -567,15 +567,15 @@ discard block |
||
567 | 567 | * |
568 | 568 | * @todo This method is still in experimental; the method signature may change. |
569 | 569 | */ |
570 | - public function getManifestMetadata($id, $cPid = 0, $withDescription = true, $withRights = true, $withRelated = true) |
|
570 | + public function getManifestMetadata($id, $cPid = 0, $withDescription = TRUE, $withRights = TRUE, $withRelated = TRUE) |
|
571 | 571 | { |
572 | 572 | if (!empty($this->originalMetadataArray[$id])) { |
573 | 573 | return $this->originalMetadataArray[$id]; |
574 | 574 | } |
575 | 575 | $iiifResource = $this->iiif->getContainedResourceById($id); |
576 | 576 | $result = []; |
577 | - if ($iiifResource != null) { |
|
578 | - if ($iiifResource->getLabel() != null && $iiifResource->getLabel() != "") { |
|
577 | + if ($iiifResource != NULL) { |
|
578 | + if ($iiifResource->getLabel() != NULL && $iiifResource->getLabel() != "") { |
|
579 | 579 | $result['label'] = $iiifResource->getLabel(); |
580 | 580 | } |
581 | 581 | if (!empty($iiifResource->getMetadata())) { |
@@ -677,7 +677,7 @@ discard block |
||
677 | 677 | $iiifResource = $this->iiif->getContainedResourceById($id); |
678 | 678 | while ($resArray = $result->fetch()) { |
679 | 679 | // Set metadata field's value(s). |
680 | - if ($resArray['format'] > 0 && !empty($resArray['xpath']) && ($values = $iiifResource->jsonPath($resArray['xpath'])) != null) { |
|
680 | + if ($resArray['format'] > 0 && !empty($resArray['xpath']) && ($values = $iiifResource->jsonPath($resArray['xpath'])) != NULL) { |
|
681 | 681 | if (is_string($values)) { |
682 | 682 | $metadata[$resArray['index_name']] = [trim((string) $values)]; |
683 | 683 | } elseif ($values instanceof JSONPath && is_array($values->data()) && count($values->data()) > 1) { |
@@ -695,7 +695,7 @@ discard block |
||
695 | 695 | if (!empty($metadata[$resArray['index_name']]) && $resArray['is_sortable']) { |
696 | 696 | if ( |
697 | 697 | $resArray['format'] > 0 && !empty($resArray['xpath_sorting']) |
698 | - && ($values = $iiifResource->jsonPath($resArray['xpath_sorting']) != null) |
|
698 | + && ($values = $iiifResource->jsonPath($resArray['xpath_sorting']) != NULL) |
|
699 | 699 | ) { |
700 | 700 | if (is_string($values)) { |
701 | 701 | $metadata[$resArray['index_name'] . '_sorting'][0] = [trim((string) $values)]; |
@@ -731,7 +731,7 @@ discard block |
||
731 | 731 | $this->smLinkRangeCanvasesRecursively($range); |
732 | 732 | } |
733 | 733 | } |
734 | - $this->smLinksLoaded = true; |
|
734 | + $this->smLinksLoaded = TRUE; |
|
735 | 735 | } |
736 | 736 | return $this->smLinks; |
737 | 737 | } |
@@ -813,7 +813,7 @@ discard block |
||
813 | 813 | foreach ($annotationContainer->getTextAnnotations(Motivation::PAINTING) as $annotation) { |
814 | 814 | if ( |
815 | 815 | $annotation->getTargetResourceId() == $iiifResource->getId() && |
816 | - $annotation->getBody() != null && $annotation->getBody()->getChars() != null |
|
816 | + $annotation->getBody() != NULL && $annotation->getBody()->getChars() != NULL |
|
817 | 817 | ) { |
818 | 818 | $annotationTexts[] = $annotation->getBody()->getChars(); |
819 | 819 | } |
@@ -859,21 +859,21 @@ discard block |
||
859 | 859 | protected function loadLocation($location) |
860 | 860 | { |
861 | 861 | $fileResource = GeneralUtility::getUrl($location); |
862 | - if ($fileResource !== false) { |
|
862 | + if ($fileResource !== FALSE) { |
|
863 | 863 | $conf = GeneralUtility::makeInstance(ExtensionConfiguration::class)->get(self::$extKey); |
864 | 864 | IiifHelper::setUrlReader(IiifUrlReader::getInstance()); |
865 | 865 | IiifHelper::setMaxThumbnailHeight($conf['iiifThumbnailHeight']); |
866 | 866 | IiifHelper::setMaxThumbnailWidth($conf['iiifThumbnailWidth']); |
867 | 867 | $resource = IiifHelper::loadIiifResource($fileResource); |
868 | - if ($resource != null) { |
|
868 | + if ($resource != NULL) { |
|
869 | 869 | if ($resource instanceof ManifestInterface) { |
870 | 870 | $this->iiif = $resource; |
871 | - return true; |
|
871 | + return TRUE; |
|
872 | 872 | } |
873 | 873 | } |
874 | 874 | } |
875 | 875 | $this->logger->error('Could not load IIIF manifest from "' . $location . '"'); |
876 | - return false; |
|
876 | + return FALSE; |
|
877 | 877 | } |
878 | 878 | |
879 | 879 | /** |
@@ -894,9 +894,9 @@ discard block |
||
894 | 894 | { |
895 | 895 | if ($preloadedDocument instanceof ManifestInterface) { |
896 | 896 | $this->iiif = $preloadedDocument; |
897 | - return true; |
|
897 | + return TRUE; |
|
898 | 898 | } |
899 | - return false; |
|
899 | + return FALSE; |
|
900 | 900 | } |
901 | 901 | |
902 | 902 | /** |
@@ -919,22 +919,22 @@ discard block |
||
919 | 919 | !empty($canvas->getSeeAlsoUrlsForFormat("application/alto+xml")) || |
920 | 920 | !empty($canvas->getSeeAlsoUrlsForProfile("http://www.loc.gov/standards/alto/")) |
921 | 921 | ) { |
922 | - $this->hasFulltextSet = true; |
|
923 | - $this->hasFulltext = true; |
|
922 | + $this->hasFulltextSet = TRUE; |
|
923 | + $this->hasFulltext = TRUE; |
|
924 | 924 | return; |
925 | 925 | } |
926 | 926 | $extConf = GeneralUtility::makeInstance(ExtensionConfiguration::class)->get(self::$extKey); |
927 | 927 | if ($extConf['indexAnnotations'] == 1 && !empty($canvas->getPossibleTextAnnotationContainers(Motivation::PAINTING))) { |
928 | 928 | foreach ($canvas->getPossibleTextAnnotationContainers(Motivation::PAINTING) as $annotationContainer) { |
929 | - if (($textAnnotations = $annotationContainer->getTextAnnotations(Motivation::PAINTING)) != null) { |
|
929 | + if (($textAnnotations = $annotationContainer->getTextAnnotations(Motivation::PAINTING)) != NULL) { |
|
930 | 930 | foreach ($textAnnotations as $annotation) { |
931 | 931 | if ( |
932 | - $annotation->getBody() != null && |
|
932 | + $annotation->getBody() != NULL && |
|
933 | 933 | $annotation->getBody()->getFormat() == "text/plain" && |
934 | - $annotation->getBody()->getChars() != null |
|
934 | + $annotation->getBody()->getChars() != NULL |
|
935 | 935 | ) { |
936 | - $this->hasFulltextSet = true; |
|
937 | - $this->hasFulltext = true; |
|
936 | + $this->hasFulltextSet = TRUE; |
|
937 | + $this->hasFulltext = TRUE; |
|
938 | 938 | return; |
939 | 939 | } |
940 | 940 | } |
@@ -942,7 +942,7 @@ discard block |
||
942 | 942 | } |
943 | 943 | } |
944 | 944 | } |
945 | - $this->hasFulltextSet = true; |
|
945 | + $this->hasFulltextSet = TRUE; |
|
946 | 946 | } |
947 | 947 | } |
948 | 948 | |
@@ -950,7 +950,7 @@ discard block |
||
950 | 950 | * {@inheritDoc} |
951 | 951 | * @see \Kitodo\Dlf\Common\Doc::_getThumbnail() |
952 | 952 | */ |
953 | - protected function _getThumbnail($forceReload = false) |
|
953 | + protected function _getThumbnail($forceReload = FALSE) |
|
954 | 954 | { |
955 | 955 | return $this->iiif->getThumbnailUrl(); |
956 | 956 | } |
@@ -984,7 +984,7 @@ discard block |
||
984 | 984 | IiifHelper::setMaxThumbnailHeight($conf['iiifThumbnailHeight']); |
985 | 985 | IiifHelper::setMaxThumbnailWidth($conf['iiifThumbnailWidth']); |
986 | 986 | $resource = IiifHelper::loadIiifResource($this->asJson); |
987 | - if ($resource != null && $resource instanceof ManifestInterface) { |
|
987 | + if ($resource != NULL && $resource instanceof ManifestInterface) { |
|
988 | 988 | $this->asJson = ''; |
989 | 989 | $this->iiif = $resource; |
990 | 990 | $this->init(''); |