All checks were successful
PHPUnit SQLite / versions (pull_request) Successful in 4s
PHPUnit SQLite / changes (pull_request) Successful in 1s
Lint info.xml / info.xml lint (pull_request) Successful in 3s
PHP / versions (pull_request) Successful in 5s
Static analysis / versions (pull_request) Successful in 3s
REUSE Compliance Check / reuse-compliance-check (pull_request) Successful in 3s
Node / NPM (pull_request) Successful in 21s
PHP / PHP 8.5 (8.5) (pull_request) Successful in 54s
PHP / PHP 8.2 (8.2) (pull_request) Successful in 2m16s
PHPUnit SQLite / SQLite PHP 8.5 Nextcloud master (8.5, master) (pull_request) Successful in 2m27s
PHPUnit SQLite / phpunit-sqlite-summary (pull_request) Successful in 1s
Static analysis / static-psalm-analysis dev-stable34 (dev-stable34, 8.5) (pull_request) Successful in 1m48s
Static analysis / static-psalm-analysis dev-stable33 (dev-stable33, 8.5) (pull_request) Successful in 2m30s
Static analysis / static-psalm-analysis dev-master (dev-master, 8.5) (pull_request) Successful in 2m49s
Static analysis / static-psalm-analysis-summary (pull_request) Successful in 1s
Signed-off-by: Lukas Schaefer <lukas@lschaefer.xyz>
41 lines
1.2 KiB
PHP
41 lines
1.2 KiB
PHP
<?php
|
|
|
|
declare(strict_types=1);
|
|
|
|
/**
|
|
* SPDX-FileCopyrightText: 2026 Lukas Schaefer
|
|
* SPDX-License-Identifier: AGPL-3.0-or-later
|
|
*/
|
|
|
|
namespace OCA\Shortcuts\AppInfo;
|
|
|
|
use OCA\Files\Event\LoadAdditionalScriptsEvent;
|
|
use OCA\Shortcuts\Listener\LoadAdditionalScriptsListener;
|
|
use OCA\Shortcuts\Service\MimeTypeLoader;
|
|
use OCP\AppFramework\App;
|
|
use OCP\AppFramework\Bootstrap\IBootContext;
|
|
use OCP\AppFramework\Bootstrap\IBootstrap;
|
|
use OCP\AppFramework\Bootstrap\IRegistrationContext;
|
|
|
|
class Application extends App implements IBootstrap {
|
|
public const APP_ID = 'shortcuts';
|
|
public const SHORTCUT_EXTENSION = 'nextcloudshortcut';
|
|
public const SHORTCUT_MIME = 'application/x-nextcloud-shortcut';
|
|
|
|
/** @psalm-suppress PossiblyUnusedMethod */
|
|
public function __construct() {
|
|
parent::__construct(self::APP_ID);
|
|
}
|
|
|
|
#[\Override]
|
|
public function register(IRegistrationContext $context): void {
|
|
$context->registerEventListener(LoadAdditionalScriptsEvent::class, LoadAdditionalScriptsListener::class);
|
|
}
|
|
|
|
#[\Override]
|
|
public function boot(IBootContext $context): void {
|
|
$context->injectFn(function (MimeTypeLoader $mimeTypeLoader): void {
|
|
$mimeTypeLoader->register();
|
|
});
|
|
}
|
|
}
|