This repository has been archived on 2024-01-19. You can view files and clone it, but cannot push or open issues or pull requests.
epubreader/lib/AppInfo/Application.php

42 lines
1023 B
PHP
Raw Normal View History

2023-06-16 19:31:46 +00:00
<?php
/**
* ownCloud - Epubreader App
*
* @author Frank de Lange
* @copyright 2015 - 2017 Frank de Lange
*
* This file is licensed under the Affero General Public License version 3 or
* later.
*/
namespace OCA\Epubreader\AppInfo;
use OCA\Epubreader\Hooks;
use OCP\AppFramework\App;
2023-06-17 11:09:00 +00:00
use OCP\Files\IRootFolder;
use OCP\IDBConnection;
2023-06-16 19:31:46 +00:00
use OCP\Util;
2023-06-17 11:09:00 +00:00
class Application extends App {
2023-06-16 19:31:46 +00:00
public const APP_ID = 'epubreader';
public function __construct() {
parent::__construct(self::APP_ID);
2023-06-17 11:09:00 +00:00
/** @psalm-suppress DeprecatedInterface */
$container = $this->getContainer();
2023-06-17 22:08:38 +00:00
/** @var IRootFolder $rootFolder */
$rootFolder = $container->get(IRootFolder::class);
/** @var IDBConnection $dbConnection */
$dbConnection = $container->get(IDBConnection::class);
$hooks = new Hooks($rootFolder, $dbConnection);
2023-06-17 11:09:00 +00:00
$hooks->register();
2023-06-16 22:07:40 +00:00
/** @psalm-suppress DeprecatedMethod */
Util::connectHook('\OCP\Config', 'js', 'OCA\Epubreader\Hooks', 'announce_settings');
2023-06-17 11:09:00 +00:00
Util::addscript(self::APP_ID, 'plugin');
2023-06-16 19:31:46 +00:00
}
}