Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 7 additions & 1 deletion developer_manual/app_development/bootstrap.rst
Original file line number Diff line number Diff line change
Expand Up @@ -63,6 +63,9 @@ The class **must** extend ``OCP\AppFramework\App`` and it may optionally impleme
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'

$context->registerEventListener(
BeforeUserDeletedEvent::class,
UserDeletedListener::class
Expand Down Expand Up @@ -121,7 +124,7 @@ app.php (deprecated)
--------------------

Nextcloud will ``require_once`` every installed and enabled app's ``appinfo/app.php`` file if it exists. The app can use
this file to run registrations of services, event listeners and similar.
this file to run registrations of autoloaders, services, event listeners and similar.

To leverage the advantages of object-oriented programming, it's recommended to put the logic into an :ref:`Application<application-php>`
class and query an instance like
Expand All @@ -132,4 +135,7 @@ class and query an instance like

declare(strict_types=1);

// Register the composer autoloader for packages shipped by this app, if applicable
@include_once __DIR__ . '/../vendor/autoload.php'

$app = \OC::$server->query(\OCA\MyApp\AppInfo\Application::class);