Skip to content

Commit

Permalink
clarity
Browse files Browse the repository at this point in the history
  • Loading branch information
johnwatkins0 committed Jun 12, 2023
1 parent e7165c7 commit d7e5135
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions DEVELOPMENT.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ This file includes details for developers contributing to this code base.
This package follows a simple dependency-injection pattern. There are two types of components within this pattern. Both are registered in [the Plugin class](/includes/classes/Plugin.php).

1. Modules: Modules are loaded on every execution. They implement the `Module` interface and include a `register` method that performs setup actions. The `register` method is called automatically when the module is instantiated.
2. Services: Services are loaded when they are declared as dependencies for Modules and other Services. They implement the `Service` interface, but if a service should only be instantiated once and shared throughout the system, it should instead implement the `SharedService` interace.
2. Services: Services are loaded when they are declared as dependencies for Modules and other Services. They implement the `Service` interface, but if a service should only be instantiated once and shared throughout the system, it should instead implement the `SharedService` interface.

### Declaring Dependencies

Expand Down Expand Up @@ -37,7 +37,7 @@ class MyModule implements Module {
}
```

A dependency can also be an interface. The system only allows one implementation of an interface to be registered at a time. For example:
A dependency can also be an interface. The system only allows one implementation of an interface to be registered at a time and will automatically detect the registered service class that implements that interface. For example:

```PHP
interface MyInterface {
Expand Down

0 comments on commit d7e5135

Please sign in to comment.