Joomla CMS  3.10.11 (avec JPlatform 13.1 inclus)
Documentation des API du CMS Joomla en version 3.10.11 et du framework Joomla Platform intégré
Tout Structures de données Espaces de nommage Fichiers Fonctions Variables Pages
Référence de la classe DisallowedClassesSubstitutor

Fonctions membres publiques

 __construct ($serialized, array $allowedClasses)
 
 getSubstitutedSerialized ()
 

Champs de données

const PATTERN_STRING = '#s:(\d+):(")#'
 
const PATTERN_OBJECT = '#(^|;)O:\d+:"([^"]*)":(\d+):\{#'
 

Fonctions membres privées

 buildIgnoreItems ()
 
 substituteObjects ()
 
 replace ($replacement, $start, $end)
 
 ignore ($start, $end)
 
 shift ($offset, $size)
 
 sanitizeItem ($className, $leftBorder, $objectSize)
 

Attributs privés

 $serialized
 
 $allowedClasses
 
 $ignoreItems = array()
 

Description détaillée

Worker implementation for identifying and skipping false-positives not to be substituted - like nested serializations in string literals.

Documentation des constructeurs et destructeur

◆ __construct()

__construct (   $serialized,
array  $allowedClasses 
)

Documentation des fonctions membres

◆ buildIgnoreItems()

buildIgnoreItems ( )
private

Identifies items to be ignored - like nested serializations in string literals.

Références $offset, $start, et DisallowedClassesSubstitutor\ignore().

Référencé par DisallowedClassesSubstitutor\__construct().

◆ getSubstitutedSerialized()

getSubstitutedSerialized ( )
Renvoie
string

Références DisallowedClassesSubstitutor\$serialized.

◆ ignore()

ignore (   $start,
  $end 
)
private

Whether given offset positions should be ignored.

Paramètres
int$start
int$end
Renvoie
bool

Références $start.

Référencé par DisallowedClassesSubstitutor\buildIgnoreItems(), et DisallowedClassesSubstitutor\substituteObjects().

◆ replace()

replace (   $replacement,
  $start,
  $end 
)
private

Replaces sanitized object class names in serialized data.

Paramètres
string$replacementSanitized object data
int$startStart offset in serialized data
int$endEnd offset in serialized data

Références $start.

Référencé par DisallowedClassesSubstitutor\substituteObjects().

◆ sanitizeItem()

sanitizeItem (   $className,
  $leftBorder,
  $objectSize 
)
private

Sanitizes object class item.

Paramètres
string$className
int$leftBorder
int$objectSize
Renvoie
string

Références $className.

Référencé par DisallowedClassesSubstitutor\substituteObjects().

◆ shift()

shift (   $offset,
  $size 
)
private

Shifts offset positions of ignore items by $size. This is necessary whenever object class names have been substituted which have a different length than before.

Paramètres
int$offset
int$size

Références $offset.

Référencé par DisallowedClassesSubstitutor\substituteObjects().

◆ substituteObjects()

substituteObjects ( )
private

Documentation des champs

◆ $allowedClasses

$allowedClasses
private

◆ $ignoreItems

$ignoreItems = array()
private

◆ $serialized

◆ PATTERN_OBJECT

const PATTERN_OBJECT = '#(^|;)O:\d+:"([^"]*)":(\d+):\{#'

◆ PATTERN_STRING

const PATTERN_STRING = '#s:(\d+):(")#'

La documentation de cette classe a été générée à partir du fichier suivant :