/** * @param array $set array to be managed */ public function __construct($type, $set = null) { if (is_callable($type)) { $this->type = $type; } else { if (!string::isString($type)) { throw new \InvalidArgumentException('invalid type specifier'); } else { $this->type = trim(_S($type)->asUtf8); } } if (func_num_args() > 1) { parent::__construct($this->filterByType($set, false)); } else { parent::__construct(); } }