/**
* @param string[]|null $mutatorPrefixes
* @param string[]|null $accessorPrefixes
* @param string[]|null $arrayMutatorPrefixes
*/
public function __construct(array
$mutatorPrefixes = null, array
$accessorPrefixes = null, array
$arrayMutatorPrefixes = null, bool
$enableConstructorExtraction = true, int
$accessFlags = self::ALLOW_PUBLIC, InflectorInterface
$inflector = null, int
$magicMethodsFlags = self::ALLOW_MAGIC_GET | self::ALLOW_MAGIC_SET
) { $this->mutatorPrefixes =
$mutatorPrefixes ?? self::
$defaultMutatorPrefixes;
$this->accessorPrefixes =
$accessorPrefixes ?? self::
$defaultAccessorPrefixes;
$this->arrayMutatorPrefixes =
$arrayMutatorPrefixes ?? self::
$defaultArrayMutatorPrefixes;
$this->enableConstructorExtraction =
$enableConstructorExtraction;
$this->methodReflectionFlags =
$this->
getMethodsFlags($accessFlags);
$this->propertyReflectionFlags =
$this->
getPropertyFlags($accessFlags);
$this->magicMethodsFlags =
$magicMethodsFlags;
$this->inflector =
$inflector ??
new EnglishInflector();
$this->arrayMutatorPrefixesFirst =
array_merge($this->arrayMutatorPrefixes,
array_diff($this->mutatorPrefixes,
$this->arrayMutatorPrefixes
));
$this->arrayMutatorPrefixesLast =
array_reverse($this->arrayMutatorPrefixesFirst
);
} public function getProperties(string
$class, array
$context =
[]): ?array
{ try {