Jump to content
MediaWiki

Manual:IContextSource.php

From mediawiki.org
MediaWiki file: IContextSource.php
Location: includes/context/
Source code: master1.44.21.43.51.39.15
Classes: MediaWiki\Context\IContextSource

IContextSource.php file contains the IContextSource interface, for objects which can provide a context on request.

Example

[edit ]

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
}

Implemented by

[edit ]

AltStyle によって変換されたページ (->オリジナル) /