src/TableAbstract.php
/**
     * Returns a php type based on the serialized string representation
     */
Returns a php type based on the serialized string representation
Returns a php type based on the serialized string representation
protected function unserializeType(mixed $value, int $type): mixed
    {
        if ($type === self::TYPE_JSON) {
            if ($value === null) {
                return null;
            } elseif ($value === '') {
                return new \stdClass();
            } elseif (is_resource($value)) {
                $value = stream_get_contents($value);
            }
            return json_decode($value);
        }
        return $this->connection->convertToPHPValue(
            $value,
            TypeMapper::getDoctrineTypeByType($type)
        );
    }
protected function unserializeType ( mixed $ value , int $ type ) : mixed { if ( $ type === self :: TYPE_JSON ) { if ( $ value === null ) { return null ; } elseif ( $ value === '' ) { return new \ stdClass ( ) ; } elseif ( is_resource ( $ value ) ) { $ value = stream_get_contents ( $ value ) ; } return json_decode ( $ value ) ; } return $ this -> connection -> convertToPHPValue ( $ value , TypeMapper :: getDoctrineTypeByType ( $ type ) ) ; }
Returns a php type based on the serialized string representation
Returns a php type based on the serialized string representation
// overwrite the doctrine json type since it uses the assoc parameter. This is a problem for empty objects // since we cant distinguish between an empty array or object