MediaWiki  1.23.14
ReplacementArray Class Reference

Replacement array for FSS with fallback to strtr() Supports lazy initialisation of FSS resource. More...

Public Member Functions

 __construct ( $data=array())
 Create an object with the specified replacement array The array should have the same form as the replacement array for strtr() More...
 
 __sleep ()
 
 __wakeup ()
 
 getArray ()
 
 merge ( $other)
 
 mergeArray ( $data)
 
 removeArray ( $data)
 
 removePair ( $from)
 
 replace ( $subject)
 
 setArray ( $data)
 Set the whole replacement array at once. More...
 
 setPair ( $from, $to)
 Set an element of the replacement array. More...
 

Private Attributes

 $data = false
 
 $fss = false
 

Detailed Description

Replacement array for FSS with fallback to strtr() Supports lazy initialisation of FSS resource.

Definition at line 411 of file StringUtils.php.

Constructor & Destructor Documentation

◆ __construct()

ReplacementArray::__construct (   $data = array())

Create an object with the specified replacement array The array should have the same form as the replacement array for strtr()

Parameters
array$data

Definition at line 420 of file StringUtils.php.

References $data, and data.

Member Function Documentation

◆ __sleep()

ReplacementArray::__sleep ( )
Returns
array

Definition at line 427 of file StringUtils.php.

References array().

◆ __wakeup()

ReplacementArray::__wakeup ( )

Definition at line 431 of file StringUtils.php.

◆ getArray()

ReplacementArray::getArray ( )
Returns
array|bool

Definition at line 447 of file StringUtils.php.

References $data.

◆ merge()

ReplacementArray::merge (   $other)
Parameters
ReplacementArray$other

Definition at line 472 of file StringUtils.php.

References data.

◆ mergeArray()

ReplacementArray::mergeArray (   $data)
Parameters
array$data

Definition at line 464 of file StringUtils.php.

References $data, and data.

◆ removeArray()

ReplacementArray::removeArray (   $data)
Parameters
array$data

Definition at line 488 of file StringUtils.php.

References $data, $from, as, and removePair().

◆ removePair()

ReplacementArray::removePair (   $from)
Parameters
string$from

Definition at line 480 of file StringUtils.php.

References $from, and data.

Referenced by removeArray().

◆ replace()

ReplacementArray::replace (   $subject)
Parameters
string$subject
Returns
string

Definition at line 499 of file StringUtils.php.

References data, wfProfileIn(), and wfProfileOut().

◆ setArray()

ReplacementArray::setArray (   $data)

Set the whole replacement array at once.

Parameters
array$data

Definition at line 439 of file StringUtils.php.

References $data, and data.

◆ setPair()

ReplacementArray::setPair (   $from,
  $to 
)

Set an element of the replacement array.

Parameters
string$from
string$to

Definition at line 456 of file StringUtils.php.

References $from, and data.

Member Data Documentation

◆ $data

ReplacementArray::$data = false
private

Definition at line 412 of file StringUtils.php.

Referenced by __construct(), getArray(), mergeArray(), removeArray(), and setArray().

◆ $fss

ReplacementArray::$fss = false
private

Definition at line 413 of file StringUtils.php.


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