Skip to content

Commit

Permalink
Adding spider food for SEO purposes
Browse files Browse the repository at this point in the history
Adding the information about more advanced configuration syntax for `Injector` for the purpose of more easily finding documentation regarding use of percent and dollar signs (particularly when encountered in YAML configs, albeit it’s not restricted only to YAML configs).

> References are denoted by by using a percent and dollar sign, like in the  YAML configuration example below.

Right now at the time of writing, it’s pretty difficult to surface information about this mysterious syntax by googling searches like “silverstripe percent dollar sign config” and may be confusing to beginners who are encountering this syntax in existing projects. 😊 I know it would have helped me!
  • Loading branch information
patricknelson committed Aug 22, 2021
1 parent 92f47da commit f80ba99
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion docs/en/02_Developer_Guides/05_Extending/05_Injector.md
Original file line number Diff line number Diff line change
Expand Up @@ -276,7 +276,8 @@ By default, services registered with Injector do not inherit from one another; T
named services, which may not be actual classes, and thus should not behave as though they were.

Thus if you want an object to have the injected dependencies of a service of another name, you must
assign a reference to that service.
assign a reference to that service. References are denoted by by using a percent and dollar sign, like in the
YAML configuration example below.

```yaml
SilverStripe\Core\Injector\Injector:
Expand Down

0 comments on commit f80ba99

Please sign in to comment.