public function __construct($object)
 {
     $this->object = $object;
     $this->type = get_class($object);
     parent::__construct(self::toArray($object));
 }