Podręcznik:IContextSource.php
Appearance
| Plik MediaWiki: IContextSource.php | |
|---|---|
| Lokalizacja: | includes/context/ (includes/Context/ in 1.46 or later) |
| Kod źródłowy: | master • 1.45.1 • 1.44.3 • 1.43.6 |
| Klasy: | MediaWiki\Context\IContextSource |
Plik IContextSource.php zawiera interfejs IContextSource dla obiektów, które mogą zapewnić kontekst na życzenie.
Example
You may want to access IContextSource if you are writing an API which uses type hinting in the arguments or makes instanceof checks:
if ( $arg instanceof IContextSource ) {
// Treat $arg as a context object
}
function foo( IContextSource $context ) {
// Use $context as the request context
}