/** * Optimized constructor. * * @param bool $returnArray */ public function __construct(bool $returnArray = false) { $options = self::VALUE_TYPED | self::VALUE_UNKNOWN_TO_NULL; if ($returnArray) { $options |= self::RETURN_ARRAY; } else { $options |= self::RETURN_OBJECT; } parent::__construct($options); // Disallow useless properties $propertyFilter = new Disallowed(); $propertyFilter->addProperty('AolVersion'); $this->setPropertyFilter($propertyFilter); }