Storm\Drivers\Platforms\PDO\PDOParameterType::MapParameterType PHP Method

MapParameterType() public static method

public static MapParameterType ( $ParameterType )
    public static function MapParameterType($ParameterType)
    {
        if (isset(self::$ParameterTypesMap[$ParameterType])) {
            return self::$ParameterTypesMap[$ParameterType];
        } else {
            throw new \Storm\Core\UnexpectedValueException('Cannot map the supplied parameter type: %s given', \Storm\Core\Utilities::GetTypeOrClass($ParameterType));
        }
    }

Usage Example

Esempio n. 1
0
 public function Escape($Value, $ParameterType)
 {
     //PDO puts quotes around integers
     if ($ParameterType == Queries\ParameterType::Integer) {
         return (string) (int) $Value;
     }
     $PDOParameterType = PDOParameterType::MapParameterType($ParameterType);
     return $this->PDO->quote($Value, $PDOParameterType);
 }
All Usage Examples Of Storm\Drivers\Platforms\PDO\PDOParameterType::MapParameterType