MediaWiki REL1_28
Go to the documentation of this file.
37 public $sink;
47 function __construct( &$sink ) {
48 $this->sink =& $sink;
49 }
54 function writeOpenStream( $string ) {
55 $this->sink->writeOpenStream( $string );
56 }
61 function writeCloseStream( $string ) {
62 $this->sink->writeCloseStream( $string );
63 }
69 function writeOpenPage( $page, $string ) {
70 $this->sendingThisPage = $this->pass( $page, $string );
71 if ( $this->sendingThisPage ) {
72 $this->sink->writeOpenPage( $page, $string );
73 }
74 }
79 function writeClosePage( $string ) {
80 if ( $this->sendingThisPage ) {
81 $this->sink->writeClosePage( $string );
82 $this->sendingThisPage = false;
83 }
84 }
90 function writeRevision( $rev, $string ) {
91 if ( $this->sendingThisPage ) {
92 $this->sink->writeRevision( $rev, $string );
93 }
94 }
100 function writeLogItem( $rev, $string ) {
101 $this->sink->writeRevision( $rev, $string );
102 }
107 function closeRenameAndReopen( $newname ) {
108 $this->sink->closeRenameAndReopen( $newname );
109 }
115 function closeAndRename( $newname, $open = false ) {
116 $this->sink->closeAndRename( $newname, $open );
117 }
122 function getFilenames() {
123 return $this->sink->getFilenames();
124 }
131 function pass( $page ) {
132 return true;
133 }
writeCloseStream( $string)
writeLogItem( $rev, $string)
bool $sendingThisPage
closeAndRename( $newname, $open=false)
writeOpenPage( $page, $string)
DumpOutput $sink
FIXME will need to be made protected whenever legacy code is updated.
writeRevision( $rev, $string)
closeRenameAndReopen( $newname)
pass( $page)
Override for page-based filter types.
writeClosePage( $string)
writeOpenStream( $string)
namespace are movable Hooks may change this value to override the return value of MWNamespace::isMovable(). 'NewDifferenceEngine' do that in ParserLimitReportFormat instead use this to modify the parameters of the image and a DIV can begin in one section and end in another Make sure your code can handle that case gracefully See the EditSectionClearerLink extension for an example zero but section is usually empty its values are the globals values before the output is cached $page
Definition hooks.txt:2534
presenting them properly to the user as errors is done by the caller return true use this to change the list i e etc $rev
Definition hooks.txt:1734
injection txt This is an overview of how MediaWiki makes use of dependency injection The design described here grew from the discussion of RFC T384 The term dependency this means that anything an object needs to operate should be injected from the the object itself should only know narrow no concrete implementation of the logic it relies on The requirement to inject everything typically results in an architecture that based on two main types of and essentially stateless service objects that use other service objects to operate on the value objects As of the beginning MediaWiki is only starting to use the DI approach Much of the code still relies on global state or direct resulting in a highly cyclical dependency which acts as the top level factory for services in MediaWiki which can be used to gain access to default instances of various services MediaWikiServices however also allows new services to be defined and default services to be redefined Services are defined or redefined by providing a callback the instantiator that will return a new instance of the service When it will create an instance of MediaWikiServices and populate it with the services defined in the files listed by thereby bootstrapping the DI framework Per $wgServiceWiringFiles lists includes ServiceWiring php
Definition injection.txt:37