MediaWiki master
MediaWiki\Settings\Config\MergeStrategy Class Reference

Public Member Functions

 getName ()
 
 merge (array $destination, array $source)
 Merge $source into $destination.
 
 reverse ()
 Create a reversed merge strategy, which will merge $destination into $source instead of $source into $destination.
 

Static Public Member Functions

static newFromName (string $name)
 

Public Attributes

const ARRAY_MERGE = 'array_merge'
 
const ARRAY_MERGE_RECURSIVE = 'array_merge_recursive'
 
const ARRAY_PLUS = 'array_plus'
 
const ARRAY_PLUS_2D = 'array_plus_2d'
 
const ARRAY_REPLACE_RECURSIVE = 'array_replace_recursive'
 
const REPLACE = 'replace'
 

Detailed Description

Definition at line 8 of file MergeStrategy.php.

Member Function Documentation

◆ getName()

MediaWiki\Settings\Config\MergeStrategy::getName ( )
Returns
string

Definition at line 52 of file MergeStrategy.php.

◆ merge()

MediaWiki\Settings\Config\MergeStrategy::merge ( array $destination,
array $source )

Merge $source into $destination.

Note
For all merge strategies except self::ARRAY_MERGE_RECURSIVE, for the values that have the same key, the value from $source will override the value in the $destination.
Parameters
array$destination
array$source
Returns
array

Definition at line 67 of file MergeStrategy.php.

References $source.

◆ newFromName()

static MediaWiki\Settings\Config\MergeStrategy::newFromName ( string $name)
static
Parameters
string$name
Returns
static

Definition at line 33 of file MergeStrategy.php.

◆ reverse()

MediaWiki\Settings\Config\MergeStrategy::reverse ( )

Create a reversed merge strategy, which will merge $destination into $source instead of $source into $destination.

See also
self::merge
Returns
MergeStrategy

Definition at line 100 of file MergeStrategy.php.

Member Data Documentation

◆ ARRAY_MERGE

const MediaWiki\Settings\Config\MergeStrategy::ARRAY_MERGE = 'array_merge'

Definition at line 14 of file MergeStrategy.php.

◆ ARRAY_MERGE_RECURSIVE

const MediaWiki\Settings\Config\MergeStrategy::ARRAY_MERGE_RECURSIVE = 'array_merge_recursive'

Definition at line 10 of file MergeStrategy.php.

◆ ARRAY_PLUS

const MediaWiki\Settings\Config\MergeStrategy::ARRAY_PLUS = 'array_plus'

Definition at line 13 of file MergeStrategy.php.

◆ ARRAY_PLUS_2D

const MediaWiki\Settings\Config\MergeStrategy::ARRAY_PLUS_2D = 'array_plus_2d'

Definition at line 12 of file MergeStrategy.php.

◆ ARRAY_REPLACE_RECURSIVE

const MediaWiki\Settings\Config\MergeStrategy::ARRAY_REPLACE_RECURSIVE = 'array_replace_recursive'

Definition at line 11 of file MergeStrategy.php.

◆ REPLACE

const MediaWiki\Settings\Config\MergeStrategy::REPLACE = 'replace'

Definition at line 15 of file MergeStrategy.php.


The documentation for this class was generated from the following file: