76 if ( array_key_exists( $i, $this->closing ) ) {
77 return $this->closing[$i];
82 abstract public function reverse();
88 return $this->orig ? count( $this->orig ) : 0;
95 return $this->closing ? count( $this->closing ) : 0;
121 return new DiffOpCopy( $this->closing, $this->orig );
137 $this->closing =
false;
225 $this->
edits = $eng->diff( $from_lines, $to_lines );
250 foreach ( $this->
edits as $edit ) {
251 $rev->edits[] = $edit->reverse();
263 foreach ( $this->
edits as $edit ) {
264 if ( $edit->type !=
'copy' ) {
281 foreach ( $this->
edits as $edit ) {
282 if ( $edit->type ==
'copy' ) {
283 $lcs += count( $edit->orig );
301 foreach ( $this->
edits as $edit ) {
303 array_splice(
$lines, count(
$lines ), 0, $edit->orig );
321 foreach ( $this->
edits as $edit ) {
322 if ( $edit->closing ) {
323 array_splice(
$lines, count(
$lines ), 0, $edit->closing );
closing()
Get the closing set of lines.
The base class for all other DiffOp classes.
__construct($from_lines, $to_lines)
Constructor.
reverse()
Compute reversed Diff.
lcs()
Compute the length of the Longest Common Subsequence (LCS).
__construct($orig, $closing)
orig()
Get the original set of lines.
isEmpty()
Check for empty diff.
Class representing a 'diff' between two sequences of strings.
deferred txt A few of the database updates required by various functions here can be deferred until after the result page is displayed to the user For updating the view updating the linked to tables after a etc PHP does not yet have any way to tell the server to actually return and disconnect while still running these but it might have such a feature in the future We handle these by creating a deferred update object and putting those objects on a global then executing the whole list after the page is displayed We don t do anything smart like collating updates to the same table or such because the list is almost always going to have just one item on if so it s not worth the trouble Since there is a job queue in the jobs which is used to update link tables of transcluding pages after edits
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
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
This diff implementation is mainly lifted from the LCS algorithm of the Eclipse project which in turn...
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
__construct($orig, $closing=false)
setBailoutComplexity($value)
Sets the complexity (in comparison operations) that can't be exceeded.
int $bailoutComplexity
If this diff complexity is exceeded, a ComplexityException is thrown 0 means no limit.