Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add an example to add additional service #4

Open
tfirdaus opened this issue Sep 21, 2024 · 0 comments
Open

Add an example to add additional service #4

tfirdaus opened this issue Sep 21, 2024 · 0 comments
Labels
docs Improving or adding to the documentation. enhancement A new feature or request. php Related to PHP codebase.

Comments

@tfirdaus
Copy link
Member

Provide an example on how to install new service in the DI Container. It's kind of the way like the Laravel and Symfony provider works where user can drop in reference to the class in an array and developers can use functions, methods, or pull the service from the container on their plugin.

<?php

return [
	\PluginName\Vendor\Codex\Providers\SettingsProvider::class,
	\PluginName\Vendor\Codex\Providers\AssetsServiceProvider::class,
	\PluginName\Vendor\Codex\Providers\AkismetServiceProvider::class,
];

Reference

@tfirdaus tfirdaus added enhancement A new feature or request. docs Improving or adding to the documentation. php Related to PHP codebase. labels Sep 21, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
docs Improving or adding to the documentation. enhancement A new feature or request. php Related to PHP codebase.
Projects
None yet
Development

No branches or pull requests

1 participant