Joomla CMS  4.2.2
Documentation des API du CMS Joomla en version 4.2.2
Référence de la classe Caster

Fonctions membres publiques statiques

static castObject (object $obj, string $class, bool $hasDebugInfo=false, string $debugClass=null)
 
static filter (array $a, int $filter, array $listedProperties=[], ?int &$count=0)
 
static castPhpIncompleteClass (\__PHP_Incomplete_Class $c, array $a, Stub $stub, bool $isNested)
 

Champs de données

const EXCLUDE_VERBOSE = 1
 
const EXCLUDE_VIRTUAL = 2
 
const EXCLUDE_DYNAMIC = 4
 
const EXCLUDE_PUBLIC = 8
 
const EXCLUDE_PROTECTED = 16
 
const EXCLUDE_PRIVATE = 32
 
const EXCLUDE_NULL = 64
 
const EXCLUDE_EMPTY = 128
 
const EXCLUDE_NOT_IMPORTANT = 256
 
const EXCLUDE_STRICT = 512
 
const PREFIX_VIRTUAL = "\0~\0"
 
const PREFIX_DYNAMIC = "\0+\0"
 
const PREFIX_PROTECTED = "\0*\0"
 

Description détaillée

Helper for filtering out properties in casters.

Auteur
Nicolas Grekas p@tch.nosp@m.work.nosp@m..com

Documentation des fonctions membres

◆ castObject()

static castObject ( object  $obj,
string  $class,
bool  $hasDebugInfo = false,
string  $debugClass = null 
)
static

Casts objects to arrays and adds the dynamic property prefix.

Paramètres
bool$hasDebugInfoWhether the __debugInfo method exists on $obj or not

Références $class, $i, et elseif.

Référencé par AbstractCloner\castObject(), et SplCaster\castSplArray().

◆ castPhpIncompleteClass()

static castPhpIncompleteClass ( \__PHP_Incomplete_Class  $c,
array  $a,
Stub  $stub,
bool  $isNested 
)
static

◆ filter()

static filter ( array  $a,
int  $filter,
array  $listedProperties = [],
?int &  $count = 0 
)
static

Filters out the specified properties.

By default, a single match in the $filter bit field filters properties out, following an "or" logic. When EXCLUDE_STRICT is set, an "and" logic is applied: all bits must match for a property to be removed.

Paramètres
array$aThe array containing the properties to filter
int$filterA bit field of Caster::EXCLUDE_* constants specifying which properties to filter out
string[]$listedProperties List of properties to exclude when Caster::EXCLUDE_VERBOSE is set, and to preserve when Caster::EXCLUDE_NOT_IMPORTANT is set
int&$countSet to the number of removed properties

Références $count, $type, elseif, et null.

Référencé par XmlReaderCaster\castXmlReader().

Documentation des champs

◆ EXCLUDE_DYNAMIC

const EXCLUDE_DYNAMIC = 4

◆ EXCLUDE_EMPTY

const EXCLUDE_EMPTY = 128

◆ EXCLUDE_NOT_IMPORTANT

const EXCLUDE_NOT_IMPORTANT = 256

◆ EXCLUDE_NULL

const EXCLUDE_NULL = 64

◆ EXCLUDE_PRIVATE

const EXCLUDE_PRIVATE = 32

◆ EXCLUDE_PROTECTED

const EXCLUDE_PROTECTED = 16

◆ EXCLUDE_PUBLIC

const EXCLUDE_PUBLIC = 8

◆ EXCLUDE_STRICT

const EXCLUDE_STRICT = 512

◆ EXCLUDE_VERBOSE

◆ EXCLUDE_VIRTUAL

const EXCLUDE_VIRTUAL = 2

◆ PREFIX_DYNAMIC

◆ PREFIX_PROTECTED

◆ PREFIX_VIRTUAL

const PREFIX_VIRTUAL = "\0~\0"

Référencé par DsPairStub\__construct(), ReflectionCaster\addExtra(), RdKafkaCaster\castBrokerMetadata(), AmqpCaster\castChannel(), ReflectionCaster\castClass(), ReflectionCaster\castClassConstant(), ReflectionCaster\castClosure(), DsCaster\castCollection(), RdKafkaCaster\castConf(), AmqpCaster\castConnection(), DateCaster\castDateTime(), DOMCaster\castDocument(), SplCaster\castDoublyLinkedList(), StubCaster\castEnum(), AmqpCaster\castEnvelope(), IntlCaster\castError(), AmqpCaster\castExchange(), FiberCaster\castFiber(), SplCaster\castFileInfo(), SplCaster\castFileObject(), ExceptionCaster\castFrameStub(), ReflectionCaster\castFunctionAbstract(), ReflectionCaster\castGenerator(), GmpCaster\castGmp(), SplCaster\castHeap(), ImagineCaster\castImage(), DOMCaster\castImplementation(), DateCaster\castInterval(), IntlCaster\castIntlCalendar(), IntlCaster\castIntlDateFormatter(), IntlCaster\castIntlTimeZone(), RdKafkaCaster\castKafkaConsumer(), MemcachedCaster\castMemcached(), RdKafkaCaster\castMessage(), IntlCaster\castMessageFormatter(), ReflectionCaster\castMethod(), IntlCaster\castNumberFormatter(), AbstractCloner\castObject(), SplCaster\castObjectStorage(), SplCaster\castOuterIterator(), DsCaster\castPair(), ReflectionCaster\castParameter(), RdKafkaCaster\castPartitionMetadata(), PdoCaster\castPdo(), PdoCaster\castPdoStatement(), DateCaster\castPeriod(), ReflectionCaster\castProperty(), AmqpCaster\castQueue(), UuidCaster\castRamseyUuid(), RdKafkaCaster\castRdKafka(), RedisCaster\castRedis(), RedisCaster\castRedisArray(), RedisCaster\castRedisCluster(), ReflectionCaster\castReference(), ReflectionCaster\castReflectionGenerator(), SymfonyCaster\castRequest(), AbstractCloner\castResource(), ExceptionCaster\castSilencedErrorContext(), SplCaster\castSplArray(), ExceptionCaster\castThrowingCasterException(), DateCaster\castTimeZone(), RdKafkaCaster\castTopic(), RdKafkaCaster\castTopicConf(), RdKafkaCaster\castTopicMetadata(), RdKafkaCaster\castTopicPartition(), ExceptionCaster\castTraceStub(), ReflectionCaster\castType(), SplCaster\castWeakReference(), XmlReaderCaster\castXmlReader(), RdKafkaCaster\extractMetadata(), ExceptionCaster\filterExceptionArray(), ReflectionCaster\getSignature(), Data\seek(), et ReflectionCaster\unsetClosureFileInfo().


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