Skip to content

Commit 3bc96e8

Browse files
committed
Make context fallback more explicit
1 parent 223ac2a commit 3bc96e8

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

README.md

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -109,7 +109,9 @@ $theme = service('setting')->get('App.theme', $context);
109109
setting()->get('App.theme', $context);
110110
```
111111

112-
If that context is not found the library falls back to the general value, i.e. `service('setting')->get('App.theme')`
112+
Contexts are a cascading check, so if a context does not match a value it will fall back on general,
113+
i.e. `service('setting')->get('App.theme')`. Return value priority is as follows:
114+
"Setting with a context > Setting without context > Config value > null".
113115

114116
### Using the Helper
115117

0 commit comments

Comments
 (0)