public function convertTypeMutability(array $data = null)
    {
        if (empty($data)) {
            return null;
        }
        $typeMutability = new TypeMutability();
        $typeMutability->populate(
            $data,
            array_combine(
                JSONConstants::getTypeTypeMutabilityKeys(),
                array_map(
                    function ($key) {
                        // add a prefix "can" to all keys as this are the property names
                        return 'can' . ucfirst($key);
                    },
                    JSONConstants::getTypeTypeMutabilityKeys()
                )
            ),
            true
        );

        $typeMutability->setExtensions(
            $this->convertExtension($data, JSONConstants::getTypeTypeMutabilityKeys())
        );

        return $typeMutability;
    }
public function convertTypeMutability(array $data = null)
    {
        if (empty($data)) {
            return null;
        }
        $typeMutability = new TypeMutability();
        $typeMutability->populate(
            $data,
            array_combine(
                JSONConstants::getTypeTypeMutabilityKeys(),
                array_map(
                    function ($key) {
                        // add a prefix "can" to all keys as this are the property names
                        return 'can' . ucfirst($key);
                    },
                    JSONConstants::getTypeTypeMutabilityKeys()
                )
            ),
            true
        );

        $typeMutability->setExtensions(
            $this->convertExtension($data, JSONConstants::getTypeTypeMutabilityKeys())
        );

        return $typeMutability;
    }
public function convertTypeMutability ( array $ data = null ) { if ( empty ( $ data ) ) { return null ; } $ typeMutability = new TypeMutability ( ) ; $ typeMutability -> populate ( $ data , array_combine ( JSONConstants :: getTypeTypeMutabilityKeys ( ) , array_map ( function ( $ key ) { // add a prefix "can" to all keys as this are the property names return 'can' . ucfirst ( $ key ) ; } , JSONConstants :: getTypeTypeMutabilityKeys ( ) ) ) , true ) ; $ typeMutability -> setExtensions ( $ this -> convertExtension ( $ data , JSONConstants :: getTypeTypeMutabilityKeys ( ) ) ) ; return $ typeMutability ; }
Convert an array to a type mutability object

@param array|null $data The data that should be populated to the object
@return TypeMutability|null Returns the type mutability object or <code>null</code> if empty array is given
Convert an array to a type mutability object