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

45 lines
1.0 KiB
PHP
Raw Normal View History

2023-06-16 19:31:46 +00:00
<?php
/**
2023-08-02 20:04:03 +00:00
* ownCloud - Epubreader App.
2023-06-16 19:31:46 +00:00
*
* @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-08-02 20:04:03 +00:00
class Application extends App
{
2023-06-16 19:31:46 +00:00
public const APP_ID = 'epubreader';
2023-08-02 20:04:03 +00:00
public function __construct()
{
2023-06-16 19:31:46 +00:00
parent::__construct(self::APP_ID);
2023-06-17 11:09:00 +00:00
/** @psalm-suppress DeprecatedInterface */
$container = $this->getContainer();
2023-08-02 20:04:03 +00:00
2023-06-17 22:08:38 +00:00
/** @var IRootFolder $rootFolder */
$rootFolder = $container->get(IRootFolder::class);
2023-08-02 20:04:03 +00:00
2023-06-17 22:08:38 +00:00
/** @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
}
}