private static array
$optionConstants;
private static array
$defaultOptions;
/**
* @return array
*/
public static function castMemcached(\Memcached
$c, array
$a, Stub
$stub, bool
$isNested) { $a +=
[ Caster::PREFIX_VIRTUAL.'servers' =>
$c->
getServerList(),
Caster::PREFIX_VIRTUAL.'options' =>
new EnumStub( self::
getNonDefaultOptions($c) ),
];
return $a;
} private static function getNonDefaultOptions(\Memcached
$c): array
{ self::
$defaultOptions ??= self::
discoverDefaultOptions();
self::
$optionConstants ??= self::
getOptionConstants();