public function convertTypeDescendants(array $data = null)
    {
        $result = [];

        if (empty($data)) {
            return $result;
        }

        foreach (array_filter($data, 'is_array') as $itemData) {

            $container = new TypeDefinitionContainer();

            $typeDefinition = $this->convertTypeDefinition($itemData[JSONConstants::JSON_TYPESCONTAINER_TYPE] ?? []);
            if ($typeDefinition !== null) {
                $container->setTypeDefinition($typeDefinition);
            }

            $container->setChildren(
                $this->convertTypeDescendants($itemData[JSONConstants::JSON_TYPESCONTAINER_CHILDREN] ?? [])
            );

            $container->setExtensions($this->convertExtension($data, JSONConstants::getTypesContainerKeys()));

            $result[] = $container;
        }

        return $result;
    }
public function convertTypeDescendants(array $data = null)
    {
        $result = [];

        if (empty($data)) {
            return $result;
        }

        foreach (array_filter($data, 'is_array') as $itemData) {

            $container = new TypeDefinitionContainer();

            $typeDefinition = $this->convertTypeDefinition($itemData[JSONConstants::JSON_TYPESCONTAINER_TYPE] ?? []);
            if ($typeDefinition !== null) {
                $container->setTypeDefinition($typeDefinition);
            }

            $container->setChildren(
                $this->convertTypeDescendants($itemData[JSONConstants::JSON_TYPESCONTAINER_CHILDREN] ?? [])
            );

            $container->setExtensions($this->convertExtension($data, JSONConstants::getTypesContainerKeys()));

            $result[] = $container;
        }

        return $result;
    }
public function convertTypeDescendants ( array $ data = null ) { $ result = [ ] ; if ( empty ( $ data ) ) { return $ result ; } foreach ( array_filter ( $ data , 'is_array' ) as $ itemData ) { $ container = new TypeDefinitionContainer ( ) ; $ typeDefinition = $ this -> convertTypeDefinition ( $ itemData [ JSONConstants :: JSON_TYPESCONTAINER_TYPE ] ?? [ ] ) ; if ( $ typeDefinition !== null ) { $ container -> setTypeDefinition ( $ typeDefinition ) ; } $ container -> setChildren ( $ this -> convertTypeDescendants ( $ itemData [ JSONConstants :: JSON_TYPESCONTAINER_CHILDREN ] ?? [ ] ) ) ; $ container -> setExtensions ( $ this -> convertExtension ( $ data , JSONConstants :: getTypesContainerKeys ( ) ) ) ; $ result [ ] = $ container ; } return $ result ; }
Convert given input data to a TypeDescendants object

@param array|null $data
@return TypeDefinitionContainerInterface[] Returns an array of TypeDefinitionContainerInterface objects
Convert given input data to a TypeDescendants object