public function convertDescendant(array $data = null)
    {
        if (empty($data)) {
            return null;
        }

        $object = $this->convertObjectInFolder($data[JSONConstants::JSON_OBJECTINFOLDERCONTAINER_OBJECT] ?? null);

        if ($object === null) {
            throw new CmisRuntimeException('Given data could not be converted to ObjectInFolder!');
        }

        $objectInFolderContainer = new ObjectInFolderContainer($object);

        $objectInFolderContainer->setChildren(
            array_filter(
                array_map(
                    [$this, 'convertDescendant'],
                    (array) ($data[JSONConstants::JSON_OBJECTINFOLDERCONTAINER_CHILDREN] ?? [])
                ),
                function ($item) { return !empty($item); }
            )
        );

        $objectInFolderContainer->setExtensions(
            $this->convertExtension($data, JSONConstants::getObjectInFolderContainerKeys())
        );

        return $objectInFolderContainer;
    }
public function convertDescendant(array $data = null)
    {
        if (empty($data)) {
            return null;
        }

        $object = $this->convertObjectInFolder($data[JSONConstants::JSON_OBJECTINFOLDERCONTAINER_OBJECT] ?? null);

        if ($object === null) {
            throw new CmisRuntimeException('Given data could not be converted to ObjectInFolder!');
        }

        $objectInFolderContainer = new ObjectInFolderContainer($object);

        $objectInFolderContainer->setChildren(
            array_filter(
                array_map(
                    [$this, 'convertDescendant'],
                    (array) ($data[JSONConstants::JSON_OBJECTINFOLDERCONTAINER_CHILDREN] ?? [])
                ),
                function ($item) { return !empty($item); }
            )
        );

        $objectInFolderContainer->setExtensions(
            $this->convertExtension($data, JSONConstants::getObjectInFolderContainerKeys())
        );

        return $objectInFolderContainer;
    }
public function convertDescendant ( array $ data = null ) { if ( empty ( $ data ) ) { return null ; } $ object = $ this -> convertObjectInFolder ( $ data [ JSONConstants :: JSON_OBJECTINFOLDERCONTAINER_OBJECT ] ?? null ) ; if ( $ object === null ) { throw new CmisRuntimeException ( 'Given data could not be converted to ObjectInFolder!' ) ; } $ objectInFolderContainer = new ObjectInFolderContainer ( $ object ) ; $ objectInFolderContainer -> setChildren ( array_filter ( array_map ( [ $ this , 'convertDescendant' ] , ( array ) ( $ data [ JSONConstants :: JSON_OBJECTINFOLDERCONTAINER_CHILDREN ] ?? [ ] ) ) , function ( $ item ) { return ! empty ( $ item ) ; } ) ) ; $ objectInFolderContainer -> setExtensions ( $ this -> convertExtension ( $ data , JSONConstants :: getObjectInFolderContainerKeys ( ) ) ) ; return $ objectInFolderContainer ; }
Convert given input data array to a ObjectInFolderContainer object

@param array|null $data
@return null|ObjectInFolderContainer
@throws CmisRuntimeException
Convert given input data array to a ObjectInFolderContainer object