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

        $object = new CreatablePropertyTypes();
        $canCreate = [];
        foreach ($data[JSONConstants::JSON_CAP_CREATABLE_PROPERTY_TYPES_CANCREATE] ?? [] as $canCreateItem) {
            try {
                $canCreate[] = PropertyType::cast($canCreateItem);
            } catch (InvalidEnumerationValueException $exception) {
                // ignore invalid types
            }
        }

        $object->setCanCreate($canCreate);

        $object->setExtensions(
            $this->convertExtension(
                $data,
                JSONConstants::getCapabilityCreatablePropertyKeys()
            )
        );

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

        $object = new CreatablePropertyTypes();
        $canCreate = [];
        foreach ($data[JSONConstants::JSON_CAP_CREATABLE_PROPERTY_TYPES_CANCREATE] ?? [] as $canCreateItem) {
            try {
                $canCreate[] = PropertyType::cast($canCreateItem);
            } catch (InvalidEnumerationValueException $exception) {
                // ignore invalid types
            }
        }

        $object->setCanCreate($canCreate);

        $object->setExtensions(
            $this->convertExtension(
                $data,
                JSONConstants::getCapabilityCreatablePropertyKeys()
            )
        );

        return $object;
    }
public function convertCreatablePropertyTypes ( array $ data = null ) { if ( empty ( $ data ) ) { return null ; } $ object = new CreatablePropertyTypes ( ) ; $ canCreate = [ ] ; foreach ( $ data [ JSONConstants :: JSON_CAP_CREATABLE_PROPERTY_TYPES_CANCREATE ] ?? [ ] as $ canCreateItem ) { try { $ canCreate [ ] = PropertyType :: cast ( $ canCreateItem ) ; } catch ( InvalidEnumerationValueException $ exception ) { // ignore invalid types } } $ object -> setCanCreate ( $ canCreate ) ; $ object -> setExtensions ( $ this -> convertExtension ( $ data , JSONConstants :: getCapabilityCreatablePropertyKeys ( ) ) ) ; return $ object ; }
Create CreatablePropertyTypes object and populate given data to it

@param array|null $data The data that should be populated to the CreatablePropertyTypes object
@return CreatablePropertyTypes|null Returns a CreatablePropertyTypes object or <code>null</code> if empty data
is given.
Create CreatablePropertyTypes object and populate given data to it