public function toArray()
    {
        $classData = [];
        foreach ($this->getReflector()->getProperties(\ReflectionProperty::IS_PROTECTED) as $reflectionProperty) {
            if (!$reflectionProperty->isStatic()) {
                $reflectionProperty->setAccessible(true);
                $classData[$reflectionProperty->getName()] = $reflectionProperty->getValue($this);
            }
        }
        return $classData;
    }