Manual:IContextSource.php
Appearance
Arquivo MediaWiki: IContextSource.php | |
---|---|
Local: | includes/context/ |
Código fonte: | master • 1.43.0 • 1.42.4 • 1.39.11 |
Classes: | MediaWiki\Context\IContextSource |
O arquivo IContextSource.php contém a interface IContextSource
, para objetos que podem fornecer um contexto no pedido.
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
}