public function convertToDatabaseValue($value, $marshal = true)
    {
        $converted = $value !== null ? $this->databaseValue($value) : null;

        if (!$marshal) {
            return $converted;
        }

        return $converted === null ? self::getNull() : [static::$dynamoKey => $converted];
    }
public function convertToDatabaseValue($value, $marshal = true)
    {
        $converted = $value !== null ? $this->databaseValue($value) : null;

        if (!$marshal) {
            return $converted;
        }

        return $converted === null ? self::getNull() : [static::$dynamoKey => $converted];
    }
public function convertToDatabaseValue ( $ value , $ marshal = true ) { $ converted = $ value !== null ? $ this -> databaseValue ( $ value ) : null ; if ( ! $ marshal ) { return $ converted ; } return $ converted === null ? self :: getNull ( ) : [ static :: $ dynamoKey => $ converted ] ; }
Converts a value from its PHP representation of this type to its serialized
DynamoDB representation, optionally applying marshalling afterwards.

@param mixed $value The PHP value to convert.
@param bool  $marshal

@return array|string The serialized DynamoDB representation of the value.
Converts a value from its PHP representation of this type to its serialized DynamoDB representation optionally applying marshalling afterwards .