@@ -17,39 +17,39 @@ |
||
17 | 17 | */ |
18 | 18 | class TableViewHelper extends AbstractViewHelper |
19 | 19 | { |
20 | - /** |
|
21 | - * @return void |
|
22 | - */ |
|
23 | - public function initializeArguments() |
|
24 | - { |
|
25 | - $this->registerArgument('key', 'string', '', true); |
|
26 | - $this->registerArgument('dataType', 'string', '', false, ''); |
|
27 | - } |
|
28 | - |
|
29 | - /** |
|
30 | - * Returns a value from the TCA Table service according to a key. |
|
31 | - * |
|
32 | - * @return string |
|
33 | - */ |
|
34 | - public function render() |
|
35 | - { |
|
36 | - $key = $this->arguments['key']; |
|
37 | - $dataType = $this->arguments['dataType']; |
|
38 | - |
|
39 | - $result = Tca::table($dataType)->getTca(); |
|
40 | - |
|
41 | - // Explode segment and loop around. |
|
42 | - $keys = explode('|', $key); |
|
43 | - foreach ($keys as $key) { |
|
44 | - if (!empty($result[$key])) { |
|
45 | - $result = $result[$key]; |
|
46 | - } else { |
|
47 | - // not found value |
|
48 | - $result = false; |
|
49 | - break; |
|
50 | - } |
|
51 | - } |
|
52 | - |
|
53 | - return $result; |
|
54 | - } |
|
20 | + /** |
|
21 | + * @return void |
|
22 | + */ |
|
23 | + public function initializeArguments() |
|
24 | + { |
|
25 | + $this->registerArgument('key', 'string', '', true); |
|
26 | + $this->registerArgument('dataType', 'string', '', false, ''); |
|
27 | + } |
|
28 | + |
|
29 | + /** |
|
30 | + * Returns a value from the TCA Table service according to a key. |
|
31 | + * |
|
32 | + * @return string |
|
33 | + */ |
|
34 | + public function render() |
|
35 | + { |
|
36 | + $key = $this->arguments['key']; |
|
37 | + $dataType = $this->arguments['dataType']; |
|
38 | + |
|
39 | + $result = Tca::table($dataType)->getTca(); |
|
40 | + |
|
41 | + // Explode segment and loop around. |
|
42 | + $keys = explode('|', $key); |
|
43 | + foreach ($keys as $key) { |
|
44 | + if (!empty($result[$key])) { |
|
45 | + $result = $result[$key]; |
|
46 | + } else { |
|
47 | + // not found value |
|
48 | + $result = false; |
|
49 | + break; |
|
50 | + } |
|
51 | + } |
|
52 | + |
|
53 | + return $result; |
|
54 | + } |
|
55 | 55 | } |
@@ -17,17 +17,17 @@ |
||
17 | 17 | */ |
18 | 18 | class IsLanguageApplicableViewHelper extends AbstractViewHelper |
19 | 19 | { |
20 | - /** |
|
21 | - * Returns whether the field in the context is localizable or not. |
|
22 | - * |
|
23 | - * @return string |
|
24 | - */ |
|
25 | - public function render() |
|
26 | - { |
|
27 | - $dataType = $this->templateVariableContainer->get('dataType'); |
|
28 | - $fieldName = $this->templateVariableContainer->get('fieldName'); |
|
20 | + /** |
|
21 | + * Returns whether the field in the context is localizable or not. |
|
22 | + * |
|
23 | + * @return string |
|
24 | + */ |
|
25 | + public function render() |
|
26 | + { |
|
27 | + $dataType = $this->templateVariableContainer->get('dataType'); |
|
28 | + $fieldName = $this->templateVariableContainer->get('fieldName'); |
|
29 | 29 | |
30 | - $isLanguageApplicable = Tca::table($dataType)->hasLanguageSupport() && Tca::table($dataType)->field($fieldName)->isLocalized(); |
|
31 | - return $isLanguageApplicable; |
|
32 | - } |
|
30 | + $isLanguageApplicable = Tca::table($dataType)->hasLanguageSupport() && Tca::table($dataType)->field($fieldName)->isLocalized(); |
|
31 | + return $isLanguageApplicable; |
|
32 | + } |
|
33 | 33 | } |
@@ -18,24 +18,24 @@ |
||
18 | 18 | */ |
19 | 19 | class TitleViewHelper extends AbstractViewHelper |
20 | 20 | { |
21 | - /** |
|
22 | - * @return void |
|
23 | - */ |
|
24 | - public function initializeArguments() |
|
25 | - { |
|
26 | - $this->registerArgument('content', Content::class, '', true); |
|
27 | - } |
|
21 | + /** |
|
22 | + * @return void |
|
23 | + */ |
|
24 | + public function initializeArguments() |
|
25 | + { |
|
26 | + $this->registerArgument('content', Content::class, '', true); |
|
27 | + } |
|
28 | 28 | |
29 | - /** |
|
30 | - * Returns the title of a content object. |
|
31 | - * |
|
32 | - * @return string |
|
33 | - */ |
|
34 | - public function render() |
|
35 | - { |
|
36 | - /** @var Content $content */ |
|
37 | - $content = $this->arguments['content']; |
|
38 | - $table = Tca::table($content->getDataType()); |
|
39 | - return $content[$table->getLabelField()]; |
|
40 | - } |
|
29 | + /** |
|
30 | + * Returns the title of a content object. |
|
31 | + * |
|
32 | + * @return string |
|
33 | + */ |
|
34 | + public function render() |
|
35 | + { |
|
36 | + /** @var Content $content */ |
|
37 | + $content = $this->arguments['content']; |
|
38 | + $table = Tca::table($content->getDataType()); |
|
39 | + return $content[$table->getLabelField()]; |
|
40 | + } |
|
41 | 41 | } |
@@ -19,7 +19,7 @@ discard block |
||
19 | 19 | */ |
20 | 20 | class LanguageFileGenerator implements SingletonInterface |
21 | 21 | { |
22 | - protected $template = '<?xml version="1.0" encoding="UTF-8"?> |
|
22 | + protected $template = '<?xml version="1.0" encoding="UTF-8"?> |
|
23 | 23 | <xliff version="1.0"> |
24 | 24 | <file source-language="en" datatype="plaintext" original="messages" date="" product-name="local lang module"> |
25 | 25 | <header/> |
@@ -37,57 +37,57 @@ discard block |
||
37 | 37 | </file> |
38 | 38 | </xliff>'; |
39 | 39 | |
40 | - /** |
|
41 | - * @param string $dataType |
|
42 | - * @return string |
|
43 | - */ |
|
44 | - public function generate($dataType) |
|
45 | - { |
|
46 | - $label = $dataType; |
|
47 | - if (!empty($GLOBALS['TCA'][$dataType]['ctrl']['title'])) { |
|
48 | - $label = $this->getLanguageService()->sL($GLOBALS['TCA'][$dataType]['ctrl']['title']); |
|
49 | - } |
|
40 | + /** |
|
41 | + * @param string $dataType |
|
42 | + * @return string |
|
43 | + */ |
|
44 | + public function generate($dataType) |
|
45 | + { |
|
46 | + $label = $dataType; |
|
47 | + if (!empty($GLOBALS['TCA'][$dataType]['ctrl']['title'])) { |
|
48 | + $label = $this->getLanguageService()->sL($GLOBALS['TCA'][$dataType]['ctrl']['title']); |
|
49 | + } |
|
50 | 50 | |
51 | - // Generate language file. |
|
52 | - $languageFile = $this->getLanguageFile($dataType); |
|
53 | - $content = str_replace('{module_name}', $label, $this->template); |
|
54 | - GeneralUtility::writeFileToTypo3tempDir($languageFile, $content); |
|
51 | + // Generate language file. |
|
52 | + $languageFile = $this->getLanguageFile($dataType); |
|
53 | + $content = str_replace('{module_name}', $label, $this->template); |
|
54 | + GeneralUtility::writeFileToTypo3tempDir($languageFile, $content); |
|
55 | 55 | |
56 | - return 'LLL:' . $languageFile; |
|
57 | - } |
|
56 | + return 'LLL:' . $languageFile; |
|
57 | + } |
|
58 | 58 | |
59 | - /** |
|
60 | - * @param $dataType |
|
61 | - * @return string |
|
62 | - */ |
|
63 | - protected function getLanguageFile($dataType) |
|
64 | - { |
|
65 | - return $this->getLanguageDirectory() . '/' . $dataType . '.xlf'; |
|
66 | - } |
|
59 | + /** |
|
60 | + * @param $dataType |
|
61 | + * @return string |
|
62 | + */ |
|
63 | + protected function getLanguageFile($dataType) |
|
64 | + { |
|
65 | + return $this->getLanguageDirectory() . '/' . $dataType . '.xlf'; |
|
66 | + } |
|
67 | 67 | |
68 | - /** |
|
69 | - * @return string |
|
70 | - */ |
|
71 | - protected function getLanguageDirectory() |
|
72 | - { |
|
73 | - // Create language file dynamically |
|
74 | - $languageDirectory = Environment::getPublicPath() . '/typo3temp/vidi'; |
|
75 | - if (!is_dir($languageDirectory)) { |
|
76 | - GeneralUtility::mkdir($languageDirectory); |
|
77 | - } |
|
78 | - return $languageDirectory; |
|
79 | - } |
|
68 | + /** |
|
69 | + * @return string |
|
70 | + */ |
|
71 | + protected function getLanguageDirectory() |
|
72 | + { |
|
73 | + // Create language file dynamically |
|
74 | + $languageDirectory = Environment::getPublicPath() . '/typo3temp/vidi'; |
|
75 | + if (!is_dir($languageDirectory)) { |
|
76 | + GeneralUtility::mkdir($languageDirectory); |
|
77 | + } |
|
78 | + return $languageDirectory; |
|
79 | + } |
|
80 | 80 | |
81 | - /** |
|
82 | - * @return LanguageService |
|
83 | - */ |
|
84 | - protected function getLanguageService() |
|
85 | - { |
|
86 | - $locale = $GLOBALS['BE_USER']->uc['lang'] ?? ''; |
|
87 | - if ($locale === '') { |
|
88 | - $locale = 'en'; |
|
89 | - } |
|
90 | - $languageServiceFactory = GeneralUtility::makeInstance(LanguageServiceFactory::class); |
|
91 | - return $languageServiceFactory->create($locale); |
|
92 | - } |
|
81 | + /** |
|
82 | + * @return LanguageService |
|
83 | + */ |
|
84 | + protected function getLanguageService() |
|
85 | + { |
|
86 | + $locale = $GLOBALS['BE_USER']->uc['lang'] ?? ''; |
|
87 | + if ($locale === '') { |
|
88 | + $locale = 'en'; |
|
89 | + } |
|
90 | + $languageServiceFactory = GeneralUtility::makeInstance(LanguageServiceFactory::class); |
|
91 | + return $languageServiceFactory->create($locale); |
|
92 | + } |
|
93 | 93 | } |
@@ -16,32 +16,32 @@ |
||
16 | 16 | */ |
17 | 17 | class Datetime implements FormatterInterface, SingletonInterface |
18 | 18 | { |
19 | - /** |
|
20 | - * Format a date |
|
21 | - * |
|
22 | - * @param int $value |
|
23 | - * @return string |
|
24 | - * @throws \Exception |
|
25 | - */ |
|
26 | - public function format($value) |
|
27 | - { |
|
28 | - $result = ''; |
|
29 | - if ($value > 0) { |
|
30 | - $timeStamp = '@' . $value; |
|
31 | - try { |
|
32 | - $date = new \DateTime($timeStamp); |
|
33 | - $date->setTimezone(new \DateTimeZone(date_default_timezone_get())); |
|
34 | - } catch (\Exception $exception) { |
|
35 | - throw new \Exception('"' . $timeStamp . '" could not be parsed by \DateTime constructor: ' . $exception->getMessage(), 1447153621); |
|
36 | - } |
|
19 | + /** |
|
20 | + * Format a date |
|
21 | + * |
|
22 | + * @param int $value |
|
23 | + * @return string |
|
24 | + * @throws \Exception |
|
25 | + */ |
|
26 | + public function format($value) |
|
27 | + { |
|
28 | + $result = ''; |
|
29 | + if ($value > 0) { |
|
30 | + $timeStamp = '@' . $value; |
|
31 | + try { |
|
32 | + $date = new \DateTime($timeStamp); |
|
33 | + $date->setTimezone(new \DateTimeZone(date_default_timezone_get())); |
|
34 | + } catch (\Exception $exception) { |
|
35 | + throw new \Exception('"' . $timeStamp . '" could not be parsed by \DateTime constructor: ' . $exception->getMessage(), 1447153621); |
|
36 | + } |
|
37 | 37 | |
38 | - $format = $GLOBALS['TYPO3_CONF_VARS']['SYS']['ddmmyy'] . ' ' . $GLOBALS['TYPO3_CONF_VARS']['SYS']['hhmm']; |
|
39 | - if (strpos($format, '%') !== false) { |
|
40 | - $result = strftime($format, $date->format('U')); |
|
41 | - } else { |
|
42 | - $result = $date->format($format); |
|
43 | - } |
|
44 | - } |
|
45 | - return $result; |
|
46 | - } |
|
38 | + $format = $GLOBALS['TYPO3_CONF_VARS']['SYS']['ddmmyy'] . ' ' . $GLOBALS['TYPO3_CONF_VARS']['SYS']['hhmm']; |
|
39 | + if (strpos($format, '%') !== false) { |
|
40 | + $result = strftime($format, $date->format('U')); |
|
41 | + } else { |
|
42 | + $result = $date->format($format); |
|
43 | + } |
|
44 | + } |
|
45 | + return $result; |
|
46 | + } |
|
47 | 47 | } |
@@ -27,15 +27,15 @@ |
||
27 | 27 | { |
28 | 28 | $result = ''; |
29 | 29 | if ($value > 0) { |
30 | - $timeStamp = '@' . $value; |
|
30 | + $timeStamp = '@'.$value; |
|
31 | 31 | try { |
32 | 32 | $date = new \DateTime($timeStamp); |
33 | 33 | $date->setTimezone(new \DateTimeZone(date_default_timezone_get())); |
34 | 34 | } catch (\Exception $exception) { |
35 | - throw new \Exception('"' . $timeStamp . '" could not be parsed by \DateTime constructor: ' . $exception->getMessage(), 1447153621); |
|
35 | + throw new \Exception('"'.$timeStamp.'" could not be parsed by \DateTime constructor: '.$exception->getMessage(), 1447153621); |
|
36 | 36 | } |
37 | 37 | |
38 | - $format = $GLOBALS['TYPO3_CONF_VARS']['SYS']['ddmmyy'] . ' ' . $GLOBALS['TYPO3_CONF_VARS']['SYS']['hhmm']; |
|
38 | + $format = $GLOBALS['TYPO3_CONF_VARS']['SYS']['ddmmyy'].' '.$GLOBALS['TYPO3_CONF_VARS']['SYS']['hhmm']; |
|
39 | 39 | if (strpos($format, '%') !== false) { |
40 | 40 | $result = strftime($format, $date->format('U')); |
41 | 41 | } else { |
@@ -14,11 +14,11 @@ |
||
14 | 14 | */ |
15 | 15 | interface FormatterInterface |
16 | 16 | { |
17 | - /** |
|
18 | - * Format a date |
|
19 | - * |
|
20 | - * @param string $value |
|
21 | - * @return string |
|
22 | - */ |
|
23 | - public function format($value); |
|
17 | + /** |
|
18 | + * Format a date |
|
19 | + * |
|
20 | + * @param string $value |
|
21 | + * @return string |
|
22 | + */ |
|
23 | + public function format($value); |
|
24 | 24 | } |
@@ -16,32 +16,32 @@ |
||
16 | 16 | */ |
17 | 17 | class Date implements FormatterInterface, SingletonInterface |
18 | 18 | { |
19 | - /** |
|
20 | - * Format a date |
|
21 | - * |
|
22 | - * @param int $value |
|
23 | - * @return string |
|
24 | - * @throws \Exception |
|
25 | - */ |
|
26 | - public function format($value) |
|
27 | - { |
|
28 | - $result = ''; |
|
29 | - if ((int)$value > 0) { |
|
30 | - $timeStamp = '@' . $value; |
|
31 | - try { |
|
32 | - $date = new \DateTime($timeStamp); |
|
33 | - $date->setTimezone(new \DateTimeZone(date_default_timezone_get())); |
|
34 | - } catch (\Exception $exception) { |
|
35 | - throw new \Exception('"' . $timeStamp . '" could not be parsed by \DateTime constructor: ' . $exception->getMessage(), 1447153621); |
|
36 | - } |
|
19 | + /** |
|
20 | + * Format a date |
|
21 | + * |
|
22 | + * @param int $value |
|
23 | + * @return string |
|
24 | + * @throws \Exception |
|
25 | + */ |
|
26 | + public function format($value) |
|
27 | + { |
|
28 | + $result = ''; |
|
29 | + if ((int)$value > 0) { |
|
30 | + $timeStamp = '@' . $value; |
|
31 | + try { |
|
32 | + $date = new \DateTime($timeStamp); |
|
33 | + $date->setTimezone(new \DateTimeZone(date_default_timezone_get())); |
|
34 | + } catch (\Exception $exception) { |
|
35 | + throw new \Exception('"' . $timeStamp . '" could not be parsed by \DateTime constructor: ' . $exception->getMessage(), 1447153621); |
|
36 | + } |
|
37 | 37 | |
38 | - $format = $GLOBALS['TYPO3_CONF_VARS']['SYS']['ddmmyy'] ?: 'Y-m-d'; |
|
39 | - if (strpos($format, '%') !== false) { |
|
40 | - $result = strftime($format, $date->format('U')); |
|
41 | - } else { |
|
42 | - $result = $date->format($format); |
|
43 | - } |
|
44 | - } |
|
45 | - return $result; |
|
46 | - } |
|
38 | + $format = $GLOBALS['TYPO3_CONF_VARS']['SYS']['ddmmyy'] ?: 'Y-m-d'; |
|
39 | + if (strpos($format, '%') !== false) { |
|
40 | + $result = strftime($format, $date->format('U')); |
|
41 | + } else { |
|
42 | + $result = $date->format($format); |
|
43 | + } |
|
44 | + } |
|
45 | + return $result; |
|
46 | + } |
|
47 | 47 | } |
@@ -27,12 +27,12 @@ |
||
27 | 27 | { |
28 | 28 | $result = ''; |
29 | 29 | if ((int)$value > 0) { |
30 | - $timeStamp = '@' . $value; |
|
30 | + $timeStamp = '@'.$value; |
|
31 | 31 | try { |
32 | 32 | $date = new \DateTime($timeStamp); |
33 | 33 | $date->setTimezone(new \DateTimeZone(date_default_timezone_get())); |
34 | 34 | } catch (\Exception $exception) { |
35 | - throw new \Exception('"' . $timeStamp . '" could not be parsed by \DateTime constructor: ' . $exception->getMessage(), 1447153621); |
|
35 | + throw new \Exception('"'.$timeStamp.'" could not be parsed by \DateTime constructor: '.$exception->getMessage(), 1447153621); |
|
36 | 36 | } |
37 | 37 | |
38 | 38 | $format = $GLOBALS['TYPO3_CONF_VARS']['SYS']['ddmmyy'] ?: 'Y-m-d'; |
@@ -18,27 +18,27 @@ |
||
18 | 18 | */ |
19 | 19 | class VidiModulesAspect implements TableConfigurationPostProcessingHookInterface |
20 | 20 | { |
21 | - /** |
|
22 | - * Initialize and populate TBE_MODULES_EXT with default data. |
|
23 | - * |
|
24 | - * @return void |
|
25 | - */ |
|
26 | - public function processData() |
|
27 | - { |
|
28 | - /** @var ModuleLoader $moduleLoader */ |
|
29 | - $moduleLoader = GeneralUtility::makeInstance(ModuleLoader::class); |
|
21 | + /** |
|
22 | + * Initialize and populate TBE_MODULES_EXT with default data. |
|
23 | + * |
|
24 | + * @return void |
|
25 | + */ |
|
26 | + public function processData() |
|
27 | + { |
|
28 | + /** @var ModuleLoader $moduleLoader */ |
|
29 | + $moduleLoader = GeneralUtility::makeInstance(ModuleLoader::class); |
|
30 | 30 | |
31 | 31 | |
32 | - $configuration = GeneralUtility::makeInstance( |
|
33 | - ExtensionConfiguration::class |
|
34 | - )->get('vidi'); |
|
32 | + $configuration = GeneralUtility::makeInstance( |
|
33 | + ExtensionConfiguration::class |
|
34 | + )->get('vidi'); |
|
35 | 35 | |
36 | - foreach (GeneralUtility::trimExplode(',', $configuration['data_types'], true) as $dataType) { |
|
37 | - if (!$moduleLoader->isRegistered($dataType)) { |
|
38 | - $moduleLoader->setDataType($dataType) |
|
39 | - #->isShown(false) |
|
40 | - ->register(); |
|
41 | - } |
|
42 | - } |
|
43 | - } |
|
36 | + foreach (GeneralUtility::trimExplode(',', $configuration['data_types'], true) as $dataType) { |
|
37 | + if (!$moduleLoader->isRegistered($dataType)) { |
|
38 | + $moduleLoader->setDataType($dataType) |
|
39 | + #->isShown(false) |
|
40 | + ->register(); |
|
41 | + } |
|
42 | + } |
|
43 | + } |
|
44 | 44 | } |
@@ -18,68 +18,68 @@ |
||
18 | 18 | */ |
19 | 19 | class ConfigurationUtility implements SingletonInterface |
20 | 20 | { |
21 | - /** |
|
22 | - * @var string |
|
23 | - */ |
|
24 | - protected $extensionKey = 'vidi'; |
|
21 | + /** |
|
22 | + * @var string |
|
23 | + */ |
|
24 | + protected $extensionKey = 'vidi'; |
|
25 | 25 | |
26 | - /** |
|
27 | - * @var array |
|
28 | - */ |
|
29 | - protected $configuration = []; |
|
26 | + /** |
|
27 | + * @var array |
|
28 | + */ |
|
29 | + protected $configuration = []; |
|
30 | 30 | |
31 | - /** |
|
32 | - * Returns a class instance. |
|
33 | - * |
|
34 | - * @return ConfigurationUtility|object |
|
35 | - * @throws \InvalidArgumentException |
|
36 | - */ |
|
37 | - public static function getInstance() |
|
38 | - { |
|
39 | - return GeneralUtility::makeInstance(self::class); |
|
40 | - } |
|
31 | + /** |
|
32 | + * Returns a class instance. |
|
33 | + * |
|
34 | + * @return ConfigurationUtility|object |
|
35 | + * @throws \InvalidArgumentException |
|
36 | + */ |
|
37 | + public static function getInstance() |
|
38 | + { |
|
39 | + return GeneralUtility::makeInstance(self::class); |
|
40 | + } |
|
41 | 41 | |
42 | - /** |
|
43 | - * Constructor |
|
44 | - */ |
|
45 | - public function __construct() |
|
46 | - { |
|
47 | - $configuration = $configuration = GeneralUtility::makeInstance(ExtensionConfiguration::class)->get($this->extensionKey); |
|
42 | + /** |
|
43 | + * Constructor |
|
44 | + */ |
|
45 | + public function __construct() |
|
46 | + { |
|
47 | + $configuration = $configuration = GeneralUtility::makeInstance(ExtensionConfiguration::class)->get($this->extensionKey); |
|
48 | 48 | |
49 | - // Fill up configuration array with relevant values. |
|
50 | - foreach ($configuration as $key => $value) { |
|
51 | - $this->configuration[$key] = $value; |
|
52 | - } |
|
53 | - } |
|
49 | + // Fill up configuration array with relevant values. |
|
50 | + foreach ($configuration as $key => $value) { |
|
51 | + $this->configuration[$key] = $value; |
|
52 | + } |
|
53 | + } |
|
54 | 54 | |
55 | - /** |
|
56 | - * Returns a setting key. |
|
57 | - * |
|
58 | - * @param string $key |
|
59 | - * @return array |
|
60 | - */ |
|
61 | - public function get($key) |
|
62 | - { |
|
63 | - return isset($this->configuration[$key]) ? $this->configuration[$key] : null; |
|
64 | - } |
|
55 | + /** |
|
56 | + * Returns a setting key. |
|
57 | + * |
|
58 | + * @param string $key |
|
59 | + * @return array |
|
60 | + */ |
|
61 | + public function get($key) |
|
62 | + { |
|
63 | + return isset($this->configuration[$key]) ? $this->configuration[$key] : null; |
|
64 | + } |
|
65 | 65 | |
66 | - /** |
|
67 | - * Set a setting key. |
|
68 | - * |
|
69 | - * @param string $key |
|
70 | - * @param mixed $value |
|
71 | - * @return void |
|
72 | - */ |
|
73 | - public function set($key, $value) |
|
74 | - { |
|
75 | - $this->configuration[$key] = $value; |
|
76 | - } |
|
66 | + /** |
|
67 | + * Set a setting key. |
|
68 | + * |
|
69 | + * @param string $key |
|
70 | + * @param mixed $value |
|
71 | + * @return void |
|
72 | + */ |
|
73 | + public function set($key, $value) |
|
74 | + { |
|
75 | + $this->configuration[$key] = $value; |
|
76 | + } |
|
77 | 77 | |
78 | - /** |
|
79 | - * @return array |
|
80 | - */ |
|
81 | - public function getConfiguration() |
|
82 | - { |
|
83 | - return $this->configuration; |
|
84 | - } |
|
78 | + /** |
|
79 | + * @return array |
|
80 | + */ |
|
81 | + public function getConfiguration() |
|
82 | + { |
|
83 | + return $this->configuration; |
|
84 | + } |
|
85 | 85 | } |