Update bootstrap.rst

Fix syntax and errors.

Signed-off-by: HouraisanNEET <>
This commit is contained in:
HouraisanNEET 2021-04-09 16:23:01 +08:00 committed by backportbot[bot]
parent 852a48140a
commit 1fe577be62

View File

@ -52,19 +52,24 @@ The class **must** extend ``OCP\AppFramework\App`` and may optionally implement
namespace OCA\MyApp\AppInfo;
use OCA\MyApp\Listeners\UserDeletedListener;
use OCA\MyApp\Notifications\Notifier;
use OCA\MyApp\Notification\Notifier;
use OCP\AppFramework\App;
use OCP\AppFramework\Bootstrap\IBootContext;
use OCP\AppFramework\Bootstrap\IBootstrap;
use OCP\Notification\IManager;
use OCP\AppFramework\Bootstrap\IRegistrationContext;
use OCP\User\Events;
class Application extends App implements IBootstrap {
public function __construct() {
parent::__construct('myapp');
}
public function register(IRegistrationContext $context): void {
// ... registration logic goes here ...
// Register the composer autoloader for packages shipped by this app, if applicable
include_once __DIR__ . '/../../vendor/autoload.php'
@include_once __DIR__ . '/../../vendor/autoload.php';
$context->registerEventListener(
BeforeUserDeletedEvent::class,