MediaWiki  1.28.1
Go to the documentation of this file.
1 <?php
24 require_once __DIR__ . '/../Maintenance.php';
34  public function __construct() {
35  parent::__construct();
36  $this->addDescription( 'Generate the normalizer data file for Malayalam' );
37  }
39  public function getDbType() {
40  return Maintenance::DB_NONE;
41  }
43  public function execute() {
44  $hexPairs = [
45  # From
46  '0D23 0D4D 200D' => '0D7A',
47  '0D28 0D4D 200D' => '0D7B',
48  '0D30 0D4D 200D' => '0D7C',
49  '0D32 0D4D 200D' => '0D7D',
50  '0D33 0D4D 200D' => '0D7E',
52  # From
53  '0D15 0D4D 200D' => '0D7F',
54  ];
56  $pairs = [];
57  foreach ( $hexPairs as $hexSource => $hexDest ) {
59  $dest = UtfNormal\Utils::hexSequenceToUtf8( $hexDest );
60  $pairs[$source] = $dest;
61  }
63  global $IP;
64  file_put_contents( "$IP/serialized/normalize-ml.ser", serialize( $pairs ) );
65  echo "ml: " . count( $pairs ) . " pairs written.\n";
66  }
67 }
69 $maintClass = 'GenerateNormalizerDataMl';
70 require_once RUN_MAINTENANCE_IF_MAIN;
const DB_NONE
Constants for DB access type.
Definition: Maintenance.php:57
Definition: WebStart.php:58
Abstract maintenance class for quickly writing and churning out maintenance scripts with minimal effo...
Definition: maintenance.txt:39
Definition: maintenance.txt:50
when a variable name is used in a it is silently declared as a new local masking the global
Definition: design.txt:93
Set the description text.
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
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
Definition: ApiMessage.php:94
Take a series of space-separated hexadecimal numbers representing Unicode code points and return a UT...
Generates the normalizer data file for Malayalam.