We could not synchronize checks via GitHub's checks API since Scrutinizer's GitHub App is not installed for this repository.
@@ -18,7 +18,8 @@ discard block |
||
| 18 | 18 | * @access public |
| 19 | 19 | * @abstract |
| 20 | 20 | */ |
| 21 | -abstract class tx_dlf_module extends \TYPO3\CMS\Backend\Module\BaseScriptClass { |
|
| 21 | +abstract class tx_dlf_module extends \TYPO3\CMS\Backend\Module\BaseScriptClass |
|
| 22 | +{ |
|
| 22 | 23 | |
| 23 | 24 | public $extKey = 'dlf'; |
| 24 | 25 | |
@@ -87,7 +88,8 @@ discard block |
||
| 87 | 88 | * |
| 88 | 89 | * @return void |
| 89 | 90 | */ |
| 90 | - public function __construct() { |
|
| 91 | + public function __construct() |
|
| 92 | + { |
|
| 91 | 93 | |
| 92 | 94 | $GLOBALS['BE_USER']->modAccess($GLOBALS['MCONF'], 1); |
| 93 | 95 | |
@@ -124,7 +126,8 @@ discard block |
||
| 124 | 126 | * |
| 125 | 127 | * @return void |
| 126 | 128 | */ |
| 127 | - protected function setMOD_MENU() { |
|
| 129 | + protected function setMOD_MENU() |
|
| 130 | + { |
|
| 128 | 131 | |
| 129 | 132 | // Set $this->MOD_MENU array here or leave empty. |
| 130 | 133 | |
@@ -157,7 +160,8 @@ discard block |
||
| 157 | 160 | * |
| 158 | 161 | * @return void |
| 159 | 162 | */ |
| 160 | - protected function printContent() { |
|
| 163 | + protected function printContent() |
|
| 164 | + { |
|
| 161 | 165 | |
| 162 | 166 | // Add Javascript for function menu. |
| 163 | 167 | $this->doc->JScode .= ' |
@@ -18,7 +18,8 @@ discard block |
||
| 18 | 18 | * @access public |
| 19 | 19 | * @abstract |
| 20 | 20 | */ |
| 21 | -abstract class tx_dlf_plugin extends \TYPO3\CMS\Frontend\Plugin\AbstractPlugin { |
|
| 21 | +abstract class tx_dlf_plugin extends \TYPO3\CMS\Frontend\Plugin\AbstractPlugin |
|
| 22 | +{ |
|
| 22 | 23 | |
| 23 | 24 | public $extKey = 'dlf'; |
| 24 | 25 | |
@@ -57,7 +58,8 @@ discard block |
||
| 57 | 58 | * |
| 58 | 59 | * @return void |
| 59 | 60 | */ |
| 60 | - protected function init(array $conf) { |
|
| 61 | + protected function init(array $conf) |
|
| 62 | + { |
|
| 61 | 63 | |
| 62 | 64 | // Read FlexForm configuration. |
| 63 | 65 | $flexFormConf = array (); |
@@ -123,7 +125,8 @@ discard block |
||
| 123 | 125 | * |
| 124 | 126 | * @return void |
| 125 | 127 | */ |
| 126 | - protected function loadDocument() { |
|
| 128 | + protected function loadDocument() |
|
| 129 | + { |
|
| 127 | 130 | |
| 128 | 131 | // Check for required variable. |
| 129 | 132 | if (!empty($this->piVars['id']) && !empty($this->conf['pages'])) { |
@@ -222,7 +225,8 @@ discard block |
||
| 222 | 225 | * |
| 223 | 226 | * @return void |
| 224 | 227 | */ |
| 225 | - public function pi_setPiVarDefaults() { |
|
| 228 | + public function pi_setPiVarDefaults() |
|
| 229 | + { |
|
| 226 | 230 | |
| 227 | 231 | if (is_array($this->conf['_DEFAULT_PI_VARS.'])) { |
| 228 | 232 | |
@@ -261,7 +265,8 @@ discard block |
||
| 261 | 265 | * |
| 262 | 266 | * @return string HTML content wrapped, ready to return to the parent object. |
| 263 | 267 | */ |
| 264 | - public function pi_wrapInBaseClass($content) { |
|
| 268 | + public function pi_wrapInBaseClass($content) |
|
| 269 | + { |
|
| 265 | 270 | |
| 266 | 271 | if (!$GLOBALS['TSFE']->config['config']['disableWrapInBaseClass']) { |
| 267 | 272 | // Use get_class($this) instead of $this->prefixId for content wrapping because $this->prefixId is the same for all plugins. |
@@ -287,7 +292,8 @@ discard block |
||
| 287 | 292 | * |
| 288 | 293 | * @return array The resulting typoscript array |
| 289 | 294 | */ |
| 290 | - protected function parseTS($string = '') { |
|
| 295 | + protected function parseTS($string = '') |
|
| 296 | + { |
|
| 291 | 297 | |
| 292 | 298 | $parser = \TYPO3\CMS\Core\Utility\GeneralUtility::makeInstance('TYPO3\\CMS\\Core\\TypoScript\\Parser\\TypoScriptParser'); |
| 293 | 299 | |
@@ -306,7 +312,8 @@ discard block |
||
| 306 | 312 | * |
| 307 | 313 | * @return void |
| 308 | 314 | */ |
| 309 | - protected function setCache($cache = TRUE) { |
|
| 315 | + protected function setCache($cache = TRUE) |
|
| 316 | + { |
|
| 310 | 317 | |
| 311 | 318 | if ($cache) { |
| 312 | 319 | |
@@ -18,7 +18,8 @@ discard block |
||
| 18 | 18 | * @subpackage tx_dlf |
| 19 | 19 | * @access public |
| 20 | 20 | */ |
| 21 | -class tx_dlf_solr { |
|
| 21 | +class tx_dlf_solr |
|
| 22 | +{ |
|
| 22 | 23 | |
| 23 | 24 | /** |
| 24 | 25 | * This holds the core name |
@@ -101,7 +102,8 @@ discard block |
||
| 101 | 102 | * |
| 102 | 103 | * @return string The escaped query string |
| 103 | 104 | */ |
| 104 | - public static function escapeQuery($query) { |
|
| 105 | + public static function escapeQuery($query) |
|
| 106 | + { |
|
| 105 | 107 | |
| 106 | 108 | $helper = \TYPO3\CMS\Core\Utility\GeneralUtility::makeInstance('Solarium\Core\Query\Helper'); |
| 107 | 109 | |
@@ -128,7 +130,8 @@ discard block |
||
| 128 | 130 | * |
| 129 | 131 | * @return string The escaped query string |
| 130 | 132 | */ |
| 131 | - public static function escapeQueryKeepField($query, $pid) { |
|
| 133 | + public static function escapeQueryKeepField($query, $pid) |
|
| 134 | + { |
|
| 132 | 135 | |
| 133 | 136 | // Is there a field query? |
| 134 | 137 | if (preg_match('/^[[:alnum:]]+_[tu][su]i:\(?.*\)?$/', $query)) { |
@@ -188,7 +191,8 @@ discard block |
||
| 188 | 191 | * |
| 189 | 192 | * @return tx_dlf_solr Instance of this class |
| 190 | 193 | */ |
| 191 | - public static function getInstance($core) { |
|
| 194 | + public static function getInstance($core) |
|
| 195 | + { |
|
| 192 | 196 | |
| 193 | 197 | // Save parameter for logging purposes. |
| 194 | 198 | $_core = $core; |
@@ -253,7 +257,8 @@ discard block |
||
| 253 | 257 | * |
| 254 | 258 | * @return string The connection parameters for a specific Solr core |
| 255 | 259 | */ |
| 256 | - public static function getSolrConnectionInfo() { |
|
| 260 | + public static function getSolrConnectionInfo() |
|
| 261 | + { |
|
| 257 | 262 | |
| 258 | 263 | $solrInfo = array (); |
| 259 | 264 | |
@@ -292,7 +297,8 @@ discard block |
||
| 292 | 297 | * |
| 293 | 298 | * @return string The request URL for a specific Solr core |
| 294 | 299 | */ |
| 295 | - public static function getSolrUrl($core = '') { |
|
| 300 | + public static function getSolrUrl($core = '') |
|
| 301 | + { |
|
| 296 | 302 | |
| 297 | 303 | // Get Solr connection information. |
| 298 | 304 | $solrInfo = self::getSolrConnectionInfo(); |
@@ -321,7 +327,8 @@ discard block |
||
| 321 | 327 | * |
| 322 | 328 | * @return integer First unused core number found |
| 323 | 329 | */ |
| 324 | - public static function solrGetCoreNumber($start = 0) { |
|
| 330 | + public static function solrGetCoreNumber($start = 0) |
|
| 331 | + { |
|
| 325 | 332 | |
| 326 | 333 | $start = max(intval($start), 0); |
| 327 | 334 | |
@@ -345,7 +352,8 @@ discard block |
||
| 345 | 352 | * |
| 346 | 353 | * @return tx_dlf_list The result list |
| 347 | 354 | */ |
| 348 | - public function search() { |
|
| 355 | + public function search() |
|
| 356 | + { |
|
| 349 | 357 | |
| 350 | 358 | $toplevel = array (); |
| 351 | 359 | |
@@ -447,7 +455,8 @@ discard block |
||
| 447 | 455 | * |
| 448 | 456 | * @return array The Apache Solr Documents that were fetched |
| 449 | 457 | */ |
| 450 | - public function search_raw($query = '', $parameters = array ()) { |
|
| 458 | + public function search_raw($query = '', $parameters = array ()) |
|
| 459 | + { |
|
| 451 | 460 | |
| 452 | 461 | // Set additional query parameters. |
| 453 | 462 | $parameters['start'] = 0; |
@@ -494,7 +503,8 @@ discard block |
||
| 494 | 503 | * |
| 495 | 504 | * @return integer The max number of results |
| 496 | 505 | */ |
| 497 | - protected function _getLimit() { |
|
| 506 | + protected function _getLimit() |
|
| 507 | + { |
|
| 498 | 508 | |
| 499 | 509 | return $this->limit; |
| 500 | 510 | |
@@ -507,7 +517,8 @@ discard block |
||
| 507 | 517 | * |
| 508 | 518 | * @return integer Total number of hits for last search |
| 509 | 519 | */ |
| 510 | - protected function _getNumberOfHits() { |
|
| 520 | + protected function _getNumberOfHits() |
|
| 521 | + { |
|
| 511 | 522 | |
| 512 | 523 | return $this->numberOfHits; |
| 513 | 524 | |
@@ -520,7 +531,8 @@ discard block |
||
| 520 | 531 | * |
| 521 | 532 | * @return boolean Is the search instantiated successfully? |
| 522 | 533 | */ |
| 523 | - protected function _getReady() { |
|
| 534 | + protected function _getReady() |
|
| 535 | + { |
|
| 524 | 536 | |
| 525 | 537 | return $this->ready; |
| 526 | 538 | |
@@ -533,7 +545,8 @@ discard block |
||
| 533 | 545 | * |
| 534 | 546 | * @return Solarium\Client Apache Solr service object |
| 535 | 547 | */ |
| 536 | - protected function _getService() { |
|
| 548 | + protected function _getService() |
|
| 549 | + { |
|
| 537 | 550 | |
| 538 | 551 | return $this->service; |
| 539 | 552 | |
@@ -548,7 +561,8 @@ discard block |
||
| 548 | 561 | * |
| 549 | 562 | * @return void |
| 550 | 563 | */ |
| 551 | - protected function _setCPid($value) { |
|
| 564 | + protected function _setCPid($value) |
|
| 565 | + { |
|
| 552 | 566 | |
| 553 | 567 | $this->cPid = max(intval($value), 0); |
| 554 | 568 | |
@@ -563,7 +577,8 @@ discard block |
||
| 563 | 577 | * |
| 564 | 578 | * @return void |
| 565 | 579 | */ |
| 566 | - protected function _setLimit($value) { |
|
| 580 | + protected function _setLimit($value) |
|
| 581 | + { |
|
| 567 | 582 | |
| 568 | 583 | $this->limit = max(intval($value), 0); |
| 569 | 584 | |
@@ -578,7 +593,8 @@ discard block |
||
| 578 | 593 | * |
| 579 | 594 | * @return void |
| 580 | 595 | */ |
| 581 | - protected function _setParams(array $value) { |
|
| 596 | + protected function _setParams(array $value) |
|
| 597 | + { |
|
| 582 | 598 | |
| 583 | 599 | $this->params = $value; |
| 584 | 600 | |
@@ -593,7 +609,8 @@ discard block |
||
| 593 | 609 | * |
| 594 | 610 | * @return mixed Value of $this->$var |
| 595 | 611 | */ |
| 596 | - public function __get($var) { |
|
| 612 | + public function __get($var) |
|
| 613 | + { |
|
| 597 | 614 | |
| 598 | 615 | $method = '_get'.ucfirst($var); |
| 599 | 616 | |
@@ -625,7 +642,8 @@ discard block |
||
| 625 | 642 | * |
| 626 | 643 | * @return void |
| 627 | 644 | */ |
| 628 | - public function __set($var, $value) { |
|
| 645 | + public function __set($var, $value) |
|
| 646 | + { |
|
| 629 | 647 | |
| 630 | 648 | $method = '_set'.ucfirst($var); |
| 631 | 649 | |
@@ -654,7 +672,8 @@ discard block |
||
| 654 | 672 | * |
| 655 | 673 | * @return void |
| 656 | 674 | */ |
| 657 | - protected function __construct($core) { |
|
| 675 | + protected function __construct($core) |
|
| 676 | + { |
|
| 658 | 677 | |
| 659 | 678 | $solrInfo = self::getSolrConnectionInfo(); |
| 660 | 679 | |
@@ -18,7 +18,8 @@ |
||
| 18 | 18 | * @access public |
| 19 | 19 | * @abstract |
| 20 | 20 | */ |
| 21 | -interface tx_dlf_fulltext { |
|
| 21 | +interface tx_dlf_fulltext |
|
| 22 | +{ |
|
| 22 | 23 | |
| 23 | 24 | /** |
| 24 | 25 | * This extracts raw fulltext data from XML |
@@ -89,7 +89,8 @@ discard block |
||
| 89 | 89 | * |
| 90 | 90 | * @return void |
| 91 | 91 | */ |
| 92 | - public function add(array $elements, $position = -1) { |
|
| 92 | + public function add(array $elements, $position = -1) |
|
| 93 | + { |
|
| 93 | 94 | |
| 94 | 95 | $position = \TYPO3\CMS\Core\Utility\MathUtility::forceIntegerInRange($position, 0, $this->count, $this->count); |
| 95 | 96 | |
@@ -111,7 +112,8 @@ discard block |
||
| 111 | 112 | * |
| 112 | 113 | * @return integer The number of elements in the list |
| 113 | 114 | */ |
| 114 | - public function count() { |
|
| 115 | + public function count() |
|
| 116 | + { |
|
| 115 | 117 | |
| 116 | 118 | return $this->count; |
| 117 | 119 | |
@@ -125,7 +127,8 @@ discard block |
||
| 125 | 127 | * |
| 126 | 128 | * @return array The current element |
| 127 | 129 | */ |
| 128 | - public function current() { |
|
| 130 | + public function current() |
|
| 131 | + { |
|
| 129 | 132 | |
| 130 | 133 | if ($this->valid()) { |
| 131 | 134 | |
@@ -154,7 +157,8 @@ discard block |
||
| 154 | 157 | * |
| 155 | 158 | * @return mixed The element's full record |
| 156 | 159 | */ |
| 157 | - protected function getRecord($element) { |
|
| 160 | + protected function getRecord($element) |
|
| 161 | + { |
|
| 158 | 162 | |
| 159 | 163 | if (is_array($element) && array_keys($element) == array ('u', 'h', 's', 'p')) { |
| 160 | 164 | |
@@ -378,7 +382,8 @@ discard block |
||
| 378 | 382 | * |
| 379 | 383 | * @return integer The current position |
| 380 | 384 | */ |
| 381 | - public function key() { |
|
| 385 | + public function key() |
|
| 386 | + { |
|
| 382 | 387 | |
| 383 | 388 | return $this->position; |
| 384 | 389 | |
@@ -396,7 +401,8 @@ discard block |
||
| 396 | 401 | * |
| 397 | 402 | * @return void |
| 398 | 403 | */ |
| 399 | - public function move($position, $steps) { |
|
| 404 | + public function move($position, $steps) |
|
| 405 | + { |
|
| 400 | 406 | |
| 401 | 407 | // Save parameters for logging purposes. |
| 402 | 408 | $_position = $position; |
@@ -448,7 +454,8 @@ discard block |
||
| 448 | 454 | * |
| 449 | 455 | * @return void |
| 450 | 456 | */ |
| 451 | - public function moveUp($position) { |
|
| 457 | + public function moveUp($position) |
|
| 458 | + { |
|
| 452 | 459 | |
| 453 | 460 | $this->move($position, -1); |
| 454 | 461 | |
@@ -463,7 +470,8 @@ discard block |
||
| 463 | 470 | * |
| 464 | 471 | * @return void |
| 465 | 472 | */ |
| 466 | - public function moveDown($position) { |
|
| 473 | + public function moveDown($position) |
|
| 474 | + { |
|
| 467 | 475 | |
| 468 | 476 | $this->move($position, 1); |
| 469 | 477 | |
@@ -477,7 +485,8 @@ discard block |
||
| 477 | 485 | * |
| 478 | 486 | * @return void |
| 479 | 487 | */ |
| 480 | - public function next() { |
|
| 488 | + public function next() |
|
| 489 | + { |
|
| 481 | 490 | |
| 482 | 491 | $this->position++; |
| 483 | 492 | |
@@ -493,7 +502,8 @@ discard block |
||
| 493 | 502 | * |
| 494 | 503 | * @return boolean Does the given offset exist? |
| 495 | 504 | */ |
| 496 | - public function offsetExists($offset) { |
|
| 505 | + public function offsetExists($offset) |
|
| 506 | + { |
|
| 497 | 507 | |
| 498 | 508 | return isset($this->elements[$offset]); |
| 499 | 509 | |
@@ -509,7 +519,8 @@ discard block |
||
| 509 | 519 | * |
| 510 | 520 | * @return array The element at the given offset |
| 511 | 521 | */ |
| 512 | - public function offsetGet($offset) { |
|
| 522 | + public function offsetGet($offset) |
|
| 523 | + { |
|
| 513 | 524 | |
| 514 | 525 | if ($this->offsetExists($offset)) { |
| 515 | 526 | |
@@ -540,7 +551,8 @@ discard block |
||
| 540 | 551 | * |
| 541 | 552 | * @return void |
| 542 | 553 | */ |
| 543 | - public function offsetSet($offset, $value) { |
|
| 554 | + public function offsetSet($offset, $value) |
|
| 555 | + { |
|
| 544 | 556 | |
| 545 | 557 | if (\TYPO3\CMS\Core\Utility\MathUtility::canBeInterpretedAsInteger($offset)) { |
| 546 | 558 | |
@@ -568,7 +580,8 @@ discard block |
||
| 568 | 580 | * |
| 569 | 581 | * @return array The removed element |
| 570 | 582 | */ |
| 571 | - public function remove($position) { |
|
| 583 | + public function remove($position) |
|
| 584 | + { |
|
| 572 | 585 | |
| 573 | 586 | // Save parameter for logging purposes. |
| 574 | 587 | $_position = $position; |
@@ -606,7 +619,8 @@ discard block |
||
| 606 | 619 | * |
| 607 | 620 | * @return array The indizes of the removed elements |
| 608 | 621 | */ |
| 609 | - public function removeRange($position, $length) { |
|
| 622 | + public function removeRange($position, $length) |
|
| 623 | + { |
|
| 610 | 624 | |
| 611 | 625 | // Save parameter for logging purposes. |
| 612 | 626 | $_position = $position; |
@@ -637,7 +651,8 @@ discard block |
||
| 637 | 651 | * |
| 638 | 652 | * @return void |
| 639 | 653 | */ |
| 640 | - public function reset() { |
|
| 654 | + public function reset() |
|
| 655 | + { |
|
| 641 | 656 | |
| 642 | 657 | $this->elements = array (); |
| 643 | 658 | |
@@ -659,7 +674,8 @@ discard block |
||
| 659 | 674 | * |
| 660 | 675 | * @return void |
| 661 | 676 | */ |
| 662 | - public function rewind() { |
|
| 677 | + public function rewind() |
|
| 678 | + { |
|
| 663 | 679 | |
| 664 | 680 | $this->position = 0; |
| 665 | 681 | |
@@ -674,7 +690,8 @@ discard block |
||
| 674 | 690 | * |
| 675 | 691 | * @return void |
| 676 | 692 | */ |
| 677 | - public function save($pid = 0) { |
|
| 693 | + public function save($pid = 0) |
|
| 694 | + { |
|
| 678 | 695 | |
| 679 | 696 | $pid = max(intval($pid), 0); |
| 680 | 697 | |
@@ -698,7 +715,8 @@ discard block |
||
| 698 | 715 | * |
| 699 | 716 | * @return boolean TRUE on success or FALSE on failure |
| 700 | 717 | */ |
| 701 | - protected function solrConnect() { |
|
| 718 | + protected function solrConnect() |
|
| 719 | + { |
|
| 702 | 720 | |
| 703 | 721 | // Get Solr instance. |
| 704 | 722 | if (!$this->solr) { |
@@ -747,7 +765,8 @@ discard block |
||
| 747 | 765 | * |
| 748 | 766 | * @return void |
| 749 | 767 | */ |
| 750 | - public function sort($by, $asc = TRUE) { |
|
| 768 | + public function sort($by, $asc = TRUE) |
|
| 769 | + { |
|
| 751 | 770 | |
| 752 | 771 | $newOrder = array (); |
| 753 | 772 | |
@@ -809,7 +828,8 @@ discard block |
||
| 809 | 828 | * |
| 810 | 829 | * @return void |
| 811 | 830 | */ |
| 812 | - public function offsetUnset($offset) { |
|
| 831 | + public function offsetUnset($offset) |
|
| 832 | + { |
|
| 813 | 833 | |
| 814 | 834 | unset ($this->elements[$offset]); |
| 815 | 835 | |
@@ -828,7 +848,8 @@ discard block |
||
| 828 | 848 | * |
| 829 | 849 | * @return boolean Is the current list position valid? |
| 830 | 850 | */ |
| 831 | - public function valid() { |
|
| 851 | + public function valid() |
|
| 852 | + { |
|
| 832 | 853 | |
| 833 | 854 | return isset($this->elements[$this->position]); |
| 834 | 855 | |
@@ -841,7 +862,8 @@ discard block |
||
| 841 | 862 | * |
| 842 | 863 | * @return array The list's metadata |
| 843 | 864 | */ |
| 844 | - protected function _getMetadata() { |
|
| 865 | + protected function _getMetadata() |
|
| 866 | + { |
|
| 845 | 867 | |
| 846 | 868 | return $this->metadata; |
| 847 | 869 | |
@@ -856,7 +878,8 @@ discard block |
||
| 856 | 878 | * |
| 857 | 879 | * @return void |
| 858 | 880 | */ |
| 859 | - protected function _setMetadata(array $metadata = array ()) { |
|
| 881 | + protected function _setMetadata(array $metadata = array ()) |
|
| 882 | + { |
|
| 860 | 883 | |
| 861 | 884 | $this->metadata = $metadata; |
| 862 | 885 | |
@@ -872,7 +895,8 @@ discard block |
||
| 872 | 895 | * |
| 873 | 896 | * @return void |
| 874 | 897 | */ |
| 875 | - public function __construct(array $elements = array (), array $metadata = array ()) { |
|
| 898 | + public function __construct(array $elements = array (), array $metadata = array ()) |
|
| 899 | + { |
|
| 876 | 900 | |
| 877 | 901 | if (empty($elements) && empty($metadata)) { |
| 878 | 902 | |
@@ -918,7 +942,9 @@ discard block |
||
| 918 | 942 | * |
| 919 | 943 | * @return void |
| 920 | 944 | */ |
| 921 | - protected function __clone() {} |
|
| 945 | + protected function __clone() |
|
| 946 | + { |
|
| 947 | +} |
|
| 922 | 948 | |
| 923 | 949 | /** |
| 924 | 950 | * This magic method is called each time an invisible property is referenced from the object |
@@ -929,7 +955,8 @@ discard block |
||
| 929 | 955 | * |
| 930 | 956 | * @return mixed Value of $this->$var |
| 931 | 957 | */ |
| 932 | - public function __get($var) { |
|
| 958 | + public function __get($var) |
|
| 959 | + { |
|
| 933 | 960 | |
| 934 | 961 | $method = '_get'.ucfirst($var); |
| 935 | 962 | |
@@ -961,7 +988,8 @@ discard block |
||
| 961 | 988 | * |
| 962 | 989 | * @return void |
| 963 | 990 | */ |
| 964 | - public function __set($var, $value) { |
|
| 991 | + public function __set($var, $value) |
|
| 992 | + { |
|
| 965 | 993 | |
| 966 | 994 | $method = '_set'.ucfirst($var); |
| 967 | 995 | |
@@ -989,7 +1017,8 @@ discard block |
||
| 989 | 1017 | * |
| 990 | 1018 | * @return array Properties to be serialized |
| 991 | 1019 | */ |
| 992 | - public function __sleep() { |
|
| 1020 | + public function __sleep() |
|
| 1021 | + { |
|
| 993 | 1022 | |
| 994 | 1023 | return array ('elements', 'metadata'); |
| 995 | 1024 | |
@@ -1003,7 +1032,8 @@ discard block |
||
| 1003 | 1032 | * |
| 1004 | 1033 | * @return void |
| 1005 | 1034 | */ |
| 1006 | - public function __wakeup() { |
|
| 1035 | + public function __wakeup() |
|
| 1036 | + { |
|
| 1007 | 1037 | |
| 1008 | 1038 | $this->count = count($this->elements); |
| 1009 | 1039 | |
@@ -17,7 +17,8 @@ discard block |
||
| 17 | 17 | * @subpackage tx_dlf |
| 18 | 18 | * @access public |
| 19 | 19 | */ |
| 20 | -class tx_dlf_teihdr implements tx_dlf_format { |
|
| 20 | +class tx_dlf_teihdr implements tx_dlf_format |
|
| 21 | +{ |
|
| 21 | 22 | |
| 22 | 23 | /** |
| 23 | 24 | * This extracts the essential TEIHDR metadata from XML |
@@ -29,7 +30,8 @@ discard block |
||
| 29 | 30 | * |
| 30 | 31 | * @return void |
| 31 | 32 | */ |
| 32 | - public function extractMetadata(SimpleXMLElement $xml, array &$metadata) { |
|
| 33 | + public function extractMetadata(SimpleXMLElement $xml, array &$metadata) |
|
| 34 | + { |
|
| 33 | 35 | |
| 34 | 36 | $xml->registerXPathNamespace('teihdr', 'http://www.tei-c.org/ns/1.0'); |
| 35 | 37 | |
@@ -17,7 +17,8 @@ discard block |
||
| 17 | 17 | * @subpackage tx_dlf |
| 18 | 18 | * @access public |
| 19 | 19 | */ |
| 20 | -class tx_dlf_mods implements tx_dlf_format { |
|
| 20 | +class tx_dlf_mods implements tx_dlf_format |
|
| 21 | +{ |
|
| 21 | 22 | |
| 22 | 23 | /** |
| 23 | 24 | * This extracts the essential MODS metadata from XML |
@@ -29,7 +30,8 @@ discard block |
||
| 29 | 30 | * |
| 30 | 31 | * @return void |
| 31 | 32 | */ |
| 32 | - public function extractMetadata(SimpleXMLElement $xml, array &$metadata) { |
|
| 33 | + public function extractMetadata(SimpleXMLElement $xml, array &$metadata) |
|
| 34 | + { |
|
| 33 | 35 | |
| 34 | 36 | $xml->registerXPathNamespace('mods', 'http://www.loc.gov/mods/v3'); |
| 35 | 37 | |
@@ -18,7 +18,8 @@ discard block |
||
| 18 | 18 | * @subpackage tx_dlf |
| 19 | 19 | * @access public |
| 20 | 20 | */ |
| 21 | -final class tx_dlf_document { |
|
| 21 | +final class tx_dlf_document |
|
| 22 | +{ |
|
| 22 | 23 | |
| 23 | 24 | /** |
| 24 | 25 | * This holds the whole XML file as string for serialization purposes |
@@ -351,7 +352,8 @@ discard block |
||
| 351 | 352 | * |
| 352 | 353 | * @return void |
| 353 | 354 | */ |
| 354 | - public function addMetadataFromMets(&$metadata, $id) { |
|
| 355 | + public function addMetadataFromMets(&$metadata, $id) |
|
| 356 | + { |
|
| 355 | 357 | $details = $this->getLogicalStructure($id); |
| 356 | 358 | if (!empty($details)) { |
| 357 | 359 | $metadata['mets_label'][0] = $details['label']; |
@@ -370,7 +372,8 @@ discard block |
||
| 370 | 372 | * |
| 371 | 373 | * @return void |
| 372 | 374 | */ |
| 373 | - public static function clearRegistry() { |
|
| 375 | + public static function clearRegistry() |
|
| 376 | + { |
|
| 374 | 377 | |
| 375 | 378 | // Reset registry array. |
| 376 | 379 | self::$registry = array (); |
@@ -386,7 +389,8 @@ discard block |
||
| 386 | 389 | * |
| 387 | 390 | * @return string The file's location as URL |
| 388 | 391 | */ |
| 389 | - public function getFileLocation($id) { |
|
| 392 | + public function getFileLocation($id) |
|
| 393 | + { |
|
| 390 | 394 | |
| 391 | 395 | if (!empty($id) && ($location = $this->mets->xpath('./mets:fileSec/mets:fileGrp/mets:file[@ID="'.$id.'"]/mets:FLocat[@LOCTYPE="URL"]'))) { |
| 392 | 396 | |
@@ -415,7 +419,8 @@ discard block |
||
| 415 | 419 | * |
| 416 | 420 | * @return string The file's MIME type |
| 417 | 421 | */ |
| 418 | - public function getFileMimeType($id) { |
|
| 422 | + public function getFileMimeType($id) |
|
| 423 | + { |
|
| 419 | 424 | |
| 420 | 425 | if (!empty($id) && ($mimetype = $this->mets->xpath('./mets:fileSec/mets:fileGrp/mets:file[@ID="'.$id.'"]/@MIMETYPE'))) { |
| 421 | 426 | |
@@ -529,7 +534,8 @@ discard block |
||
| 529 | 534 | * |
| 530 | 535 | * @return array Array of the element's id, label, type and physical page indexes/mptr link |
| 531 | 536 | */ |
| 532 | - public function getLogicalStructure($id, $recursive = FALSE) { |
|
| 537 | + public function getLogicalStructure($id, $recursive = FALSE) |
|
| 538 | + { |
|
| 533 | 539 | |
| 534 | 540 | $details = array (); |
| 535 | 541 | |
@@ -585,7 +591,8 @@ discard block |
||
| 585 | 591 | * |
| 586 | 592 | * @return array Array of the element's id, label, type and physical page indexes/mptr link |
| 587 | 593 | */ |
| 588 | - protected function getLogicalStructureInfo(SimpleXMLElement $structure, $recursive = FALSE) { |
|
| 594 | + protected function getLogicalStructureInfo(SimpleXMLElement $structure, $recursive = FALSE) |
|
| 595 | + { |
|
| 589 | 596 | |
| 590 | 597 | // Get attributes. |
| 591 | 598 | foreach ($structure->attributes() as $attribute => $value) { |
@@ -725,7 +732,8 @@ discard block |
||
| 725 | 732 | * |
| 726 | 733 | * @return array The logical structure node's parsed metadata array |
| 727 | 734 | */ |
| 728 | - public function getMetadata($id, $cPid = 0) { |
|
| 735 | + public function getMetadata($id, $cPid = 0) |
|
| 736 | + { |
|
| 729 | 737 | |
| 730 | 738 | // Save parameter for logging purposes. |
| 731 | 739 | $_cPid = $cPid; |
@@ -982,7 +990,8 @@ discard block |
||
| 982 | 990 | * |
| 983 | 991 | * @return integer The physical page number |
| 984 | 992 | */ |
| 985 | - public function getPhysicalPage($logicalPage) { |
|
| 993 | + public function getPhysicalPage($logicalPage) |
|
| 994 | + { |
|
| 986 | 995 | |
| 987 | 996 | if (!empty($this->lastSearchedPhysicalPage['logicalPage']) && $this->lastSearchedPhysicalPage['logicalPage'] == $logicalPage) { |
| 988 | 997 | |
@@ -1022,7 +1031,8 @@ discard block |
||
| 1022 | 1031 | * |
| 1023 | 1032 | * @return string The physical structure node's raw text |
| 1024 | 1033 | */ |
| 1025 | - public function getRawText($id) { |
|
| 1034 | + public function getRawText($id) |
|
| 1035 | + { |
|
| 1026 | 1036 | |
| 1027 | 1037 | $rawText = ''; |
| 1028 | 1038 | |
@@ -1134,7 +1144,8 @@ discard block |
||
| 1134 | 1144 | * |
| 1135 | 1145 | * @return string The title of the document itself or a parent document |
| 1136 | 1146 | */ |
| 1137 | - public static function getTitle($uid, $recursive = FALSE) { |
|
| 1147 | + public static function getTitle($uid, $recursive = FALSE) |
|
| 1148 | + { |
|
| 1138 | 1149 | |
| 1139 | 1150 | // Save parameter for logging purposes. |
| 1140 | 1151 | $_uid = $uid; |
@@ -1200,7 +1211,8 @@ discard block |
||
| 1200 | 1211 | * |
| 1201 | 1212 | * @return array The logical structure node's parsed metadata array |
| 1202 | 1213 | */ |
| 1203 | - public function getTitledata($cPid = 0) { |
|
| 1214 | + public function getTitledata($cPid = 0) |
|
| 1215 | + { |
|
| 1204 | 1216 | |
| 1205 | 1217 | $titledata = $this->getMetadata($this->_getToplevelId(), $cPid); |
| 1206 | 1218 | |
@@ -1229,7 +1241,8 @@ discard block |
||
| 1229 | 1241 | * |
| 1230 | 1242 | * @return void |
| 1231 | 1243 | */ |
| 1232 | - protected function init() { |
|
| 1244 | + protected function init() |
|
| 1245 | + { |
|
| 1233 | 1246 | |
| 1234 | 1247 | // Get METS node from XML file. |
| 1235 | 1248 | $this->registerNamespaces($this->xml); |
@@ -1264,7 +1277,8 @@ discard block |
||
| 1264 | 1277 | * |
| 1265 | 1278 | * @return boolean TRUE on success or FALSE on failure |
| 1266 | 1279 | */ |
| 1267 | - protected function load($location) { |
|
| 1280 | + protected function load($location) |
|
| 1281 | + { |
|
| 1268 | 1282 | |
| 1269 | 1283 | // Load XML file. |
| 1270 | 1284 | if (\TYPO3\CMS\Core\Utility\GeneralUtility::isValidUrl($location)) { |
@@ -1332,7 +1346,8 @@ discard block |
||
| 1332 | 1346 | * |
| 1333 | 1347 | * @return void |
| 1334 | 1348 | */ |
| 1335 | - protected function loadFormats() { |
|
| 1349 | + protected function loadFormats() |
|
| 1350 | + { |
|
| 1336 | 1351 | |
| 1337 | 1352 | if (!$this->formatsLoaded) { |
| 1338 | 1353 | |
@@ -1372,7 +1387,8 @@ discard block |
||
| 1372 | 1387 | * |
| 1373 | 1388 | * @return void |
| 1374 | 1389 | */ |
| 1375 | - public function registerNamespaces(&$obj) { |
|
| 1390 | + public function registerNamespaces(&$obj) |
|
| 1391 | + { |
|
| 1376 | 1392 | |
| 1377 | 1393 | $this->loadFormats(); |
| 1378 | 1394 | |
@@ -1416,7 +1432,8 @@ discard block |
||
| 1416 | 1432 | * |
| 1417 | 1433 | * @return boolean TRUE on success or FALSE on failure |
| 1418 | 1434 | */ |
| 1419 | - public function save($pid = 0, $core = 0) { |
|
| 1435 | + public function save($pid = 0, $core = 0) |
|
| 1436 | + { |
|
| 1420 | 1437 | |
| 1421 | 1438 | // Save parameters for logging purposes. |
| 1422 | 1439 | $_pid = $pid; |
@@ -1864,7 +1881,8 @@ discard block |
||
| 1864 | 1881 | * |
| 1865 | 1882 | * @return integer The PID of the metadata definitions |
| 1866 | 1883 | */ |
| 1867 | - protected function _getCPid() { |
|
| 1884 | + protected function _getCPid() |
|
| 1885 | + { |
|
| 1868 | 1886 | |
| 1869 | 1887 | return $this->cPid; |
| 1870 | 1888 | |
@@ -1877,7 +1895,8 @@ discard block |
||
| 1877 | 1895 | * |
| 1878 | 1896 | * @return array Array of dmdSecs with their IDs as array key |
| 1879 | 1897 | */ |
| 1880 | - protected function _getDmdSec() { |
|
| 1898 | + protected function _getDmdSec() |
|
| 1899 | + { |
|
| 1881 | 1900 | |
| 1882 | 1901 | if (!$this->dmdSecLoaded) { |
| 1883 | 1902 | |
@@ -1938,7 +1957,8 @@ discard block |
||
| 1938 | 1957 | * |
| 1939 | 1958 | * @return array Array of file use groups with file IDs |
| 1940 | 1959 | */ |
| 1941 | - protected function _getFileGrps() { |
|
| 1960 | + protected function _getFileGrps() |
|
| 1961 | + { |
|
| 1942 | 1962 | |
| 1943 | 1963 | if (!$this->fileGrpsLoaded) { |
| 1944 | 1964 | |
@@ -2011,7 +2031,8 @@ discard block |
||
| 2011 | 2031 | * |
| 2012 | 2032 | * @return boolean Are there any fulltext files available? |
| 2013 | 2033 | */ |
| 2014 | - protected function _getHasFulltext() { |
|
| 2034 | + protected function _getHasFulltext() |
|
| 2035 | + { |
|
| 2015 | 2036 | |
| 2016 | 2037 | // Are the fileGrps already loaded? |
| 2017 | 2038 | if (!$this->fileGrpsLoaded) { |
@@ -2031,7 +2052,8 @@ discard block |
||
| 2031 | 2052 | * |
| 2032 | 2053 | * @return string The location of the document |
| 2033 | 2054 | */ |
| 2034 | - protected function _getLocation() { |
|
| 2055 | + protected function _getLocation() |
|
| 2056 | + { |
|
| 2035 | 2057 | |
| 2036 | 2058 | return $this->location; |
| 2037 | 2059 | |
@@ -2044,7 +2066,8 @@ discard block |
||
| 2044 | 2066 | * |
| 2045 | 2067 | * @return array Array of metadata with their corresponding logical structure node ID as key |
| 2046 | 2068 | */ |
| 2047 | - protected function _getMetadataArray() { |
|
| 2069 | + protected function _getMetadataArray() |
|
| 2070 | + { |
|
| 2048 | 2071 | |
| 2049 | 2072 | // Set metadata definitions' PID. |
| 2050 | 2073 | $cPid = ($this->cPid ? $this->cPid : $this->pid); |
@@ -2092,7 +2115,8 @@ discard block |
||
| 2092 | 2115 | * |
| 2093 | 2116 | * @return SimpleXMLElement The XML's METS part as SimpleXMLElement object |
| 2094 | 2117 | */ |
| 2095 | - protected function _getMets() { |
|
| 2118 | + protected function _getMets() |
|
| 2119 | + { |
|
| 2096 | 2120 | |
| 2097 | 2121 | return $this->mets; |
| 2098 | 2122 | |
@@ -2105,7 +2129,8 @@ discard block |
||
| 2105 | 2129 | * |
| 2106 | 2130 | * @return integer The total number of pages and/or tracks |
| 2107 | 2131 | */ |
| 2108 | - protected function _getNumPages() { |
|
| 2132 | + protected function _getNumPages() |
|
| 2133 | + { |
|
| 2109 | 2134 | |
| 2110 | 2135 | $this->_getPhysicalStructure(); |
| 2111 | 2136 | |
@@ -2120,7 +2145,8 @@ discard block |
||
| 2120 | 2145 | * |
| 2121 | 2146 | * @return integer The UID of the parent document or zero if not applicable |
| 2122 | 2147 | */ |
| 2123 | - protected function _getParentId() { |
|
| 2148 | + protected function _getParentId() |
|
| 2149 | + { |
|
| 2124 | 2150 | |
| 2125 | 2151 | return $this->parentId; |
| 2126 | 2152 | |
@@ -2133,7 +2159,8 @@ discard block |
||
| 2133 | 2159 | * |
| 2134 | 2160 | * @return array Array of physical elements' id, type, label and file representations ordered by @ORDER attribute |
| 2135 | 2161 | */ |
| 2136 | - protected function _getPhysicalStructure() { |
|
| 2162 | + protected function _getPhysicalStructure() |
|
| 2163 | + { |
|
| 2137 | 2164 | |
| 2138 | 2165 | // Is there no physical structure array yet? |
| 2139 | 2166 | if (!$this->physicalStructureLoaded) { |
@@ -2238,7 +2265,8 @@ discard block |
||
| 2238 | 2265 | * |
| 2239 | 2266 | * @return array Array of elements' type, label and file representations ordered by @ID attribute |
| 2240 | 2267 | */ |
| 2241 | - protected function _getPhysicalStructureInfo() { |
|
| 2268 | + protected function _getPhysicalStructureInfo() |
|
| 2269 | + { |
|
| 2242 | 2270 | |
| 2243 | 2271 | // Is there no physical structure array yet? |
| 2244 | 2272 | if (!$this->physicalStructureLoaded) { |
@@ -2259,7 +2287,8 @@ discard block |
||
| 2259 | 2287 | * |
| 2260 | 2288 | * @return integer The PID of the document or zero if not in database |
| 2261 | 2289 | */ |
| 2262 | - protected function _getPid() { |
|
| 2290 | + protected function _getPid() |
|
| 2291 | + { |
|
| 2263 | 2292 | |
| 2264 | 2293 | return $this->pid; |
| 2265 | 2294 | |
@@ -2272,7 +2301,8 @@ discard block |
||
| 2272 | 2301 | * |
| 2273 | 2302 | * @return boolean Is the document instantiated successfully? |
| 2274 | 2303 | */ |
| 2275 | - protected function _getReady() { |
|
| 2304 | + protected function _getReady() |
|
| 2305 | + { |
|
| 2276 | 2306 | |
| 2277 | 2307 | return $this->ready; |
| 2278 | 2308 | |
@@ -2285,7 +2315,8 @@ discard block |
||
| 2285 | 2315 | * |
| 2286 | 2316 | * @return mixed The METS file's record identifier |
| 2287 | 2317 | */ |
| 2288 | - protected function _getRecordId() { |
|
| 2318 | + protected function _getRecordId() |
|
| 2319 | + { |
|
| 2289 | 2320 | |
| 2290 | 2321 | return $this->recordId; |
| 2291 | 2322 | |
@@ -2298,7 +2329,8 @@ discard block |
||
| 2298 | 2329 | * |
| 2299 | 2330 | * @return integer The UID of the root document or zero if not applicable |
| 2300 | 2331 | */ |
| 2301 | - protected function _getRootId() { |
|
| 2332 | + protected function _getRootId() |
|
| 2333 | + { |
|
| 2302 | 2334 | |
| 2303 | 2335 | if (!$this->rootIdLoaded) { |
| 2304 | 2336 | |
@@ -2325,7 +2357,8 @@ discard block |
||
| 2325 | 2357 | * |
| 2326 | 2358 | * @return array The links between logical and physical nodes |
| 2327 | 2359 | */ |
| 2328 | - protected function _getSmLinks() { |
|
| 2360 | + protected function _getSmLinks() |
|
| 2361 | + { |
|
| 2329 | 2362 | |
| 2330 | 2363 | if (!$this->smLinksLoaded) { |
| 2331 | 2364 | |
@@ -2354,7 +2387,8 @@ discard block |
||
| 2354 | 2387 | * |
| 2355 | 2388 | * @return array Array of structure nodes' id, label, type and physical page indexes/mptr link with original hierarchy preserved |
| 2356 | 2389 | */ |
| 2357 | - protected function _getTableOfContents() { |
|
| 2390 | + protected function _getTableOfContents() |
|
| 2391 | + { |
|
| 2358 | 2392 | |
| 2359 | 2393 | // Is there no logical structure array yet? |
| 2360 | 2394 | if (!$this->tableOfContentsLoaded) { |
@@ -2379,7 +2413,8 @@ discard block |
||
| 2379 | 2413 | * |
| 2380 | 2414 | * @return string The document's thumbnail location |
| 2381 | 2415 | */ |
| 2382 | - protected function _getThumbnail($forceReload = FALSE) { |
|
| 2416 | + protected function _getThumbnail($forceReload = FALSE) |
|
| 2417 | + { |
|
| 2383 | 2418 | |
| 2384 | 2419 | if (!$this->thumbnailLoaded || $forceReload) { |
| 2385 | 2420 | |
@@ -2486,7 +2521,8 @@ discard block |
||
| 2486 | 2521 | * |
| 2487 | 2522 | * @return string The logical structure node's ID |
| 2488 | 2523 | */ |
| 2489 | - protected function _getToplevelId() { |
|
| 2524 | + protected function _getToplevelId() |
|
| 2525 | + { |
|
| 2490 | 2526 | |
| 2491 | 2527 | if (empty($this->toplevelId)) { |
| 2492 | 2528 | |
@@ -2532,7 +2568,8 @@ discard block |
||
| 2532 | 2568 | * |
| 2533 | 2569 | * @return mixed The UID or the URL of the document |
| 2534 | 2570 | */ |
| 2535 | - protected function _getUid() { |
|
| 2571 | + protected function _getUid() |
|
| 2572 | + { |
|
| 2536 | 2573 | |
| 2537 | 2574 | return $this->uid; |
| 2538 | 2575 | |
@@ -2547,7 +2584,8 @@ discard block |
||
| 2547 | 2584 | * |
| 2548 | 2585 | * @return void |
| 2549 | 2586 | */ |
| 2550 | - protected function _setCPid($value) { |
|
| 2587 | + protected function _setCPid($value) |
|
| 2588 | + { |
|
| 2551 | 2589 | |
| 2552 | 2590 | $this->cPid = max(intval($value), 0); |
| 2553 | 2591 | |
@@ -2561,7 +2599,9 @@ discard block |
||
| 2561 | 2599 | * |
| 2562 | 2600 | * @return void |
| 2563 | 2601 | */ |
| 2564 | - protected function __clone() {} |
|
| 2602 | + protected function __clone() |
|
| 2603 | + { |
|
| 2604 | +} |
|
| 2565 | 2605 | |
| 2566 | 2606 | /** |
| 2567 | 2607 | * This is a singleton class, thus the constructor should be private/protected |
@@ -2574,7 +2614,8 @@ discard block |
||
| 2574 | 2614 | * |
| 2575 | 2615 | * @return void |
| 2576 | 2616 | */ |
| 2577 | - protected function __construct($uid, $pid) { |
|
| 2617 | + protected function __construct($uid, $pid) |
|
| 2618 | + { |
|
| 2578 | 2619 | |
| 2579 | 2620 | // Prepare to check database for the requested document. |
| 2580 | 2621 | if (\TYPO3\CMS\Core\Utility\MathUtility::canBeInterpretedAsInteger($uid)) { |
@@ -2720,7 +2761,8 @@ discard block |
||
| 2720 | 2761 | * |
| 2721 | 2762 | * @return mixed Value of $this->$var |
| 2722 | 2763 | */ |
| 2723 | - public function __get($var) { |
|
| 2764 | + public function __get($var) |
|
| 2765 | + { |
|
| 2724 | 2766 | |
| 2725 | 2767 | $method = '_get'.ucfirst($var); |
| 2726 | 2768 | |
@@ -2752,7 +2794,8 @@ discard block |
||
| 2752 | 2794 | * |
| 2753 | 2795 | * @return void |
| 2754 | 2796 | */ |
| 2755 | - public function __set($var, $value) { |
|
| 2797 | + public function __set($var, $value) |
|
| 2798 | + { |
|
| 2756 | 2799 | |
| 2757 | 2800 | $method = '_set'.ucfirst($var); |
| 2758 | 2801 | |
@@ -2780,7 +2823,8 @@ discard block |
||
| 2780 | 2823 | * |
| 2781 | 2824 | * @return array Properties to be serialized |
| 2782 | 2825 | */ |
| 2783 | - public function __sleep() { |
|
| 2826 | + public function __sleep() |
|
| 2827 | + { |
|
| 2784 | 2828 | |
| 2785 | 2829 | // SimpleXMLElement objects can't be serialized, thus save the XML as string for serialization |
| 2786 | 2830 | $this->asXML = $this->xml->asXML(); |
@@ -2796,7 +2840,8 @@ discard block |
||
| 2796 | 2840 | * |
| 2797 | 2841 | * @return string String representing the METS object |
| 2798 | 2842 | */ |
| 2799 | - public function __toString() { |
|
| 2843 | + public function __toString() |
|
| 2844 | + { |
|
| 2800 | 2845 | |
| 2801 | 2846 | $xml = new DOMDocument('1.0', 'utf-8'); |
| 2802 | 2847 | |
@@ -2816,7 +2861,8 @@ discard block |
||
| 2816 | 2861 | * |
| 2817 | 2862 | * @return void |
| 2818 | 2863 | */ |
| 2819 | - public function __wakeup() { |
|
| 2864 | + public function __wakeup() |
|
| 2865 | + { |
|
| 2820 | 2866 | |
| 2821 | 2867 | // Turn off libxml's error logging. |
| 2822 | 2868 | $libxmlErrors = libxml_use_internal_errors(TRUE); |
@@ -18,7 +18,8 @@ discard block |
||
| 18 | 18 | * @subpackage tx_dlf |
| 19 | 19 | * @access public |
| 20 | 20 | */ |
| 21 | -class tx_dlf_helper { |
|
| 21 | +class tx_dlf_helper |
|
| 22 | +{ |
|
| 22 | 23 | |
| 23 | 24 | /** |
| 24 | 25 | * The extension key |
@@ -45,7 +46,8 @@ discard block |
||
| 45 | 46 | * |
| 46 | 47 | * @return void |
| 47 | 48 | */ |
| 48 | - public static function addMessage($message) { |
|
| 49 | + public static function addMessage($message) |
|
| 50 | + { |
|
| 49 | 51 | |
| 50 | 52 | $flashMessageService = \TYPO3\CMS\Core\Utility\GeneralUtility::makeInstance('TYPO3\\CMS\\Core\\Messaging\\FlashMessageService'); |
| 51 | 53 | |
@@ -64,7 +66,8 @@ discard block |
||
| 64 | 66 | * |
| 65 | 67 | * @return array Merged array with second array overruling first one |
| 66 | 68 | */ |
| 67 | - static public function array_merge_recursive_overrule($array1, $array2) { |
|
| 69 | + static public function array_merge_recursive_overrule($array1, $array2) |
|
| 70 | + { |
|
| 68 | 71 | |
| 69 | 72 | if (class_exists('\\TYPO3\\CMS\\Core\\Utility\\ArrayUtility')) { |
| 70 | 73 | |
@@ -92,7 +95,8 @@ discard block |
||
| 92 | 95 | * |
| 93 | 96 | * @return boolean Is $id a valid GNL identifier of the given $type? |
| 94 | 97 | */ |
| 95 | - public static function checkIdentifier($id, $type) { |
|
| 98 | + public static function checkIdentifier($id, $type) |
|
| 99 | + { |
|
| 96 | 100 | |
| 97 | 101 | $digits = substr($id, 0, 8); |
| 98 | 102 | |
@@ -209,7 +213,8 @@ discard block |
||
| 209 | 213 | * |
| 210 | 214 | * @return mixed The decrypted value or NULL on error |
| 211 | 215 | */ |
| 212 | - public static function decrypt($encrypted, $hash) { |
|
| 216 | + public static function decrypt($encrypted, $hash) |
|
| 217 | + { |
|
| 213 | 218 | |
| 214 | 219 | $decrypted = NULL; |
| 215 | 220 | |
@@ -284,7 +289,8 @@ discard block |
||
| 284 | 289 | * |
| 285 | 290 | * @return array Array with encrypted string and control hash |
| 286 | 291 | */ |
| 287 | - public static function encrypt($string) { |
|
| 292 | + public static function encrypt($string) |
|
| 293 | + { |
|
| 288 | 294 | |
| 289 | 295 | // Check for PHP extension "mcrypt". |
| 290 | 296 | if (!extension_loaded('mcrypt')) { |
@@ -330,7 +336,8 @@ discard block |
||
| 330 | 336 | * |
| 331 | 337 | * @return \TYPO3\CMS\Core\Authentication\BackendUserAuthentication Instance of \TYPO3\CMS\Core\Authentication\BackendUserAuthentication or NULL on failure |
| 332 | 338 | */ |
| 333 | - public static function getBeUser() { |
|
| 339 | + public static function getBeUser() |
|
| 340 | + { |
|
| 334 | 341 | |
| 335 | 342 | if (TYPO3_MODE === 'FE' || TYPO3_MODE === 'BE') { |
| 336 | 343 | |
@@ -370,7 +377,8 @@ discard block |
||
| 370 | 377 | * |
| 371 | 378 | * @return string The cleaned up string |
| 372 | 379 | */ |
| 373 | - public static function getCleanString($string) { |
|
| 380 | + public static function getCleanString($string) |
|
| 381 | + { |
|
| 374 | 382 | |
| 375 | 383 | // Convert to lowercase. |
| 376 | 384 | $string = strtolower($string); |
@@ -395,7 +403,8 @@ discard block |
||
| 395 | 403 | * |
| 396 | 404 | * @return \TYPO3\CMS\Frontend\Authentication\FrontendUserAuthentication Instance of \TYPO3\CMS\Frontend\Authentication\FrontendUserAuthentication or NULL on failure |
| 397 | 405 | */ |
| 398 | - public static function getFeUser() { |
|
| 406 | + public static function getFeUser() |
|
| 407 | + { |
|
| 399 | 408 | |
| 400 | 409 | if (TYPO3_MODE === 'FE') { |
| 401 | 410 | |
@@ -433,7 +442,8 @@ discard block |
||
| 433 | 442 | * |
| 434 | 443 | * @return array Array of hook objects for the class |
| 435 | 444 | */ |
| 436 | - public static function getHookObjects($scriptRelPath) { |
|
| 445 | + public static function getHookObjects($scriptRelPath) |
|
| 446 | + { |
|
| 437 | 447 | |
| 438 | 448 | $hookObjects = array (); |
| 439 | 449 | |
@@ -462,7 +472,8 @@ discard block |
||
| 462 | 472 | * |
| 463 | 473 | * @return string "index_name" for the given UID |
| 464 | 474 | */ |
| 465 | - public static function getIndexName($uid, $table, $pid = -1) { |
|
| 475 | + public static function getIndexName($uid, $table, $pid = -1) |
|
| 476 | + { |
|
| 466 | 477 | |
| 467 | 478 | // Save parameters for logging purposes. |
| 468 | 479 | $_uid = $uid; |
@@ -536,7 +547,8 @@ discard block |
||
| 536 | 547 | * |
| 537 | 548 | * @return string "uid" for the given index_name |
| 538 | 549 | */ |
| 539 | - public static function getIdFromIndexName($index_name, $table, $pid = -1) { |
|
| 550 | + public static function getIdFromIndexName($index_name, $table, $pid = -1) |
|
| 551 | + { |
|
| 540 | 552 | |
| 541 | 553 | // Save parameters for logging purposes. |
| 542 | 554 | $_index_name = $index_name; |
@@ -605,7 +617,8 @@ discard block |
||
| 605 | 617 | * |
| 606 | 618 | * @return string Localized full name of language or unchanged input |
| 607 | 619 | */ |
| 608 | - public static function getLanguageName($code) { |
|
| 620 | + public static function getLanguageName($code) |
|
| 621 | + { |
|
| 609 | 622 | |
| 610 | 623 | // Analyze code and set appropriate ISO table. |
| 611 | 624 | $isoCode = strtolower(trim($code)); |
@@ -685,7 +698,8 @@ discard block |
||
| 685 | 698 | * |
| 686 | 699 | * @return string The translated string or the given key on failure |
| 687 | 700 | */ |
| 688 | - public static function getLL($key, $hsc = FALSE, $default = '') { |
|
| 701 | + public static function getLL($key, $hsc = FALSE, $default = '') |
|
| 702 | + { |
|
| 689 | 703 | |
| 690 | 704 | // Set initial output to default value. |
| 691 | 705 | $translated = (string) $default; |
@@ -752,7 +766,8 @@ discard block |
||
| 752 | 766 | * |
| 753 | 767 | * @return string Uniform Resource Name as string |
| 754 | 768 | */ |
| 755 | - public static function getURN($base, $id) { |
|
| 769 | + public static function getURN($base, $id) |
|
| 770 | + { |
|
| 756 | 771 | |
| 757 | 772 | $concordance = array ( |
| 758 | 773 | '0' => 1, |
@@ -840,7 +855,8 @@ discard block |
||
| 840 | 855 | * |
| 841 | 856 | * @return boolean Is $id a valid PPN? |
| 842 | 857 | */ |
| 843 | - public static function isPPN($id) { |
|
| 858 | + public static function isPPN($id) |
|
| 859 | + { |
|
| 844 | 860 | |
| 845 | 861 | return self::checkIdentifier($id, 'PPN'); |
| 846 | 862 | |
@@ -855,7 +871,8 @@ discard block |
||
| 855 | 871 | * |
| 856 | 872 | * @return mixed Session value for given key or NULL on failure |
| 857 | 873 | */ |
| 858 | - public static function loadFromSession($key) { |
|
| 874 | + public static function loadFromSession($key) |
|
| 875 | + { |
|
| 859 | 876 | |
| 860 | 877 | // Save parameter for logging purposes. |
| 861 | 878 | $_key = $key; |
@@ -910,7 +927,8 @@ discard block |
||
| 910 | 927 | * |
| 911 | 928 | * @return array Array of substituted "NEW..." identifiers and their actual UIDs. |
| 912 | 929 | */ |
| 913 | - public static function processDB(array $data = array (), array $cmd = array (), $reverseOrder = FALSE, $be_user = FALSE) { |
|
| 930 | + public static function processDB(array $data = array (), array $cmd = array (), $reverseOrder = FALSE, $be_user = FALSE) |
|
| 931 | + { |
|
| 914 | 932 | |
| 915 | 933 | // Instantiate TYPO3 core engine. |
| 916 | 934 | $tce = \TYPO3\CMS\Core\Utility\GeneralUtility::makeInstance('TYPO3\\CMS\\Core\\DataHandling\\DataHandler'); |
@@ -968,7 +986,8 @@ discard block |
||
| 968 | 986 | * |
| 969 | 987 | * @return array Array of substituted "NEW..." identifiers and their actual UIDs. |
| 970 | 988 | */ |
| 971 | - public static function processDBasAdmin(array $data = array (), array $cmd = array (), $reverseOrder = FALSE) { |
|
| 989 | + public static function processDBasAdmin(array $data = array (), array $cmd = array (), $reverseOrder = FALSE) |
|
| 990 | + { |
|
| 972 | 991 | |
| 973 | 992 | if (TYPO3_MODE === 'BE' && $GLOBALS['BE_USER']->isAdmin()) { |
| 974 | 993 | |
@@ -993,7 +1012,8 @@ discard block |
||
| 993 | 1012 | * |
| 994 | 1013 | * @return string All flash messages in the queue rendered as HTML. |
| 995 | 1014 | */ |
| 996 | - public static function renderFlashMessages() { |
|
| 1015 | + public static function renderFlashMessages() |
|
| 1016 | + { |
|
| 997 | 1017 | |
| 998 | 1018 | $flashMessageService = \TYPO3\CMS\Core\Utility\GeneralUtility::makeInstance('TYPO3\\CMS\\Core\\Messaging\\FlashMessageService'); |
| 999 | 1019 | |
@@ -1053,7 +1073,8 @@ discard block |
||
| 1053 | 1073 | * |
| 1054 | 1074 | * @return boolean TRUE on success, FALSE on failure |
| 1055 | 1075 | */ |
| 1056 | - public static function saveToSession($value, $key) { |
|
| 1076 | + public static function saveToSession($value, $key) |
|
| 1077 | + { |
|
| 1057 | 1078 | |
| 1058 | 1079 | // Save parameter for logging purposes. |
| 1059 | 1080 | $_key = $key; |
@@ -1113,7 +1134,8 @@ discard block |
||
| 1113 | 1134 | * |
| 1114 | 1135 | * @return string Localized label for $index_name |
| 1115 | 1136 | */ |
| 1116 | - public static function translate($index_name, $table, $pid) { |
|
| 1137 | + public static function translate($index_name, $table, $pid) |
|
| 1138 | + { |
|
| 1117 | 1139 | |
| 1118 | 1140 | // Save parameters for logging purposes. |
| 1119 | 1141 | $_index_name = $index_name; |
@@ -1271,7 +1293,8 @@ discard block |
||
| 1271 | 1293 | * |
| 1272 | 1294 | * @return string Additional WHERE clause |
| 1273 | 1295 | */ |
| 1274 | - public static function whereClause($table, $showHidden = FALSE) { |
|
| 1296 | + public static function whereClause($table, $showHidden = FALSE) |
|
| 1297 | + { |
|
| 1275 | 1298 | |
| 1276 | 1299 | if (TYPO3_MODE === 'FE') { |
| 1277 | 1300 | |
@@ -1329,6 +1352,8 @@ discard block |
||
| 1329 | 1352 | * |
| 1330 | 1353 | * @access private |
| 1331 | 1354 | */ |
| 1332 | - private function __construct() {} |
|
| 1355 | + private function __construct() |
|
| 1356 | + { |
|
| 1357 | +} |
|
| 1333 | 1358 | |
| 1334 | 1359 | } |