public function attributes() { $class = new \ReflectionClass($this); $names = []; foreach ($class->getProperties(\ReflectionProperty::IS_PUBLIC) as $property) { if (!$property->isStatic()) { $names[] = $property->getName(); } } $dynamicAtts = parent::attributes(); return array_merge($names, $dynamicAtts); }