Handbuch:IContextSource.php
Appearance
MediaWiki-Datei: IContextSource.php | |
---|---|
Speicherort: | includes/context/ |
Quellcode: | master • 1.42.3 • 1.41.4 • 1.39.10 |
Klassen: | IContextSource |
IContextSource.php file contains the IContextSource
interface, for objects which can provide a context on request.
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
}