|
Doctrine 1.2.4
|
Inherits Doctrine_Connection_Module.
Public Member Functions | |
| convertBooleans ($item) | |
| escapePattern ($text) | |
| fixIndexName ($idx) | |
| fixSequenceName ($sqn) | |
| getConnection () | |
| getForeignKeyName ($fkey) | |
| getIndexName ($idx) | |
| getModuleName () | |
| getSequenceName ($sqn) | |
| getTableName ($table) | |
| quote ($input, $type=null) | |
| quoteIdentifier ($str, $checkOption=true) | |
| quoteMultipleIdentifier ($arr, $checkOption=true) | |
Definition at line 33 of file Formatter.php.
| Doctrine_Formatter::convertBooleans | ( | $item | ) |
convertBooleans some drivers need the boolean values to be converted into integers when using DQL API
This method takes care of that conversion
| array | $item |
Definition at line 74 of file Formatter.php.
| Doctrine_Formatter::escapePattern | ( | $text | ) |
Quotes pattern (% and _) characters in a string)
EXPERIMENTAL
WARNING: this function is experimental and may change signature at any time until labelled as non-experimental
| string | the input string to quote |
Definition at line 47 of file Formatter.php.
| Doctrine_Formatter::fixIndexName | ( | $idx | ) |
Removes any formatting in an index name using the 'idxname_format' option
| string | $idx | string that containts name of anl index |
Definition at line 218 of file Formatter.php.
| Doctrine_Formatter::fixSequenceName | ( | $sqn | ) |
Removes any formatting in an sequence name using the 'seqname_format' option
| string | $sqn | string that containts name of a potential sequence |
Definition at line 201 of file Formatter.php.
|
inherited |
getConnection returns the connection object this module uses
Definition at line 68 of file Module.php.
| Doctrine_Formatter::getForeignKeyName | ( | $fkey | ) |
Formatting a foreign Key name
| string | name of the foreign key |
Definition at line 258 of file Formatter.php.
| Doctrine_Formatter::getIndexName | ( | $idx | ) |
adds index name formatting to a index name
| string | name of the index |
Definition at line 246 of file Formatter.php.
|
inherited |
getModuleName returns the name of this module
Definition at line 79 of file Module.php.
| Doctrine_Formatter::getSequenceName | ( | $sqn | ) |
adds sequence name formatting to a sequence name
| string | name of the sequence |
Definition at line 234 of file Formatter.php.
| Doctrine_Formatter::getTableName | ( | $table | ) |
adds table name formatting to a table name
| string | name of the table |
Definition at line 270 of file Formatter.php.
| Doctrine_Formatter::quote | ( | $input, | |
$type = null |
|||
| ) |
quote quotes given input parameter
| mixed | $input | parameter to be quoted |
| string | $type |
Definition at line 162 of file Formatter.php.
| Doctrine_Formatter::quoteIdentifier | ( | $str, | |
$checkOption = true |
|||
| ) |
Quote a string so it can be safely used as a table or column name
Delimiting style depends on which database driver is being used.
NOTE: just because you CAN use delimited identifiers doesn't mean you SHOULD use them. In general, they end up causing way more problems than they solve.
Portability is broken by using the following characters inside delimited identifiers:
`) – due to MySQL") – due to Oracle[ or ]) – due to AccessDelimited identifiers are known to generally work correctly under the following drivers:
InterBase doesn't seem to be able to use delimited identifiers via PHP 4. They work fine under PHP 5.
| string | $str | identifier name to be quoted |
| bool | $checkOption | check the 'quote_identifier' option |
Definition at line 122 of file Formatter.php.
| Doctrine_Formatter::quoteMultipleIdentifier | ( | $arr, | |
$checkOption = true |
|||
| ) |
quoteMultipleIdentifier Quotes multiple identifier strings
| array | $arr | identifiers array to be quoted |
| bool | $checkOption | check the 'quote_identifier' option |
Definition at line 145 of file Formatter.php.