function decodeType($type, $value): \Plasma\Types\TypeExtensionResultInterface {
        if($type === null && $this->enabledFuzzySearch) {
            /** @var \Plasma\Types\TypeExtensionInterface  $decoder */
            foreach($this->dbTypes as $dbType => $decoder) {
                if($decoder->canHandleType($value, null)) {
                    return $decoder->decode($value);
                }
            }
        } elseif(isset($this->dbTypes[$type])) {
            return $this->dbTypes[$type]->decode($value);
        }
        
        throw new \Plasma\Exception('Unable to decode given value');
    }
function decodeType($type, $value): \Plasma\Types\TypeExtensionResultInterface {
        if($type === null && $this->enabledFuzzySearch) {
            /** @var \Plasma\Types\TypeExtensionInterface  $decoder */
            foreach($this->dbTypes as $dbType => $decoder) {
                if($decoder->canHandleType($value, null)) {
                    return $decoder->decode($value);
                }
            }
        } elseif(isset($this->dbTypes[$type])) {
            return $this->dbTypes[$type]->decode($value);
        }
        
        throw new \Plasma\Exception('Unable to decode given value');
    }
function decodeType ( $ type , $ value ) : \ Plasma \ Types \ TypeExtensionResultInterface { if ( $ type === null && $ this -> enabledFuzzySearch ) { /** @var \Plasma\Types\TypeExtensionInterface  $decoder */ foreach ( $ this -> dbTypes as $ dbType => $ decoder ) { if ( $ decoder -> canHandleType ( $ value , null ) ) { return $ decoder -> decode ( $ value ) ; } } } elseif ( isset ( $ this -> dbTypes [ $ type ] ) ) { return $ this -> dbTypes [ $ type ] -> decode ( $ value ) ; } throw new \ Plasma \ Exception ( 'Unable to decode given value' ) ; }
Tries to decode a value.
@param mixed|null  $type   The driver-dependent database type identifier. Can be `null` to not use the fast-path.
@param mixed       $value
@return \Plasma\Types\TypeExtensionResultInterface
@throws \Plasma\Exception  Thrown if unable to decode the value.
Tries to decode a value .