@@ -6,48 +6,48 @@ |
||
6 | 6 | |
7 | 7 | class ComposerStaticInitUserStatus |
8 | 8 | { |
9 | - public static $prefixLengthsPsr4 = array ( |
|
9 | + public static $prefixLengthsPsr4 = array( |
|
10 | 10 | 'O' => |
11 | - array ( |
|
11 | + array( |
|
12 | 12 | 'OCA\\UserStatus\\' => 15, |
13 | 13 | ), |
14 | 14 | ); |
15 | 15 | |
16 | - public static $prefixDirsPsr4 = array ( |
|
16 | + public static $prefixDirsPsr4 = array( |
|
17 | 17 | 'OCA\\UserStatus\\' => |
18 | - array ( |
|
19 | - 0 => __DIR__ . '/..' . '/../lib', |
|
18 | + array( |
|
19 | + 0 => __DIR__.'/..'.'/../lib', |
|
20 | 20 | ), |
21 | 21 | ); |
22 | 22 | |
23 | - public static $classMap = array ( |
|
24 | - 'OCA\\UserStatus\\AppInfo\\Application' => __DIR__ . '/..' . '/../lib/AppInfo/Application.php', |
|
25 | - 'OCA\\UserStatus\\BackgroundJob\\ClearOldStatusesBackgroundJob' => __DIR__ . '/..' . '/../lib/BackgroundJob/ClearOldStatusesBackgroundJob.php', |
|
26 | - 'OCA\\UserStatus\\Capabilities' => __DIR__ . '/..' . '/../lib/Capabilities.php', |
|
27 | - 'OCA\\UserStatus\\Controller\\HeartbeatController' => __DIR__ . '/..' . '/../lib/Controller/HeartbeatController.php', |
|
28 | - 'OCA\\UserStatus\\Controller\\PredefinedStatusController' => __DIR__ . '/..' . '/../lib/Controller/PredefinedStatusController.php', |
|
29 | - 'OCA\\UserStatus\\Controller\\StatusesController' => __DIR__ . '/..' . '/../lib/Controller/StatusesController.php', |
|
30 | - 'OCA\\UserStatus\\Controller\\UserStatusController' => __DIR__ . '/..' . '/../lib/Controller/UserStatusController.php', |
|
31 | - 'OCA\\UserStatus\\Db\\UserStatus' => __DIR__ . '/..' . '/../lib/Db/UserStatus.php', |
|
32 | - 'OCA\\UserStatus\\Db\\UserStatusMapper' => __DIR__ . '/..' . '/../lib/Db/UserStatusMapper.php', |
|
33 | - 'OCA\\UserStatus\\Exception\\InvalidClearAtException' => __DIR__ . '/..' . '/../lib/Exception/InvalidClearAtException.php', |
|
34 | - 'OCA\\UserStatus\\Exception\\InvalidMessageIdException' => __DIR__ . '/..' . '/../lib/Exception/InvalidMessageIdException.php', |
|
35 | - 'OCA\\UserStatus\\Exception\\InvalidStatusIconException' => __DIR__ . '/..' . '/../lib/Exception/InvalidStatusIconException.php', |
|
36 | - 'OCA\\UserStatus\\Exception\\InvalidStatusTypeException' => __DIR__ . '/..' . '/../lib/Exception/InvalidStatusTypeException.php', |
|
37 | - 'OCA\\UserStatus\\Exception\\StatusMessageTooLongException' => __DIR__ . '/..' . '/../lib/Exception/StatusMessageTooLongException.php', |
|
38 | - 'OCA\\UserStatus\\Listener\\BeforeTemplateRenderedListener' => __DIR__ . '/..' . '/../lib/Listener/BeforeTemplateRenderedListener.php', |
|
39 | - 'OCA\\UserStatus\\Listener\\UserDeletedListener' => __DIR__ . '/..' . '/../lib/Listener/UserDeletedListener.php', |
|
40 | - 'OCA\\UserStatus\\Listener\\UserLiveStatusListener' => __DIR__ . '/..' . '/../lib/Listener/UserLiveStatusListener.php', |
|
41 | - 'OCA\\UserStatus\\Migration\\Version0001Date20200602134824' => __DIR__ . '/..' . '/../lib/Migration/Version0001Date20200602134824.php', |
|
42 | - 'OCA\\UserStatus\\Service\\EmojiService' => __DIR__ . '/..' . '/../lib/Service/EmojiService.php', |
|
43 | - 'OCA\\UserStatus\\Service\\JSDataService' => __DIR__ . '/..' . '/../lib/Service/JSDataService.php', |
|
44 | - 'OCA\\UserStatus\\Service\\PredefinedStatusService' => __DIR__ . '/..' . '/../lib/Service/PredefinedStatusService.php', |
|
45 | - 'OCA\\UserStatus\\Service\\StatusService' => __DIR__ . '/..' . '/../lib/Service/StatusService.php', |
|
23 | + public static $classMap = array( |
|
24 | + 'OCA\\UserStatus\\AppInfo\\Application' => __DIR__.'/..'.'/../lib/AppInfo/Application.php', |
|
25 | + 'OCA\\UserStatus\\BackgroundJob\\ClearOldStatusesBackgroundJob' => __DIR__.'/..'.'/../lib/BackgroundJob/ClearOldStatusesBackgroundJob.php', |
|
26 | + 'OCA\\UserStatus\\Capabilities' => __DIR__.'/..'.'/../lib/Capabilities.php', |
|
27 | + 'OCA\\UserStatus\\Controller\\HeartbeatController' => __DIR__.'/..'.'/../lib/Controller/HeartbeatController.php', |
|
28 | + 'OCA\\UserStatus\\Controller\\PredefinedStatusController' => __DIR__.'/..'.'/../lib/Controller/PredefinedStatusController.php', |
|
29 | + 'OCA\\UserStatus\\Controller\\StatusesController' => __DIR__.'/..'.'/../lib/Controller/StatusesController.php', |
|
30 | + 'OCA\\UserStatus\\Controller\\UserStatusController' => __DIR__.'/..'.'/../lib/Controller/UserStatusController.php', |
|
31 | + 'OCA\\UserStatus\\Db\\UserStatus' => __DIR__.'/..'.'/../lib/Db/UserStatus.php', |
|
32 | + 'OCA\\UserStatus\\Db\\UserStatusMapper' => __DIR__.'/..'.'/../lib/Db/UserStatusMapper.php', |
|
33 | + 'OCA\\UserStatus\\Exception\\InvalidClearAtException' => __DIR__.'/..'.'/../lib/Exception/InvalidClearAtException.php', |
|
34 | + 'OCA\\UserStatus\\Exception\\InvalidMessageIdException' => __DIR__.'/..'.'/../lib/Exception/InvalidMessageIdException.php', |
|
35 | + 'OCA\\UserStatus\\Exception\\InvalidStatusIconException' => __DIR__.'/..'.'/../lib/Exception/InvalidStatusIconException.php', |
|
36 | + 'OCA\\UserStatus\\Exception\\InvalidStatusTypeException' => __DIR__.'/..'.'/../lib/Exception/InvalidStatusTypeException.php', |
|
37 | + 'OCA\\UserStatus\\Exception\\StatusMessageTooLongException' => __DIR__.'/..'.'/../lib/Exception/StatusMessageTooLongException.php', |
|
38 | + 'OCA\\UserStatus\\Listener\\BeforeTemplateRenderedListener' => __DIR__.'/..'.'/../lib/Listener/BeforeTemplateRenderedListener.php', |
|
39 | + 'OCA\\UserStatus\\Listener\\UserDeletedListener' => __DIR__.'/..'.'/../lib/Listener/UserDeletedListener.php', |
|
40 | + 'OCA\\UserStatus\\Listener\\UserLiveStatusListener' => __DIR__.'/..'.'/../lib/Listener/UserLiveStatusListener.php', |
|
41 | + 'OCA\\UserStatus\\Migration\\Version0001Date20200602134824' => __DIR__.'/..'.'/../lib/Migration/Version0001Date20200602134824.php', |
|
42 | + 'OCA\\UserStatus\\Service\\EmojiService' => __DIR__.'/..'.'/../lib/Service/EmojiService.php', |
|
43 | + 'OCA\\UserStatus\\Service\\JSDataService' => __DIR__.'/..'.'/../lib/Service/JSDataService.php', |
|
44 | + 'OCA\\UserStatus\\Service\\PredefinedStatusService' => __DIR__.'/..'.'/../lib/Service/PredefinedStatusService.php', |
|
45 | + 'OCA\\UserStatus\\Service\\StatusService' => __DIR__.'/..'.'/../lib/Service/StatusService.php', |
|
46 | 46 | ); |
47 | 47 | |
48 | 48 | public static function getInitializer(ClassLoader $loader) |
49 | 49 | { |
50 | - return \Closure::bind(function () use ($loader) { |
|
50 | + return \Closure::bind(function() use ($loader) { |
|
51 | 51 | $loader->prefixLengthsPsr4 = ComposerStaticInitUserStatus::$prefixLengthsPsr4; |
52 | 52 | $loader->prefixDirsPsr4 = ComposerStaticInitUserStatus::$prefixDirsPsr4; |
53 | 53 | $loader->classMap = ComposerStaticInitUserStatus::$classMap; |
@@ -9,7 +9,7 @@ discard block |
||
9 | 9 | public static function loadClassLoader($class) |
10 | 10 | { |
11 | 11 | if ('Composer\Autoload\ClassLoader' === $class) { |
12 | - require __DIR__ . '/ClassLoader.php'; |
|
12 | + require __DIR__.'/ClassLoader.php'; |
|
13 | 13 | } |
14 | 14 | } |
15 | 15 | |
@@ -28,11 +28,11 @@ discard block |
||
28 | 28 | |
29 | 29 | $useStaticLoader = PHP_VERSION_ID >= 50600 && !defined('HHVM_VERSION') && (!function_exists('zend_loader_file_encoded') || !zend_loader_file_encoded()); |
30 | 30 | if ($useStaticLoader) { |
31 | - require_once __DIR__ . '/autoload_static.php'; |
|
31 | + require_once __DIR__.'/autoload_static.php'; |
|
32 | 32 | |
33 | 33 | call_user_func(\Composer\Autoload\ComposerStaticInitUserStatus::getInitializer($loader)); |
34 | 34 | } else { |
35 | - $classMap = require __DIR__ . '/autoload_classmap.php'; |
|
35 | + $classMap = require __DIR__.'/autoload_classmap.php'; |
|
36 | 36 | if ($classMap) { |
37 | 37 | $loader->addClassMap($classMap); |
38 | 38 | } |
@@ -370,18 +370,18 @@ discard block |
||
370 | 370 | private function findFileWithExtension($class, $ext) |
371 | 371 | { |
372 | 372 | // PSR-4 lookup |
373 | - $logicalPathPsr4 = strtr($class, '\\', DIRECTORY_SEPARATOR) . $ext; |
|
373 | + $logicalPathPsr4 = strtr($class, '\\', DIRECTORY_SEPARATOR).$ext; |
|
374 | 374 | |
375 | 375 | $first = $class[0]; |
376 | 376 | if (isset($this->prefixLengthsPsr4[$first])) { |
377 | 377 | $subPath = $class; |
378 | 378 | while (false !== $lastPos = strrpos($subPath, '\\')) { |
379 | 379 | $subPath = substr($subPath, 0, $lastPos); |
380 | - $search = $subPath . '\\'; |
|
380 | + $search = $subPath.'\\'; |
|
381 | 381 | if (isset($this->prefixDirsPsr4[$search])) { |
382 | - $pathEnd = DIRECTORY_SEPARATOR . substr($logicalPathPsr4, $lastPos + 1); |
|
382 | + $pathEnd = DIRECTORY_SEPARATOR.substr($logicalPathPsr4, $lastPos + 1); |
|
383 | 383 | foreach ($this->prefixDirsPsr4[$search] as $dir) { |
384 | - if (file_exists($file = $dir . $pathEnd)) { |
|
384 | + if (file_exists($file = $dir.$pathEnd)) { |
|
385 | 385 | return $file; |
386 | 386 | } |
387 | 387 | } |
@@ -391,7 +391,7 @@ discard block |
||
391 | 391 | |
392 | 392 | // PSR-4 fallback dirs |
393 | 393 | foreach ($this->fallbackDirsPsr4 as $dir) { |
394 | - if (file_exists($file = $dir . DIRECTORY_SEPARATOR . $logicalPathPsr4)) { |
|
394 | + if (file_exists($file = $dir.DIRECTORY_SEPARATOR.$logicalPathPsr4)) { |
|
395 | 395 | return $file; |
396 | 396 | } |
397 | 397 | } |
@@ -403,14 +403,14 @@ discard block |
||
403 | 403 | . strtr(substr($logicalPathPsr4, $pos + 1), '_', DIRECTORY_SEPARATOR); |
404 | 404 | } else { |
405 | 405 | // PEAR-like class name |
406 | - $logicalPathPsr0 = strtr($class, '_', DIRECTORY_SEPARATOR) . $ext; |
|
406 | + $logicalPathPsr0 = strtr($class, '_', DIRECTORY_SEPARATOR).$ext; |
|
407 | 407 | } |
408 | 408 | |
409 | 409 | if (isset($this->prefixesPsr0[$first])) { |
410 | 410 | foreach ($this->prefixesPsr0[$first] as $prefix => $dirs) { |
411 | 411 | if (0 === strpos($class, $prefix)) { |
412 | 412 | foreach ($dirs as $dir) { |
413 | - if (file_exists($file = $dir . DIRECTORY_SEPARATOR . $logicalPathPsr0)) { |
|
413 | + if (file_exists($file = $dir.DIRECTORY_SEPARATOR.$logicalPathPsr0)) { |
|
414 | 414 | return $file; |
415 | 415 | } |
416 | 416 | } |
@@ -420,7 +420,7 @@ discard block |
||
420 | 420 | |
421 | 421 | // PSR-0 fallback dirs |
422 | 422 | foreach ($this->fallbackDirsPsr0 as $dir) { |
423 | - if (file_exists($file = $dir . DIRECTORY_SEPARATOR . $logicalPathPsr0)) { |
|
423 | + if (file_exists($file = $dir.DIRECTORY_SEPARATOR.$logicalPathPsr0)) { |
|
424 | 424 | return $file; |
425 | 425 | } |
426 | 426 | } |
@@ -6,26 +6,26 @@ |
||
6 | 6 | $baseDir = $vendorDir; |
7 | 7 | |
8 | 8 | return array( |
9 | - 'OCA\\UserStatus\\AppInfo\\Application' => $baseDir . '/../lib/AppInfo/Application.php', |
|
10 | - 'OCA\\UserStatus\\BackgroundJob\\ClearOldStatusesBackgroundJob' => $baseDir . '/../lib/BackgroundJob/ClearOldStatusesBackgroundJob.php', |
|
11 | - 'OCA\\UserStatus\\Capabilities' => $baseDir . '/../lib/Capabilities.php', |
|
12 | - 'OCA\\UserStatus\\Controller\\HeartbeatController' => $baseDir . '/../lib/Controller/HeartbeatController.php', |
|
13 | - 'OCA\\UserStatus\\Controller\\PredefinedStatusController' => $baseDir . '/../lib/Controller/PredefinedStatusController.php', |
|
14 | - 'OCA\\UserStatus\\Controller\\StatusesController' => $baseDir . '/../lib/Controller/StatusesController.php', |
|
15 | - 'OCA\\UserStatus\\Controller\\UserStatusController' => $baseDir . '/../lib/Controller/UserStatusController.php', |
|
16 | - 'OCA\\UserStatus\\Db\\UserStatus' => $baseDir . '/../lib/Db/UserStatus.php', |
|
17 | - 'OCA\\UserStatus\\Db\\UserStatusMapper' => $baseDir . '/../lib/Db/UserStatusMapper.php', |
|
18 | - 'OCA\\UserStatus\\Exception\\InvalidClearAtException' => $baseDir . '/../lib/Exception/InvalidClearAtException.php', |
|
19 | - 'OCA\\UserStatus\\Exception\\InvalidMessageIdException' => $baseDir . '/../lib/Exception/InvalidMessageIdException.php', |
|
20 | - 'OCA\\UserStatus\\Exception\\InvalidStatusIconException' => $baseDir . '/../lib/Exception/InvalidStatusIconException.php', |
|
21 | - 'OCA\\UserStatus\\Exception\\InvalidStatusTypeException' => $baseDir . '/../lib/Exception/InvalidStatusTypeException.php', |
|
22 | - 'OCA\\UserStatus\\Exception\\StatusMessageTooLongException' => $baseDir . '/../lib/Exception/StatusMessageTooLongException.php', |
|
23 | - 'OCA\\UserStatus\\Listener\\BeforeTemplateRenderedListener' => $baseDir . '/../lib/Listener/BeforeTemplateRenderedListener.php', |
|
24 | - 'OCA\\UserStatus\\Listener\\UserDeletedListener' => $baseDir . '/../lib/Listener/UserDeletedListener.php', |
|
25 | - 'OCA\\UserStatus\\Listener\\UserLiveStatusListener' => $baseDir . '/../lib/Listener/UserLiveStatusListener.php', |
|
26 | - 'OCA\\UserStatus\\Migration\\Version0001Date20200602134824' => $baseDir . '/../lib/Migration/Version0001Date20200602134824.php', |
|
27 | - 'OCA\\UserStatus\\Service\\EmojiService' => $baseDir . '/../lib/Service/EmojiService.php', |
|
28 | - 'OCA\\UserStatus\\Service\\JSDataService' => $baseDir . '/../lib/Service/JSDataService.php', |
|
29 | - 'OCA\\UserStatus\\Service\\PredefinedStatusService' => $baseDir . '/../lib/Service/PredefinedStatusService.php', |
|
30 | - 'OCA\\UserStatus\\Service\\StatusService' => $baseDir . '/../lib/Service/StatusService.php', |
|
9 | + 'OCA\\UserStatus\\AppInfo\\Application' => $baseDir.'/../lib/AppInfo/Application.php', |
|
10 | + 'OCA\\UserStatus\\BackgroundJob\\ClearOldStatusesBackgroundJob' => $baseDir.'/../lib/BackgroundJob/ClearOldStatusesBackgroundJob.php', |
|
11 | + 'OCA\\UserStatus\\Capabilities' => $baseDir.'/../lib/Capabilities.php', |
|
12 | + 'OCA\\UserStatus\\Controller\\HeartbeatController' => $baseDir.'/../lib/Controller/HeartbeatController.php', |
|
13 | + 'OCA\\UserStatus\\Controller\\PredefinedStatusController' => $baseDir.'/../lib/Controller/PredefinedStatusController.php', |
|
14 | + 'OCA\\UserStatus\\Controller\\StatusesController' => $baseDir.'/../lib/Controller/StatusesController.php', |
|
15 | + 'OCA\\UserStatus\\Controller\\UserStatusController' => $baseDir.'/../lib/Controller/UserStatusController.php', |
|
16 | + 'OCA\\UserStatus\\Db\\UserStatus' => $baseDir.'/../lib/Db/UserStatus.php', |
|
17 | + 'OCA\\UserStatus\\Db\\UserStatusMapper' => $baseDir.'/../lib/Db/UserStatusMapper.php', |
|
18 | + 'OCA\\UserStatus\\Exception\\InvalidClearAtException' => $baseDir.'/../lib/Exception/InvalidClearAtException.php', |
|
19 | + 'OCA\\UserStatus\\Exception\\InvalidMessageIdException' => $baseDir.'/../lib/Exception/InvalidMessageIdException.php', |
|
20 | + 'OCA\\UserStatus\\Exception\\InvalidStatusIconException' => $baseDir.'/../lib/Exception/InvalidStatusIconException.php', |
|
21 | + 'OCA\\UserStatus\\Exception\\InvalidStatusTypeException' => $baseDir.'/../lib/Exception/InvalidStatusTypeException.php', |
|
22 | + 'OCA\\UserStatus\\Exception\\StatusMessageTooLongException' => $baseDir.'/../lib/Exception/StatusMessageTooLongException.php', |
|
23 | + 'OCA\\UserStatus\\Listener\\BeforeTemplateRenderedListener' => $baseDir.'/../lib/Listener/BeforeTemplateRenderedListener.php', |
|
24 | + 'OCA\\UserStatus\\Listener\\UserDeletedListener' => $baseDir.'/../lib/Listener/UserDeletedListener.php', |
|
25 | + 'OCA\\UserStatus\\Listener\\UserLiveStatusListener' => $baseDir.'/../lib/Listener/UserLiveStatusListener.php', |
|
26 | + 'OCA\\UserStatus\\Migration\\Version0001Date20200602134824' => $baseDir.'/../lib/Migration/Version0001Date20200602134824.php', |
|
27 | + 'OCA\\UserStatus\\Service\\EmojiService' => $baseDir.'/../lib/Service/EmojiService.php', |
|
28 | + 'OCA\\UserStatus\\Service\\JSDataService' => $baseDir.'/../lib/Service/JSDataService.php', |
|
29 | + 'OCA\\UserStatus\\Service\\PredefinedStatusService' => $baseDir.'/../lib/Service/PredefinedStatusService.php', |
|
30 | + 'OCA\\UserStatus\\Service\\StatusService' => $baseDir.'/../lib/Service/StatusService.php', |
|
31 | 31 | ); |
@@ -46,290 +46,290 @@ |
||
46 | 46 | */ |
47 | 47 | |
48 | 48 | class NavigationManager implements INavigationManager { |
49 | - protected $entries = []; |
|
50 | - protected $closureEntries = []; |
|
51 | - protected $activeEntry; |
|
52 | - /** @var bool */ |
|
53 | - protected $init = false; |
|
54 | - /** @var IAppManager|AppManager */ |
|
55 | - protected $appManager; |
|
56 | - /** @var IURLGenerator */ |
|
57 | - private $urlGenerator; |
|
58 | - /** @var IFactory */ |
|
59 | - private $l10nFac; |
|
60 | - /** @var IUserSession */ |
|
61 | - private $userSession; |
|
62 | - /** @var IGroupManager|Manager */ |
|
63 | - private $groupManager; |
|
64 | - /** @var IConfig */ |
|
65 | - private $config; |
|
49 | + protected $entries = []; |
|
50 | + protected $closureEntries = []; |
|
51 | + protected $activeEntry; |
|
52 | + /** @var bool */ |
|
53 | + protected $init = false; |
|
54 | + /** @var IAppManager|AppManager */ |
|
55 | + protected $appManager; |
|
56 | + /** @var IURLGenerator */ |
|
57 | + private $urlGenerator; |
|
58 | + /** @var IFactory */ |
|
59 | + private $l10nFac; |
|
60 | + /** @var IUserSession */ |
|
61 | + private $userSession; |
|
62 | + /** @var IGroupManager|Manager */ |
|
63 | + private $groupManager; |
|
64 | + /** @var IConfig */ |
|
65 | + private $config; |
|
66 | 66 | |
67 | - public function __construct(IAppManager $appManager, |
|
68 | - IURLGenerator $urlGenerator, |
|
69 | - IFactory $l10nFac, |
|
70 | - IUserSession $userSession, |
|
71 | - IGroupManager $groupManager, |
|
72 | - IConfig $config) { |
|
73 | - $this->appManager = $appManager; |
|
74 | - $this->urlGenerator = $urlGenerator; |
|
75 | - $this->l10nFac = $l10nFac; |
|
76 | - $this->userSession = $userSession; |
|
77 | - $this->groupManager = $groupManager; |
|
78 | - $this->config = $config; |
|
79 | - } |
|
67 | + public function __construct(IAppManager $appManager, |
|
68 | + IURLGenerator $urlGenerator, |
|
69 | + IFactory $l10nFac, |
|
70 | + IUserSession $userSession, |
|
71 | + IGroupManager $groupManager, |
|
72 | + IConfig $config) { |
|
73 | + $this->appManager = $appManager; |
|
74 | + $this->urlGenerator = $urlGenerator; |
|
75 | + $this->l10nFac = $l10nFac; |
|
76 | + $this->userSession = $userSession; |
|
77 | + $this->groupManager = $groupManager; |
|
78 | + $this->config = $config; |
|
79 | + } |
|
80 | 80 | |
81 | - /** |
|
82 | - * Creates a new navigation entry |
|
83 | - * |
|
84 | - * @param array|\Closure $entry Array containing: id, name, order, icon and href key |
|
85 | - * The use of a closure is preferred, because it will avoid |
|
86 | - * loading the routing of your app, unless required. |
|
87 | - * @return void |
|
88 | - */ |
|
89 | - public function add($entry) { |
|
90 | - if ($entry instanceof \Closure) { |
|
91 | - $this->closureEntries[] = $entry; |
|
92 | - return; |
|
93 | - } |
|
81 | + /** |
|
82 | + * Creates a new navigation entry |
|
83 | + * |
|
84 | + * @param array|\Closure $entry Array containing: id, name, order, icon and href key |
|
85 | + * The use of a closure is preferred, because it will avoid |
|
86 | + * loading the routing of your app, unless required. |
|
87 | + * @return void |
|
88 | + */ |
|
89 | + public function add($entry) { |
|
90 | + if ($entry instanceof \Closure) { |
|
91 | + $this->closureEntries[] = $entry; |
|
92 | + return; |
|
93 | + } |
|
94 | 94 | |
95 | - $entry['active'] = false; |
|
96 | - if (!isset($entry['icon'])) { |
|
97 | - $entry['icon'] = ''; |
|
98 | - } |
|
99 | - if (!isset($entry['classes'])) { |
|
100 | - $entry['classes'] = ''; |
|
101 | - } |
|
102 | - if (!isset($entry['type'])) { |
|
103 | - $entry['type'] = 'link'; |
|
104 | - } |
|
105 | - $this->entries[$entry['id']] = $entry; |
|
106 | - } |
|
95 | + $entry['active'] = false; |
|
96 | + if (!isset($entry['icon'])) { |
|
97 | + $entry['icon'] = ''; |
|
98 | + } |
|
99 | + if (!isset($entry['classes'])) { |
|
100 | + $entry['classes'] = ''; |
|
101 | + } |
|
102 | + if (!isset($entry['type'])) { |
|
103 | + $entry['type'] = 'link'; |
|
104 | + } |
|
105 | + $this->entries[$entry['id']] = $entry; |
|
106 | + } |
|
107 | 107 | |
108 | - /** |
|
109 | - * Get a list of navigation entries |
|
110 | - * |
|
111 | - * @param string $type type of the navigation entries |
|
112 | - * @return array |
|
113 | - */ |
|
114 | - public function getAll(string $type = 'link'): array { |
|
115 | - $this->init(); |
|
116 | - foreach ($this->closureEntries as $c) { |
|
117 | - $this->add($c()); |
|
118 | - } |
|
119 | - $this->closureEntries = []; |
|
108 | + /** |
|
109 | + * Get a list of navigation entries |
|
110 | + * |
|
111 | + * @param string $type type of the navigation entries |
|
112 | + * @return array |
|
113 | + */ |
|
114 | + public function getAll(string $type = 'link'): array { |
|
115 | + $this->init(); |
|
116 | + foreach ($this->closureEntries as $c) { |
|
117 | + $this->add($c()); |
|
118 | + } |
|
119 | + $this->closureEntries = []; |
|
120 | 120 | |
121 | - $result = $this->entries; |
|
122 | - if ($type !== 'all') { |
|
123 | - $result = array_filter($this->entries, function ($entry) use ($type) { |
|
124 | - return $entry['type'] === $type; |
|
125 | - }); |
|
126 | - } |
|
121 | + $result = $this->entries; |
|
122 | + if ($type !== 'all') { |
|
123 | + $result = array_filter($this->entries, function ($entry) use ($type) { |
|
124 | + return $entry['type'] === $type; |
|
125 | + }); |
|
126 | + } |
|
127 | 127 | |
128 | - return $this->proceedNavigation($result); |
|
129 | - } |
|
128 | + return $this->proceedNavigation($result); |
|
129 | + } |
|
130 | 130 | |
131 | - /** |
|
132 | - * Sort navigation entries by order, name and set active flag |
|
133 | - * |
|
134 | - * @param array $list |
|
135 | - * @return array |
|
136 | - */ |
|
137 | - private function proceedNavigation(array $list): array { |
|
138 | - uasort($list, function ($a, $b) { |
|
139 | - if (isset($a['order']) && isset($b['order'])) { |
|
140 | - return ($a['order'] < $b['order']) ? -1 : 1; |
|
141 | - } elseif (isset($a['order']) || isset($b['order'])) { |
|
142 | - return isset($a['order']) ? -1 : 1; |
|
143 | - } else { |
|
144 | - return ($a['name'] < $b['name']) ? -1 : 1; |
|
145 | - } |
|
146 | - }); |
|
131 | + /** |
|
132 | + * Sort navigation entries by order, name and set active flag |
|
133 | + * |
|
134 | + * @param array $list |
|
135 | + * @return array |
|
136 | + */ |
|
137 | + private function proceedNavigation(array $list): array { |
|
138 | + uasort($list, function ($a, $b) { |
|
139 | + if (isset($a['order']) && isset($b['order'])) { |
|
140 | + return ($a['order'] < $b['order']) ? -1 : 1; |
|
141 | + } elseif (isset($a['order']) || isset($b['order'])) { |
|
142 | + return isset($a['order']) ? -1 : 1; |
|
143 | + } else { |
|
144 | + return ($a['name'] < $b['name']) ? -1 : 1; |
|
145 | + } |
|
146 | + }); |
|
147 | 147 | |
148 | - $activeApp = $this->getActiveEntry(); |
|
149 | - if ($activeApp !== null) { |
|
150 | - foreach ($list as $index => &$navEntry) { |
|
151 | - if ($navEntry['id'] == $activeApp) { |
|
152 | - $navEntry['active'] = true; |
|
153 | - } else { |
|
154 | - $navEntry['active'] = false; |
|
155 | - } |
|
156 | - } |
|
157 | - unset($navEntry); |
|
158 | - } |
|
148 | + $activeApp = $this->getActiveEntry(); |
|
149 | + if ($activeApp !== null) { |
|
150 | + foreach ($list as $index => &$navEntry) { |
|
151 | + if ($navEntry['id'] == $activeApp) { |
|
152 | + $navEntry['active'] = true; |
|
153 | + } else { |
|
154 | + $navEntry['active'] = false; |
|
155 | + } |
|
156 | + } |
|
157 | + unset($navEntry); |
|
158 | + } |
|
159 | 159 | |
160 | - return $list; |
|
161 | - } |
|
160 | + return $list; |
|
161 | + } |
|
162 | 162 | |
163 | 163 | |
164 | - /** |
|
165 | - * removes all the entries |
|
166 | - */ |
|
167 | - public function clear($loadDefaultLinks = true) { |
|
168 | - $this->entries = []; |
|
169 | - $this->closureEntries = []; |
|
170 | - $this->init = !$loadDefaultLinks; |
|
171 | - } |
|
164 | + /** |
|
165 | + * removes all the entries |
|
166 | + */ |
|
167 | + public function clear($loadDefaultLinks = true) { |
|
168 | + $this->entries = []; |
|
169 | + $this->closureEntries = []; |
|
170 | + $this->init = !$loadDefaultLinks; |
|
171 | + } |
|
172 | 172 | |
173 | - /** |
|
174 | - * Sets the current navigation entry of the currently running app |
|
175 | - * @param string $id of the app entry to activate (from added $entry) |
|
176 | - */ |
|
177 | - public function setActiveEntry($id) { |
|
178 | - $this->activeEntry = $id; |
|
179 | - } |
|
173 | + /** |
|
174 | + * Sets the current navigation entry of the currently running app |
|
175 | + * @param string $id of the app entry to activate (from added $entry) |
|
176 | + */ |
|
177 | + public function setActiveEntry($id) { |
|
178 | + $this->activeEntry = $id; |
|
179 | + } |
|
180 | 180 | |
181 | - /** |
|
182 | - * gets the active Menu entry |
|
183 | - * @return string id or empty string |
|
184 | - * |
|
185 | - * This function returns the id of the active navigation entry (set by |
|
186 | - * setActiveEntry |
|
187 | - */ |
|
188 | - public function getActiveEntry() { |
|
189 | - return $this->activeEntry; |
|
190 | - } |
|
181 | + /** |
|
182 | + * gets the active Menu entry |
|
183 | + * @return string id or empty string |
|
184 | + * |
|
185 | + * This function returns the id of the active navigation entry (set by |
|
186 | + * setActiveEntry |
|
187 | + */ |
|
188 | + public function getActiveEntry() { |
|
189 | + return $this->activeEntry; |
|
190 | + } |
|
191 | 191 | |
192 | - private function init() { |
|
193 | - if ($this->init) { |
|
194 | - return; |
|
195 | - } |
|
196 | - $this->init = true; |
|
192 | + private function init() { |
|
193 | + if ($this->init) { |
|
194 | + return; |
|
195 | + } |
|
196 | + $this->init = true; |
|
197 | 197 | |
198 | - $l = $this->l10nFac->get('lib'); |
|
199 | - if ($this->config->getSystemValue('knowledgebaseenabled', true)) { |
|
200 | - $this->add([ |
|
201 | - 'type' => 'settings', |
|
202 | - 'id' => 'help', |
|
203 | - 'order' => 6, |
|
204 | - 'href' => $this->urlGenerator->linkToRoute('settings.Help.help'), |
|
205 | - 'name' => $l->t('Help'), |
|
206 | - 'icon' => $this->urlGenerator->imagePath('settings', 'help.svg'), |
|
207 | - ]); |
|
208 | - } |
|
198 | + $l = $this->l10nFac->get('lib'); |
|
199 | + if ($this->config->getSystemValue('knowledgebaseenabled', true)) { |
|
200 | + $this->add([ |
|
201 | + 'type' => 'settings', |
|
202 | + 'id' => 'help', |
|
203 | + 'order' => 6, |
|
204 | + 'href' => $this->urlGenerator->linkToRoute('settings.Help.help'), |
|
205 | + 'name' => $l->t('Help'), |
|
206 | + 'icon' => $this->urlGenerator->imagePath('settings', 'help.svg'), |
|
207 | + ]); |
|
208 | + } |
|
209 | 209 | |
210 | - if ($this->userSession->isLoggedIn()) { |
|
211 | - if ($this->isAdmin()) { |
|
212 | - // App management |
|
213 | - $this->add([ |
|
214 | - 'type' => 'settings', |
|
215 | - 'id' => 'core_apps', |
|
216 | - 'order' => 4, |
|
217 | - 'href' => $this->urlGenerator->linkToRoute('settings.AppSettings.viewApps'), |
|
218 | - 'icon' => $this->urlGenerator->imagePath('settings', 'apps.svg'), |
|
219 | - 'name' => $l->t('Apps'), |
|
220 | - ]); |
|
221 | - } |
|
210 | + if ($this->userSession->isLoggedIn()) { |
|
211 | + if ($this->isAdmin()) { |
|
212 | + // App management |
|
213 | + $this->add([ |
|
214 | + 'type' => 'settings', |
|
215 | + 'id' => 'core_apps', |
|
216 | + 'order' => 4, |
|
217 | + 'href' => $this->urlGenerator->linkToRoute('settings.AppSettings.viewApps'), |
|
218 | + 'icon' => $this->urlGenerator->imagePath('settings', 'apps.svg'), |
|
219 | + 'name' => $l->t('Apps'), |
|
220 | + ]); |
|
221 | + } |
|
222 | 222 | |
223 | - // Personal and (if applicable) admin settings |
|
224 | - $this->add([ |
|
225 | - 'type' => 'settings', |
|
226 | - 'id' => 'settings', |
|
227 | - 'order' => 2, |
|
228 | - 'href' => $this->urlGenerator->linkToRoute('settings.PersonalSettings.index'), |
|
229 | - 'name' => $l->t('Settings'), |
|
230 | - 'icon' => $this->urlGenerator->imagePath('settings', 'admin.svg'), |
|
231 | - ]); |
|
223 | + // Personal and (if applicable) admin settings |
|
224 | + $this->add([ |
|
225 | + 'type' => 'settings', |
|
226 | + 'id' => 'settings', |
|
227 | + 'order' => 2, |
|
228 | + 'href' => $this->urlGenerator->linkToRoute('settings.PersonalSettings.index'), |
|
229 | + 'name' => $l->t('Settings'), |
|
230 | + 'icon' => $this->urlGenerator->imagePath('settings', 'admin.svg'), |
|
231 | + ]); |
|
232 | 232 | |
233 | - $logoutUrl = \OC_User::getLogoutUrl($this->urlGenerator); |
|
234 | - if ($logoutUrl !== '') { |
|
235 | - // Logout |
|
236 | - $this->add([ |
|
237 | - 'type' => 'settings', |
|
238 | - 'id' => 'logout', |
|
239 | - 'order' => 99999, |
|
240 | - 'href' => $logoutUrl, |
|
241 | - 'name' => $l->t('Log out'), |
|
242 | - 'icon' => $this->urlGenerator->imagePath('core', 'actions/logout.svg'), |
|
243 | - ]); |
|
244 | - } |
|
233 | + $logoutUrl = \OC_User::getLogoutUrl($this->urlGenerator); |
|
234 | + if ($logoutUrl !== '') { |
|
235 | + // Logout |
|
236 | + $this->add([ |
|
237 | + 'type' => 'settings', |
|
238 | + 'id' => 'logout', |
|
239 | + 'order' => 99999, |
|
240 | + 'href' => $logoutUrl, |
|
241 | + 'name' => $l->t('Log out'), |
|
242 | + 'icon' => $this->urlGenerator->imagePath('core', 'actions/logout.svg'), |
|
243 | + ]); |
|
244 | + } |
|
245 | 245 | |
246 | - if ($this->isSubadmin()) { |
|
247 | - // User management |
|
248 | - $this->add([ |
|
249 | - 'type' => 'settings', |
|
250 | - 'id' => 'core_users', |
|
251 | - 'order' => 5, |
|
252 | - 'href' => $this->urlGenerator->linkToRoute('settings.Users.usersList'), |
|
253 | - 'name' => $l->t('Users'), |
|
254 | - 'icon' => $this->urlGenerator->imagePath('settings', 'users.svg'), |
|
255 | - ]); |
|
256 | - } |
|
257 | - } |
|
246 | + if ($this->isSubadmin()) { |
|
247 | + // User management |
|
248 | + $this->add([ |
|
249 | + 'type' => 'settings', |
|
250 | + 'id' => 'core_users', |
|
251 | + 'order' => 5, |
|
252 | + 'href' => $this->urlGenerator->linkToRoute('settings.Users.usersList'), |
|
253 | + 'name' => $l->t('Users'), |
|
254 | + 'icon' => $this->urlGenerator->imagePath('settings', 'users.svg'), |
|
255 | + ]); |
|
256 | + } |
|
257 | + } |
|
258 | 258 | |
259 | - if ($this->appManager === 'null') { |
|
260 | - return; |
|
261 | - } |
|
259 | + if ($this->appManager === 'null') { |
|
260 | + return; |
|
261 | + } |
|
262 | 262 | |
263 | - if ($this->userSession->isLoggedIn()) { |
|
264 | - $apps = $this->appManager->getEnabledAppsForUser($this->userSession->getUser()); |
|
265 | - } else { |
|
266 | - $apps = $this->appManager->getInstalledApps(); |
|
267 | - } |
|
263 | + if ($this->userSession->isLoggedIn()) { |
|
264 | + $apps = $this->appManager->getEnabledAppsForUser($this->userSession->getUser()); |
|
265 | + } else { |
|
266 | + $apps = $this->appManager->getInstalledApps(); |
|
267 | + } |
|
268 | 268 | |
269 | - foreach ($apps as $app) { |
|
270 | - if (!$this->userSession->isLoggedIn() && !$this->appManager->isEnabledForUser($app, $this->userSession->getUser())) { |
|
271 | - continue; |
|
272 | - } |
|
269 | + foreach ($apps as $app) { |
|
270 | + if (!$this->userSession->isLoggedIn() && !$this->appManager->isEnabledForUser($app, $this->userSession->getUser())) { |
|
271 | + continue; |
|
272 | + } |
|
273 | 273 | |
274 | - // load plugins and collections from info.xml |
|
275 | - $info = $this->appManager->getAppInfo($app); |
|
276 | - if (!isset($info['navigations']['navigation'])) { |
|
277 | - continue; |
|
278 | - } |
|
279 | - foreach ($info['navigations']['navigation'] as $key => $nav) { |
|
280 | - if (!isset($nav['name'])) { |
|
281 | - continue; |
|
282 | - } |
|
283 | - if (!isset($nav['route'])) { |
|
284 | - continue; |
|
285 | - } |
|
286 | - $role = isset($nav['@attributes']['role']) ? $nav['@attributes']['role'] : 'all'; |
|
287 | - if ($role === 'admin' && !$this->isAdmin()) { |
|
288 | - continue; |
|
289 | - } |
|
290 | - $l = $this->l10nFac->get($app); |
|
291 | - $id = $nav['id'] ?? $app . ($key === 0 ? '' : $key); |
|
292 | - $order = isset($nav['order']) ? $nav['order'] : 100; |
|
293 | - $type = isset($nav['type']) ? $nav['type'] : 'link'; |
|
294 | - $route = $nav['route'] !== '' ? $this->urlGenerator->linkToRoute($nav['route']) : ''; |
|
295 | - $icon = isset($nav['icon']) ? $nav['icon'] : 'app.svg'; |
|
296 | - foreach ([$icon, "$app.svg"] as $i) { |
|
297 | - try { |
|
298 | - $icon = $this->urlGenerator->imagePath($app, $i); |
|
299 | - break; |
|
300 | - } catch (\RuntimeException $ex) { |
|
301 | - // no icon? - ignore it then |
|
302 | - } |
|
303 | - } |
|
304 | - if ($icon === null) { |
|
305 | - $icon = $this->urlGenerator->imagePath('core', 'default-app-icon'); |
|
306 | - } |
|
274 | + // load plugins and collections from info.xml |
|
275 | + $info = $this->appManager->getAppInfo($app); |
|
276 | + if (!isset($info['navigations']['navigation'])) { |
|
277 | + continue; |
|
278 | + } |
|
279 | + foreach ($info['navigations']['navigation'] as $key => $nav) { |
|
280 | + if (!isset($nav['name'])) { |
|
281 | + continue; |
|
282 | + } |
|
283 | + if (!isset($nav['route'])) { |
|
284 | + continue; |
|
285 | + } |
|
286 | + $role = isset($nav['@attributes']['role']) ? $nav['@attributes']['role'] : 'all'; |
|
287 | + if ($role === 'admin' && !$this->isAdmin()) { |
|
288 | + continue; |
|
289 | + } |
|
290 | + $l = $this->l10nFac->get($app); |
|
291 | + $id = $nav['id'] ?? $app . ($key === 0 ? '' : $key); |
|
292 | + $order = isset($nav['order']) ? $nav['order'] : 100; |
|
293 | + $type = isset($nav['type']) ? $nav['type'] : 'link'; |
|
294 | + $route = $nav['route'] !== '' ? $this->urlGenerator->linkToRoute($nav['route']) : ''; |
|
295 | + $icon = isset($nav['icon']) ? $nav['icon'] : 'app.svg'; |
|
296 | + foreach ([$icon, "$app.svg"] as $i) { |
|
297 | + try { |
|
298 | + $icon = $this->urlGenerator->imagePath($app, $i); |
|
299 | + break; |
|
300 | + } catch (\RuntimeException $ex) { |
|
301 | + // no icon? - ignore it then |
|
302 | + } |
|
303 | + } |
|
304 | + if ($icon === null) { |
|
305 | + $icon = $this->urlGenerator->imagePath('core', 'default-app-icon'); |
|
306 | + } |
|
307 | 307 | |
308 | - $this->add([ |
|
309 | - 'id' => $id, |
|
310 | - 'order' => $order, |
|
311 | - 'href' => $route, |
|
312 | - 'icon' => $icon, |
|
313 | - 'type' => $type, |
|
314 | - 'name' => $l->t($nav['name']), |
|
315 | - ]); |
|
316 | - } |
|
317 | - } |
|
318 | - } |
|
308 | + $this->add([ |
|
309 | + 'id' => $id, |
|
310 | + 'order' => $order, |
|
311 | + 'href' => $route, |
|
312 | + 'icon' => $icon, |
|
313 | + 'type' => $type, |
|
314 | + 'name' => $l->t($nav['name']), |
|
315 | + ]); |
|
316 | + } |
|
317 | + } |
|
318 | + } |
|
319 | 319 | |
320 | - private function isAdmin() { |
|
321 | - $user = $this->userSession->getUser(); |
|
322 | - if ($user !== null) { |
|
323 | - return $this->groupManager->isAdmin($user->getUID()); |
|
324 | - } |
|
325 | - return false; |
|
326 | - } |
|
320 | + private function isAdmin() { |
|
321 | + $user = $this->userSession->getUser(); |
|
322 | + if ($user !== null) { |
|
323 | + return $this->groupManager->isAdmin($user->getUID()); |
|
324 | + } |
|
325 | + return false; |
|
326 | + } |
|
327 | 327 | |
328 | - private function isSubadmin() { |
|
329 | - $user = $this->userSession->getUser(); |
|
330 | - if ($user !== null) { |
|
331 | - return $this->groupManager->getSubAdmin()->isSubAdmin($user); |
|
332 | - } |
|
333 | - return false; |
|
334 | - } |
|
328 | + private function isSubadmin() { |
|
329 | + $user = $this->userSession->getUser(); |
|
330 | + if ($user !== null) { |
|
331 | + return $this->groupManager->getSubAdmin()->isSubAdmin($user); |
|
332 | + } |
|
333 | + return false; |
|
334 | + } |
|
335 | 335 | } |
@@ -33,69 +33,69 @@ |
||
33 | 33 | */ |
34 | 34 | class UserLiveStatusEvent extends Event { |
35 | 35 | |
36 | - /** |
|
37 | - * @var string |
|
38 | - * @since 20.0.0 |
|
39 | - */ |
|
40 | - public const STATUS_ONLINE = 'online'; |
|
36 | + /** |
|
37 | + * @var string |
|
38 | + * @since 20.0.0 |
|
39 | + */ |
|
40 | + public const STATUS_ONLINE = 'online'; |
|
41 | 41 | |
42 | - /** |
|
43 | - * @var string |
|
44 | - * @since 20.0.0 |
|
45 | - */ |
|
46 | - public const STATUS_AWAY = 'away'; |
|
42 | + /** |
|
43 | + * @var string |
|
44 | + * @since 20.0.0 |
|
45 | + */ |
|
46 | + public const STATUS_AWAY = 'away'; |
|
47 | 47 | |
48 | - /** |
|
49 | - * @var string |
|
50 | - * @since 20.0.0 |
|
51 | - */ |
|
52 | - public const STATUS_OFFLINE = 'offline'; |
|
48 | + /** |
|
49 | + * @var string |
|
50 | + * @since 20.0.0 |
|
51 | + */ |
|
52 | + public const STATUS_OFFLINE = 'offline'; |
|
53 | 53 | |
54 | - /** @var IUser */ |
|
55 | - private $user; |
|
54 | + /** @var IUser */ |
|
55 | + private $user; |
|
56 | 56 | |
57 | - /** @var string */ |
|
58 | - private $status; |
|
57 | + /** @var string */ |
|
58 | + private $status; |
|
59 | 59 | |
60 | - /** @var int */ |
|
61 | - private $timestamp; |
|
60 | + /** @var int */ |
|
61 | + private $timestamp; |
|
62 | 62 | |
63 | - /** |
|
64 | - * @param IUser $user |
|
65 | - * @param string $status |
|
66 | - * @param int $timestamp |
|
67 | - * @since 20.0.0 |
|
68 | - */ |
|
69 | - public function __construct(IUser $user, |
|
70 | - string $status, |
|
71 | - int $timestamp) { |
|
72 | - parent::__construct(); |
|
73 | - $this->user = $user; |
|
74 | - $this->status = $status; |
|
75 | - $this->timestamp = $timestamp; |
|
76 | - } |
|
63 | + /** |
|
64 | + * @param IUser $user |
|
65 | + * @param string $status |
|
66 | + * @param int $timestamp |
|
67 | + * @since 20.0.0 |
|
68 | + */ |
|
69 | + public function __construct(IUser $user, |
|
70 | + string $status, |
|
71 | + int $timestamp) { |
|
72 | + parent::__construct(); |
|
73 | + $this->user = $user; |
|
74 | + $this->status = $status; |
|
75 | + $this->timestamp = $timestamp; |
|
76 | + } |
|
77 | 77 | |
78 | - /** |
|
79 | - * @return IUser |
|
80 | - * @since 20.0.0 |
|
81 | - */ |
|
82 | - public function getUser(): IUser { |
|
83 | - return $this->user; |
|
84 | - } |
|
78 | + /** |
|
79 | + * @return IUser |
|
80 | + * @since 20.0.0 |
|
81 | + */ |
|
82 | + public function getUser(): IUser { |
|
83 | + return $this->user; |
|
84 | + } |
|
85 | 85 | |
86 | - /** |
|
87 | - * @return string |
|
88 | - * @since 20.0.0 |
|
89 | - */ |
|
90 | - public function getStatus(): string { |
|
91 | - return $this->status; |
|
92 | - } |
|
86 | + /** |
|
87 | + * @return string |
|
88 | + * @since 20.0.0 |
|
89 | + */ |
|
90 | + public function getStatus(): string { |
|
91 | + return $this->status; |
|
92 | + } |
|
93 | 93 | |
94 | - /** |
|
95 | - * @return int |
|
96 | - * @since 20.0.0 |
|
97 | - */ |
|
98 | - public function getTimestamp(): int { |
|
99 | - return $this->timestamp; |
|
100 | - } |
|
94 | + /** |
|
95 | + * @return int |
|
96 | + * @since 20.0.0 |
|
97 | + */ |
|
98 | + public function getTimestamp(): int { |
|
99 | + return $this->timestamp; |
|
100 | + } |
|
101 | 101 | } |