MediaWiki  master
Go to the documentation of this file.
1 <?php
3 namespace MediaWiki\Tidy;
34  public $wrapBaseNode;
52  public $isPWrapper = false;
61  public $isSplittable = false;
67  public $needsPWrapping = false;
73  public $nonblankNodeCount = 0;
75  public function __set( $name, $value ) {
76  throw new \Exception( "Cannot set property \"$name\"" );
77  }
85  public function dump() {
86  $parts = [];
88  if ( $this->childPElement ) {
89  $parts[] = 'childPElement=' . $this->childPElement->getDebugTag();
90  }
91  if ( $this->ancestorPNode ) {
92  $parts[] = "ancestorPNode=<{$this->ancestorPNode->name}>";
93  }
94  if ( $this->wrapBaseNode ) {
95  $parts[] = "wrapBaseNode=<{$this->wrapBaseNode->name}>";
96  }
97  if ( $this->currentCloneElement ) {
98  $parts[] = "currentCloneElement=" . $this->currentCloneElement->getDebugTag();
99  }
100  if ( $this->isPWrapper ) {
101  $parts[] = 'isPWrapper';
102  }
103  if ( $this->isSplittable ) {
104  $parts[] = 'isSplittable';
105  }
106  if ( $this->needsPWrapping ) {
107  $parts[] = 'needsPWrapping';
108  }
109  if ( $this->nonblankNodeCount ) {
110  $parts[] = "nonblankNodeCount={$this->nonblankNodeCount}";
111  }
112  $s = "RemexMungerData {\n";
113  foreach ( $parts as $part ) {
114  $s .= " $part\n";
115  }
116  $s .= "}\n";
117  return $s;
118  }
119 }
The number of child nodes, not counting whitespace-only text nodes or comments.
bool $isSplittable
Is the node splittable, i.e.
RemexHtml Serializer SerializerNode null $ancestorPNode
This tracks the mw:p-wrap node in the Serializer stack which is an ancestor of this node...
bool $isPWrapper
Is the node a p-wrapper, with name mw:p-wrap?
This document is intended to provide useful advice for parties seeking to redistribute MediaWiki to end users It s targeted particularly at maintainers for Linux since it s been observed that distribution packages of MediaWiki often break We ve consistently had to recommend that users seeking support use official tarballs instead of their distribution s and this often solves whatever problem the user is having It would be nice if this could such as
Definition: distributors.txt:9
Get a text representation of the current state of the serializer, for debugging.
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:35
RemexHtml TreeBuilder Element null $currentCloneElement
Stack splitting (essentially our idea of AFE reconstruction) can clone formatting elements which are ...
RemexHtml Serializer SerializerNode null $wrapBaseNode
The wrap base node is the body or blockquote node which is the parent of active p-wrappers.
Allows to change the fields on the form that will be generated $name
Definition: hooks.txt:271
RemexHtml TreeBuilder Element null $childPElement
The Element for the mw:p-wrap which is a child of the current node.
This is true if the node is a body or blockquote, which activates p-wrapping of child nodes...