Class

PropelTypes

class PropelTypes

A class that maps PropelTypes to PHP native types, PDO types (and Creole types).

Constants

CHAR

VARCHAR

LONGVARCHAR

CLOB

CLOB_EMU

NUMERIC

DECIMAL

TINYINT

SMALLINT

INTEGER

BIGINT

REAL

FLOAT

DOUBLE

BINARY

VARBINARY

LONGVARBINARY

BLOB

DATE

TIME

TIMESTAMP

BU_DATE

BU_TIMESTAMP

BOOLEAN

BOOLEAN_EMU

OBJECT

PHP_ARRAY

ENUM

CHAR_NATIVE_TYPE

VARCHAR_NATIVE_TYPE

LONGVARCHAR_NATIVE_TYPE

CLOB_NATIVE_TYPE

CLOB_EMU_NATIVE_TYPE

NUMERIC_NATIVE_TYPE

DECIMAL_NATIVE_TYPE

TINYINT_NATIVE_TYPE

SMALLINT_NATIVE_TYPE

INTEGER_NATIVE_TYPE

BIGINT_NATIVE_TYPE

REAL_NATIVE_TYPE

FLOAT_NATIVE_TYPE

DOUBLE_NATIVE_TYPE

BINARY_NATIVE_TYPE

VARBINARY_NATIVE_TYPE

LONGVARBINARY_NATIVE_TYPE

BLOB_NATIVE_TYPE

BU_DATE_NATIVE_TYPE

DATE_NATIVE_TYPE

TIME_NATIVE_TYPE

TIMESTAMP_NATIVE_TYPE

BU_TIMESTAMP_NATIVE_TYPE

BOOLEAN_NATIVE_TYPE

BOOLEAN_EMU_NATIVE_TYPE

OBJECT_NATIVE_TYPE

PHP_ARRAY_NATIVE_TYPE

ENUM_NATIVE_TYPE

Methods

static string getPhpNative(string $propelType)

Return native PHP type which corresponds to the Creole type provided.

static string getCreoleType(string $type)

Returns the correct Creole type name for propel added types

static int getPDOType($type)

Returns the PDO type (PDO::PARAM_* constant) value.

static string getPdoTypeString($type)

Returns the PDO type ('PDO::PARAM_*' constant) name.

static string getPropelType(int $sqlType)

Returns Propel type constant corresponding to Creole type code.

static string[] getPropelTypes()

Get array of Propel types.

static boolean isTemporalType(string $type)

Whether passed type is a temporal (date/time/timestamp) type.

static boolean isTextType(string $type)

Returns true if values for the type need to be quoted.

static boolean isNumericType(string $type)

Returns true if values for the type are numeric.

static boolean isBooleanType(string $type)

Returns true if values for the type are boolean.

static boolean isLobType(string $type)

Returns true if type is a LOB type (i.e.

static boolean isPhpPrimitiveType(string $phpType)

Convenience method to indicate whether a passed-in PHP type is a primitive.

static boolean isPhpPrimitiveNumericType(string $phpType)

Convenience method to indicate whether a passed-in PHP type is a numeric primitive.

static boolean isPhpObjectType(string $phpType)

Convenience method to indicate whether a passed-in PHP type is an object.

static boolean isPhpArrayType(string $phpType)

Convenience method to indicate whether a passed-in PHP type is an array.

Details

at line 230
static public string getPhpNative(string $propelType)

Return native PHP type which corresponds to the Creole type provided.

Use in the base object class generation.

Parameters

string $propelType The Propel type name.

Return Value

string Name of the native PHP type

at line 242
static public string getCreoleType(string $type)

Returns the correct Creole type name for propel added types

Parameters

string $type the propel added type.

Return Value

string Name of the the correct Creole type (e.g. "VARCHAR").

at line 252
static public int getPDOType($type)

Returns the PDO type (PDO::PARAM_* constant) value.

Parameters

$type

Return Value

int

at line 262
static public string getPdoTypeString($type)

Returns the PDO type ('PDO::PARAM_*' constant) name.

Parameters

$type

Return Value

string

at line 275
static public string getPropelType(int $sqlType)

Returns Propel type constant corresponding to Creole type code.

Used but Propel Creole task.

Parameters

int $sqlType The Creole SQL type constant.

Return Value

string The Propel type to use or NULL if none found.

at line 287
static public string[] getPropelTypes()

Get array of Propel types.

Return Value

string[]

at line 299
static public boolean isTemporalType(string $type)

Whether passed type is a temporal (date/time/timestamp) type.

Parameters

string $type Propel type

Return Value

boolean

at line 311
static public boolean isTextType(string $type)

Returns true if values for the type need to be quoted.

Parameters

string $type The Propel type to check.

Return Value

boolean True if values for the type need to be quoted.

at line 323
static public boolean isNumericType(string $type)

Returns true if values for the type are numeric.

Parameters

string $type The Propel type to check.

Return Value

boolean True if values for the type need to be quoted.

at line 335
static public boolean isBooleanType(string $type)

Returns true if values for the type are boolean.

Parameters

string $type The Propel type to check.

Return Value

boolean True if values for the type need to be quoted.

at line 347
static public boolean isLobType(string $type)

Returns true if type is a LOB type (i.e.

would be handled by Blob/Clob class).

Parameters

string $type Propel type to check.

Return Value

boolean

at line 359
static public boolean isPhpPrimitiveType(string $phpType)

Convenience method to indicate whether a passed-in PHP type is a primitive.

Parameters

string $phpType The PHP type to check

Return Value

boolean Whether the PHP type is a primitive (string, int, boolean, float)

at line 371
static public boolean isPhpPrimitiveNumericType(string $phpType)

Convenience method to indicate whether a passed-in PHP type is a numeric primitive.

Parameters

string $phpType The PHP type to check

Return Value

boolean Whether the PHP type is a primitive (string, int, boolean, float)

at line 383
static public boolean isPhpObjectType(string $phpType)

Convenience method to indicate whether a passed-in PHP type is an object.

Parameters

string $phpType The PHP type to check

Return Value

boolean

at line 395
static public boolean isPhpArrayType(string $phpType)

Convenience method to indicate whether a passed-in PHP type is an array.

Parameters

string $phpType The PHP type to check

Return Value

boolean