/** * @return array * Get a map from column name to row values for * this instance */ public function toRow() : array { $parent_class_fqsen = $this->clazz->hasParentClassFQSEN() ? (string) $this->clazz->getParentClassFQSEN() : null; $interface_fqsen_list_string = implode('|', array_map(function (FullyQualifiedClassName $fqsen) { return (string) $fqsen; }, $this->clazz->getInterfaceFQSENList())); $trait_fqsen_list_string = implode('|', array_map(function (FullyQualifiedClassName $fqsen) { return (string) $fqsen; }, $this->clazz->getInterfaceFQSENList())); return ['name' => (string) $this->clazz->getName(), 'type' => (string) $this->clazz->getUnionType(), 'flags' => $this->clazz->getFlags(), 'fqsen' => (string) $this->clazz->getFQSEN(), 'context' => base64_encode(serialize($this->clazz->getContext())), 'is_deprecated' => $this->clazz->isDeprecated(), 'parent_class_fqsen' => $parent_class_fqsen, 'interface_fqsen_list' => $interface_fqsen_list_string, 'trait_fqsen_list' => $trait_fqsen_list_string, 'is_parent_constructor_called' => $this->clazz->getIsParentConstructorCalled()]; }