Propel API
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($propelType $propelType)

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

static string getCreoleType($type $type)

Returns the correct Creole type _name_ for propel added types

static int getPDOType($type)

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

static string getPdoTypeString($type)

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

static string getPropelType(int $sqlType)

Returns Propel type constant corresponding to Creole type code.

static array 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.

Details

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

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

Use in the base object class generation.

Parameters

$propelType $propelType The Propel type name.

Return Value

string Name of the native PHP type

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

Returns the correct Creole type _name_ for propel added types

Parameters

$type $type the propel added type.

Return Value

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

at line 250
static public int getPDOType($type)

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

Parameters

$type

Return Value

int

at line 259
static public string getPdoTypeString($type)

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

Parameters

$type

Return Value

string

at line 271
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 283
static public array getPropelTypes()

Get array of Propel types.

Return Value

array string[]

at line 294
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 305
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 316
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 327
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 337
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 348
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 359
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 370
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 Whether the PHP type is a primitive (string, int, boolean, float)