use OCP\AppFramework\Bootstrap\IBootContext;
use OCP\AppFramework\Bootstrap\IBootstrap;
use OCP\AppFramework\Bootstrap\IRegistrationContext;
-use OCP\ILogger;
-use OCP\IServerContainer;
+use Psr\Container\ContainerInterface;
+use Psr\Log\LoggerInterface;
class Application extends App implements IBootstrap {
public const APP_ID = 'files_trashbin';
\OCP\Util::connectHook('OC_Filesystem', 'delete', 'OCA\Files_Trashbin\Trashbin', 'ensureFileScannedHook');
}
- public function registerTrashBackends(IServerContainer $serverContainer, ILogger $logger, IAppManager $appManager, ITrashManager $trashManager) {
+ public function registerTrashBackends(ContainerInterface $serverContainer, LoggerInterface $logger, IAppManager $appManager, ITrashManager $trashManager): void {
foreach ($appManager->getInstalledApps() as $app) {
$appInfo = $appManager->getAppInfo($app);
if (isset($appInfo['trash'])) {
$for = $backend['@attributes']['for'];
try {
- $backendObject = $serverContainer->query($class);
+ $backendObject = $serverContainer->get($class);
$trashManager->registerBackend($for, $backendObject);
} catch (\Exception $e) {
- $logger->logException($e);
+ $logger->error($e->getMessage(), ['exception' => $e]);
}
}
}