Manual:IContextSource.php
Appearance
| MediaWiki ファイル: IContextSource.php | |
|---|---|
| 場所: | includes/context/ (1.46 以降は includes/Context/) |
| ソース コード: | master • 1.45.3 • 1.44.5 • 1.43.8 |
| クラス: | MediaWiki\Context\IContextSource |
IContextSource.php file contains the IContextSource interface, for objects which can provide a context on request.
例
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
}