Jump to content

Příručka:IContextSource.php

From mediawiki.org
Revision as of 09:21, 2 November 2025 by Rebulka (talk | contribs) (Created page with "Příručka:IContextSource.php")
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)

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
}

Implemented by