Sunteți pe pagina 1din 630

Doctrine API Documentation

Complete reference for the Doctrine codebase.

Doctrine 1.1
Version: api-1.1-2009-05-13
Table of Contents ii

Table of Contents

Doctrine_Parser_YamlSf.................................................................................. 68
Method Summary .................................................................................................... 68
Method Details......................................................................................................... 68
dump................................................................................................................................... 68
load ..................................................................................................................................... 68
Doctrine_Parser_YamlSf_Dumper ................................................................... 69
Method Summary .................................................................................................... 69
Method Details......................................................................................................... 69
dump................................................................................................................................... 69
Doctrine_Parser_YamlSf_Inline....................................................................... 69
Method Summary .................................................................................................... 69
Method Details......................................................................................................... 70
dump................................................................................................................................... 70
load ..................................................................................................................................... 70
evaluateScalar .................................................................................................................... 70
parseSequence ................................................................................................................... 70
parseMapping..................................................................................................................... 71
parseScalar......................................................................................................................... 71
dumpArray.......................................................................................................................... 71
getTimestampRegex ........................................................................................................... 71
parseQuotedScalar ............................................................................................................. 71
Doctrine_Parser_YamlSf_Parser ...................................................................... 72
Method Summary .................................................................................................... 72
Method Details......................................................................................................... 72
getNextEmbedBlock ........................................................................................................... 72
getRealCurrentLineNb ....................................................................................................... 72
parseValue.......................................................................................................................... 73
isCurrentLineEmpty ........................................................................................................... 73
isCurrentLineBlank ............................................................................................................ 73
parse................................................................................................................................... 73
parseFoldedScalar.............................................................................................................. 73
getCurrentLineIndentation ................................................................................................ 74
__construct ......................................................................................................................... 74
isCurrentLineComment ...................................................................................................... 74
isNextLineIndented ............................................................................................................ 74
cleanup ............................................................................................................................... 74
moveToPreviousLine .......................................................................................................... 74
moveToNextLine................................................................................................................. 74
Doctrine .......................................................................................................... 75
Method Summary .................................................................................................... 75
Method Details......................................................................................................... 76

----------------- Brought to you by


Table of Contents iii

generateSqlFromModels .................................................................................................... 76
dump................................................................................................................................... 76
isValidModelClass .............................................................................................................. 76
generateYamlFromModels ................................................................................................. 77
generateMigrationsFromDb ............................................................................................... 77
getConnectionByTableName .............................................................................................. 77
debug.................................................................................................................................. 77
loadModel ........................................................................................................................... 77
getLoadedModels ............................................................................................................... 77
createDatabases ................................................................................................................. 78
autoload .............................................................................................................................. 78
generateMigrationsFromDiff.............................................................................................. 78
dumpData ........................................................................................................................... 78
initializeModels .................................................................................................................. 78
filterInvalidModels ............................................................................................................. 79
compile ............................................................................................................................... 79
generateMigrationsFromModels........................................................................................ 79
getTable.............................................................................................................................. 79
__construct ......................................................................................................................... 79
getPath ............................................................................................................................... 79
getLoadedModelFiles ......................................................................................................... 80
generateModelsFromYaml ................................................................................................. 80
loadData ............................................................................................................................. 80
dropDatabases.................................................................................................................... 80
generateModelsFromDb..................................................................................................... 80
createTablesFromArray...................................................................................................... 81
generateMigrationClass ..................................................................................................... 81
generateYamlFromDb ........................................................................................................ 81
createTablesFromModels ................................................................................................... 81
migrate ............................................................................................................................... 81
generateSqlFromArray....................................................................................................... 82
loadModels ......................................................................................................................... 82
Doctrine_Access .............................................................................................. 82
Direct Sub-Classes..................................................................................................... 0
Method Summary .................................................................................................... 82
Method Details......................................................................................................... 83
__isset ................................................................................................................................. 83
add...................................................................................................................................... 83
offsetUnset ......................................................................................................................... 83
offsetSet ............................................................................................................................. 83
offsetGet ............................................................................................................................. 83
contains .............................................................................................................................. 83
get....................................................................................................................................... 84
offsetExists ......................................................................................................................... 84
__get ................................................................................................................................... 84
__unset................................................................................................................................ 84
setArray .............................................................................................................................. 84
set ....................................................................................................................................... 84
remove................................................................................................................................ 85
__set.................................................................................................................................... 84
Doctrine_Adapter_Db2 .................................................................................... 85
Method Summary .................................................................................................... 85
Method Details......................................................................................................... 86
getQuoteIdentifierSymbol .................................................................................................. 86

----------------- Brought to you by


Table of Contents iv

_commit .............................................................................................................................. 86
_setExecuteMode................................................................................................................ 86
setFetchMode ..................................................................................................................... 86
_getExecuteMode ............................................................................................................... 86
__construct ......................................................................................................................... 86
prepare ............................................................................................................................... 87
closeConnection ................................................................................................................. 87
_connect.............................................................................................................................. 87
_quote ................................................................................................................................. 87
_beginTransaction .............................................................................................................. 87
_rollBack ............................................................................................................................. 87
Doctrine_Adapter_Interface ............................................................................ 88
Method Summary .................................................................................................... 88
Method Details......................................................................................................... 88
exec .................................................................................................................................... 88
commit................................................................................................................................ 88
beginTransaction................................................................................................................ 88
errorInfo ............................................................................................................................. 88
rollBack .............................................................................................................................. 89
lastInsertId ......................................................................................................................... 89
query................................................................................................................................... 89
errorCode ........................................................................................................................... 89
quote................................................................................................................................... 89
prepare ............................................................................................................................... 89
Doctrine_Adapter_Mock .................................................................................. 89
Method Summary .................................................................................................... 89
Method Details......................................................................................................... 90
pop...................................................................................................................................... 90
exec .................................................................................................................................... 90
getName ............................................................................................................................. 90
getAll .................................................................................................................................. 90
commit................................................................................................................................ 91
beginTransaction................................................................................................................ 91
errorInfo ............................................................................................................................. 91
rollBack .............................................................................................................................. 91
lastInsertId ......................................................................................................................... 91
addQuery ............................................................................................................................ 91
query................................................................................................................................... 91
errorCode ........................................................................................................................... 91
quote................................................................................................................................... 92
sqliteCreateFunction .......................................................................................................... 92
__construct ......................................................................................................................... 92
getAttribute ........................................................................................................................ 92
count................................................................................................................................... 92
prepare ............................................................................................................................... 92
forceLastInsertIdFail.......................................................................................................... 92
forceException.................................................................................................................... 92
setAttribute ........................................................................................................................ 93
Doctrine_Adapter_Mysqli ................................................................................ 93
Method Summary .................................................................................................... 93
Method Details......................................................................................................... 93
_commit .............................................................................................................................. 93
lastInsertId ......................................................................................................................... 94

----------------- Brought to you by


Table of Contents v

prepare ............................................................................................................................... 94
closeConnection ................................................................................................................. 94
_connect.............................................................................................................................. 94
_beginTransaction .............................................................................................................. 94
_rollBack ............................................................................................................................. 94
Doctrine_Adapter_Oracle ................................................................................ 95
Method Summary .................................................................................................... 95
Method Details......................................................................................................... 95
exec .................................................................................................................................... 95
commit................................................................................................................................ 95
beginTransaction................................................................................................................ 96
errorInfo ............................................................................................................................. 96
rollBack .............................................................................................................................. 96
lastInsertId ......................................................................................................................... 96
query................................................................................................................................... 96
errorCode ........................................................................................................................... 96
quote................................................................................................................................... 96
__construct ......................................................................................................................... 96
getAttribute ........................................................................................................................ 97
prepare ............................................................................................................................... 97
getConnection .................................................................................................................... 97
setAttribute ........................................................................................................................ 97
Doctrine_Adapter_Statement .......................................................................... 97
Method Summary .................................................................................................... 97
Method Details......................................................................................................... 98
rowCount ............................................................................................................................ 98
errorInfo ............................................................................................................................. 98
setFetchMode ..................................................................................................................... 98
errorCode ........................................................................................................................... 98
fetch.................................................................................................................................... 98
columnCount ...................................................................................................................... 99
execute ............................................................................................................................... 99
bindValue............................................................................................................................ 99
nextRowset ......................................................................................................................... 99
Doctrine_Adapter_Statement_Interface .......................................................... 99
Method Summary .................................................................................................... 99
Method Details....................................................................................................... 100
rowCount .......................................................................................................................... 100
closeCursor....................................................................................................................... 100
fetchColumn ..................................................................................................................... 101
errorInfo ........................................................................................................................... 101
fetchObject ....................................................................................................................... 101
setFetchMode ................................................................................................................... 101
errorCode ......................................................................................................................... 101
fetch.................................................................................................................................. 102
columnCount .................................................................................................................... 102
bindColumn ...................................................................................................................... 102
bindParam ........................................................................................................................ 103
getAttribute ...................................................................................................................... 103
execute ............................................................................................................................. 103
getColumnMeta ................................................................................................................ 104
bindValue.......................................................................................................................... 104
nextRowset ....................................................................................................................... 104

----------------- Brought to you by


Table of Contents vi

fetchAll ............................................................................................................................. 104


setAttribute ...................................................................................................................... 105
Doctrine_Adapter_Statement_Mock .............................................................. 105
Method Summary .................................................................................................. 105
Method Details....................................................................................................... 106
rowCount .......................................................................................................................... 106
closeCursor....................................................................................................................... 106
fetchColumn ..................................................................................................................... 107
errorInfo ........................................................................................................................... 107
fetchObject ....................................................................................................................... 107
setFetchMode ................................................................................................................... 107
errorCode ......................................................................................................................... 107
fetch.................................................................................................................................. 108
columnCount .................................................................................................................... 108
bindColumn ...................................................................................................................... 108
bindParam ........................................................................................................................ 108
__construct ....................................................................................................................... 109
getAttribute ...................................................................................................................... 109
execute ............................................................................................................................. 109
getColumnMeta ................................................................................................................ 109
bindValue.......................................................................................................................... 110
nextRowset ....................................................................................................................... 110
fetchAll ............................................................................................................................. 110
setAttribute ...................................................................................................................... 110
Doctrine_Adapter_Statement_Oracle ............................................................ 111
Method Summary .................................................................................................. 111
Method Details....................................................................................................... 112
rowCount .......................................................................................................................... 112
closeCursor....................................................................................................................... 112
fetchColumn ..................................................................................................................... 112
errorInfo ........................................................................................................................... 112
fetchObject ....................................................................................................................... 113
setFetchMode ................................................................................................................... 113
errorCode ......................................................................................................................... 113
fetch.................................................................................................................................. 113
columnCount .................................................................................................................... 114
bindColumn ...................................................................................................................... 114
bindParam ........................................................................................................................ 114
__construct ....................................................................................................................... 115
getAttribute ...................................................................................................................... 115
execute ............................................................................................................................. 115
getColumnMeta ................................................................................................................ 115
bindValue.......................................................................................................................... 115
nextRowset ....................................................................................................................... 116
fetchAll ............................................................................................................................. 116
setAttribute ...................................................................................................................... 116
Doctrine_AuditLog ........................................................................................ 117
Inheritance................................................................................................................. 0
Method Summary .................................................................................................. 117
Method Details....................................................................................................... 117
setTableDefinition ............................................................................................................ 117
__construct ....................................................................................................................... 117
getVersion ........................................................................................................................ 117

----------------- Brought to you by


Table of Contents vii

getMaxVersion.................................................................................................................. 117
Doctrine_AuditLog_Listener.......................................................................... 118
Inheritance................................................................................................................. 0
Method Summary .................................................................................................. 118
Method Details....................................................................................................... 118
preDelete .......................................................................................................................... 118
_getNextVersion ............................................................................................................... 118
preInsert........................................................................................................................... 118
__construct ....................................................................................................................... 119
postInsert ......................................................................................................................... 119
preUpdate......................................................................................................................... 119
Doctrine_Builder ........................................................................................... 119
Direct Sub-Classes..................................................................................................... 0
Method Summary .................................................................................................. 119
Method Details....................................................................................................... 119
varExport.......................................................................................................................... 119
Doctrine_Cache ............................................................................................. 120
Inheritance................................................................................................................. 0
Method Summary .................................................................................................. 120
Method Details....................................................................................................... 121
getOption.......................................................................................................................... 121
pop.................................................................................................................................... 121
isSuccessful ...................................................................................................................... 121
getAll ................................................................................................................................ 121
add.................................................................................................................................... 121
appendStats...................................................................................................................... 121
clean ................................................................................................................................. 122
preFetch ........................................................................................................................... 122
getDriver .......................................................................................................................... 122
__construct ....................................................................................................................... 122
preFetchAll ....................................................................................................................... 122
count................................................................................................................................. 122
preQuery........................................................................................................................... 122
setOption .......................................................................................................................... 123
getIterator ........................................................................................................................ 123
preExecute ....................................................................................................................... 123
reset.................................................................................................................................. 123
readStats .......................................................................................................................... 123
Doctrine_Cache_Apc ...................................................................................... 124
Inheritance................................................................................................................. 0
Method Summary .................................................................................................. 124
Method Details....................................................................................................... 124
delete ................................................................................................................................ 124
contains ............................................................................................................................ 124
save................................................................................................................................... 125
fetch.................................................................................................................................. 125
__construct ....................................................................................................................... 125
Doctrine_Cache_Array ................................................................................... 125
Method Summary .................................................................................................. 125
Method Details....................................................................................................... 126
delete ................................................................................................................................ 126

----------------- Brought to you by


Table of Contents viii

contains ............................................................................................................................ 126


save................................................................................................................................... 126
fetch.................................................................................................................................. 127
count................................................................................................................................. 127
deleteAll............................................................................................................................ 127
Doctrine_Cache_Db ....................................................................................... 127
Inheritance................................................................................................................. 0
Method Summary .................................................................................................. 127
Method Details....................................................................................................... 128
delete ................................................................................................................................ 128
contains ............................................................................................................................ 128
save................................................................................................................................... 128
fetch.................................................................................................................................. 128
__construct ....................................................................................................................... 129
count................................................................................................................................. 129
getConnection .................................................................................................................. 129
deleteAll............................................................................................................................ 129
createTable....................................................................................................................... 129
Doctrine_Cache_Driver.................................................................................. 130
Direct Sub-Classes..................................................................................................... 0
Method Summary .................................................................................................. 130
Method Details....................................................................................................... 130
getOption.......................................................................................................................... 130
__construct ....................................................................................................................... 130
setOption .......................................................................................................................... 130
Doctrine_Cache_Interface ............................................................................. 131
Method Summary .................................................................................................. 131
Method Details....................................................................................................... 131
delete ................................................................................................................................ 131
contains ............................................................................................................................ 131
save................................................................................................................................... 132
fetch.................................................................................................................................. 132
Doctrine_Cache_Memcache .......................................................................... 132
Inheritance................................................................................................................. 0
Method Summary .................................................................................................. 132
Method Details....................................................................................................... 133
delete ................................................................................................................................ 133
contains ............................................................................................................................ 133
save................................................................................................................................... 133
fetch.................................................................................................................................. 133
__construct ....................................................................................................................... 134
Doctrine_Cache_Xcache ................................................................................ 134
Inheritance................................................................................................................. 0
Method Summary .................................................................................................. 134
Method Details....................................................................................................... 134
delete ................................................................................................................................ 134
contains ............................................................................................................................ 134
save................................................................................................................................... 135
fetch.................................................................................................................................. 135
__construct ....................................................................................................................... 135
Doctrine_Cli................................................................................................... 136

----------------- Brought to you by


Table of Contents ix

Method Summary .................................................................................................. 136


Method Details....................................................................................................... 136
notify................................................................................................................................. 136
printTasks......................................................................................................................... 136
_getTaskClassFromArgs ................................................................................................... 137
_run................................................................................................................................... 137
__construct ....................................................................................................................... 137
run .................................................................................................................................... 137
loadTasks.......................................................................................................................... 137
notifyException................................................................................................................. 137
prepareArgs...................................................................................................................... 138
getLoadedTasks................................................................................................................ 138
Doctrine_Cli_AnsiColorFormatter ................................................................. 138
Inheritance................................................................................................................. 0
Method Summary .................................................................................................. 138
Method Details....................................................................................................... 139
supportsColors ................................................................................................................. 139
excerpt.............................................................................................................................. 139
formatSection ................................................................................................................... 139
setStyle ............................................................................................................................. 139
format ............................................................................................................................... 140
Doctrine_Cli_Formatter................................................................................. 140
Direct Sub-Classes..................................................................................................... 0
Method Summary .................................................................................................. 140
Method Details....................................................................................................... 140
setMaxLineSize ................................................................................................................ 140
excerpt.............................................................................................................................. 140
formatSection ................................................................................................................... 141
__construct ....................................................................................................................... 141
format ............................................................................................................................... 141
Doctrine_Collection....................................................................................... 141
Inheritance................................................................................................................. 0
Direct Sub-Classes..................................................................................................... 0
Method Summary .................................................................................................. 141
Method Details....................................................................................................... 143
getKeyColumn .................................................................................................................. 143
toKeyValueArray............................................................................................................... 143
populateRelated ............................................................................................................... 144
key .................................................................................................................................... 144
compareRecords............................................................................................................... 144
add.................................................................................................................................... 144
clear.................................................................................................................................. 144
delete ................................................................................................................................ 144
getRelation ....................................................................................................................... 144
getNormalIterator ............................................................................................................ 144
importFrom ...................................................................................................................... 145
merge ............................................................................................................................... 145
serialize ............................................................................................................................ 145
initNullObject ................................................................................................................... 145
loadRelated....................................................................................................................... 145
__toString ......................................................................................................................... 145
contains ............................................................................................................................ 145
get..................................................................................................................................... 146

----------------- Brought to you by


Table of Contents x

save................................................................................................................................... 146
getSnapshot...................................................................................................................... 146
processDiff........................................................................................................................ 146
setData ............................................................................................................................. 146
takeSnapshot .................................................................................................................... 146
getReference .................................................................................................................... 147
getLast.............................................................................................................................. 147
getTable............................................................................................................................ 147
__construct ....................................................................................................................... 147
setReference..................................................................................................................... 147
search ............................................................................................................................... 147
getDeleteDiff .................................................................................................................... 147
count................................................................................................................................. 147
synchronizeFromArray ..................................................................................................... 148
getFirst ............................................................................................................................. 148
end.................................................................................................................................... 148
getIterator ........................................................................................................................ 148
set ..................................................................................................................................... 148
getData ............................................................................................................................. 148
setKeyColumn................................................................................................................... 148
free ................................................................................................................................... 148
remove.............................................................................................................................. 149
exportTo ........................................................................................................................... 149
getPrimaryKeys ................................................................................................................ 149
fromArray ......................................................................................................................... 149
toArray.............................................................................................................................. 149
unserialize ........................................................................................................................ 149
synchronizeWithArray ...................................................................................................... 149
getKeys ............................................................................................................................. 150
getInsertDiff ..................................................................................................................... 150
Doctrine_Collection_Iterator......................................................................... 150
Direct Sub-Classes..................................................................................................... 0
Method Summary .................................................................................................. 150
Method Details....................................................................................................... 150
key .................................................................................................................................... 150
rewind............................................................................................................................... 151
current.............................................................................................................................. 151
__construct ....................................................................................................................... 151
next................................................................................................................................... 151
Doctrine_Collection_Iterator_Expandable .................................................... 151
Inheritance................................................................................................................. 0
Method Summary .................................................................................................. 151
Method Details....................................................................................................... 151
valid .................................................................................................................................. 151
Doctrine_Collection_Iterator_Normal ........................................................... 152
Inheritance................................................................................................................. 0
Method Summary .................................................................................................. 152
Method Details....................................................................................................... 152
valid .................................................................................................................................. 152
Doctrine_Collection_Iterator_Offset ............................................................. 152
Inheritance................................................................................................................. 0
Method Summary .................................................................................................. 152

----------------- Brought to you by


Table of Contents xi

Method Details....................................................................................................... 153


valid .................................................................................................................................. 153
Doctrine_Collection_Offset ........................................................................... 153
Inheritance................................................................................................................. 0
Method Summary .................................................................................................. 153
Method Details....................................................................................................... 153
__construct ....................................................................................................................... 153
getLimit ............................................................................................................................ 153
getIterator ........................................................................................................................ 153
Doctrine_Column........................................................................................... 154
Inheritance................................................................................................................. 0
Method Summary .................................................................................................. 154
Method Details....................................................................................................... 154
contains ............................................................................................................................ 154
get..................................................................................................................................... 154
getDefinition..................................................................................................................... 154
__construct ....................................................................................................................... 154
count................................................................................................................................. 155
enumValue........................................................................................................................ 155
enumIndex ........................................................................................................................ 155
getEnumValues................................................................................................................. 155
getIterator ........................................................................................................................ 155
set ..................................................................................................................................... 155
Doctrine_Compiler ........................................................................................ 155
Method Summary .................................................................................................. 155
Method Details....................................................................................................... 156
compile ............................................................................................................................. 156
Doctrine_Configurable .................................................................................. 156
Direct Sub-Classes..................................................................................................... 0
Method Summary .................................................................................................. 156
Method Details....................................................................................................... 157
getAttributeValueFromString .......................................................................................... 157
setListener........................................................................................................................ 157
setParam........................................................................................................................... 158
addRecordListener ........................................................................................................... 158
getCharset ........................................................................................................................ 158
getParams......................................................................................................................... 158
getAttributes .................................................................................................................... 158
getImpl ............................................................................................................................. 158
hasImpl ............................................................................................................................. 158
getParam .......................................................................................................................... 158
getAttributeFromString.................................................................................................... 158
getParent .......................................................................................................................... 159
setCharset ........................................................................................................................ 159
getAttribute ...................................................................................................................... 159
getCollate ......................................................................................................................... 159
setImpl.............................................................................................................................. 159
setRecordListener ............................................................................................................ 159
setParent .......................................................................................................................... 160
getRecordListener ............................................................................................................ 160
getListener ....................................................................................................................... 160
setCollate.......................................................................................................................... 160

----------------- Brought to you by


Table of Contents xii

addListener....................................................................................................................... 160
getParamNamespaces ...................................................................................................... 160
setAttribute ...................................................................................................................... 160
setEventListener .............................................................................................................. 161
Doctrine_Connection..................................................................................... 161
Inheritance................................................................................................................. 0
Direct Sub-Classes..................................................................................................... 0
Method Summary .................................................................................................. 161
Method Details....................................................................................................... 165
incrementQueryCount ...................................................................................................... 165
getTables .......................................................................................................................... 165
getDriverName ................................................................................................................. 165
update............................................................................................................................... 165
fetchArray......................................................................................................................... 165
getDbh .............................................................................................................................. 165
getOption.......................................................................................................................... 166
exec .................................................................................................................................. 166
getName ........................................................................................................................... 166
generateUniqueIndexName ............................................................................................. 166
getTmpConnection ........................................................................................................... 166
beginInternalTransaction ................................................................................................. 166
getCacheDriver ................................................................................................................ 166
clear.................................................................................................................................. 167
fetchColumn ..................................................................................................................... 167
commit.............................................................................................................................. 167
createQuery...................................................................................................................... 167
fetchBoth .......................................................................................................................... 167
beginTransaction.............................................................................................................. 168
delete ................................................................................................................................ 168
convertBooleans ............................................................................................................... 168
select ................................................................................................................................ 168
setName ........................................................................................................................... 168
errorInfo ........................................................................................................................... 169
getAvailableDrivers .......................................................................................................... 169
getOptions ........................................................................................................................ 169
dropDatabase ................................................................................................................... 169
rollback............................................................................................................................. 169
serialize ............................................................................................................................ 169
rethrowException ............................................................................................................. 169
lastInsertId ....................................................................................................................... 170
getTransactionLevel ......................................................................................................... 170
__toString ......................................................................................................................... 170
query................................................................................................................................. 170
fetchRow........................................................................................................................... 170
close.................................................................................................................................. 171
__get ................................................................................................................................. 171
supports............................................................................................................................ 171
driverName....................................................................................................................... 171
errorCode ......................................................................................................................... 171
standaloneQuery .............................................................................................................. 171
quote................................................................................................................................. 172
modifyLimitSubquery ....................................................................................................... 172
_generateUniqueName..................................................................................................... 172
fetchOne ........................................................................................................................... 172
getManager ...................................................................................................................... 172

----------------- Brought to you by


Table of Contents xiii

quoteIdentifier.................................................................................................................. 172
getTable............................................................................................................................ 173
__construct ....................................................................................................................... 173
getAttribute ...................................................................................................................... 173
addTable ........................................................................................................................... 173
setDateFormat.................................................................................................................. 173
count................................................................................................................................. 173
execute ............................................................................................................................. 174
insert ................................................................................................................................ 174
connect ............................................................................................................................. 174
generateUniqueRelationForeignKeyName....................................................................... 174
modifyLimitQuery............................................................................................................. 174
replace.............................................................................................................................. 174
quoteMultipleIdentifier .................................................................................................... 175
setOption .......................................................................................................................... 175
getIterator ........................................................................................................................ 175
prepare ............................................................................................................................. 175
getQueryCacheDriver....................................................................................................... 176
flush .................................................................................................................................. 176
fetchAssoc ........................................................................................................................ 176
createDatabase................................................................................................................. 176
queryOne .......................................................................................................................... 176
getResultCacheDriver ...................................................................................................... 176
fetchAll ............................................................................................................................. 177
create................................................................................................................................ 177
unserialize ........................................................................................................................ 177
hasTable ........................................................................................................................... 177
setAttribute ...................................................................................................................... 177
evictTables........................................................................................................................ 177
Doctrine_Connection_Common ..................................................................... 178
Inheritance................................................................................................................. 0
Direct Sub-Classes..................................................................................................... 0
Method Summary .................................................................................................. 178
Method Details....................................................................................................... 178
modifyLimitQuery............................................................................................................. 178
Doctrine_Connection_Db2............................................................................. 178
Inheritance................................................................................................................. 0
Method Summary .................................................................................................. 178
Method Details....................................................................................................... 179
modifyLimitQuery............................................................................................................. 179
Doctrine_Connection_Exception ................................................................... 179
Method Summary .................................................................................................. 179
Method Details....................................................................................................... 179
processErrorInfo .............................................................................................................. 179
errorMessage ................................................................................................................... 180
getPortableCode ............................................................................................................... 180
getPortableMessage ......................................................................................................... 180
Doctrine_Connection_Firebird ...................................................................... 180
Inheritance................................................................................................................. 0
Method Summary .................................................................................................. 180
Method Details....................................................................................................... 181
setCharset ........................................................................................................................ 181

----------------- Brought to you by


Table of Contents xiv

__construct ....................................................................................................................... 181


modifyLimitQuery............................................................................................................. 181
Doctrine_Connection_Firebird_Exception ..................................................... 181
Method Summary .................................................................................................. 181
Method Details....................................................................................................... 182
processErrorInfo .............................................................................................................. 182
Doctrine_Connection_Informix ..................................................................... 182
Inheritance................................................................................................................. 0
Method Summary .................................................................................................. 182
Method Details....................................................................................................... 182
quoteIdentifier.................................................................................................................. 182
__construct ....................................................................................................................... 182
Doctrine_Connection_Mock .......................................................................... 183
Inheritance................................................................................................................. 0
Method Summary .................................................................................................. 183
Method Details....................................................................................................... 183
__construct ....................................................................................................................... 183
Doctrine_Connection_Module ....................................................................... 183
Direct Sub-Classes..................................................................................................... 0
Method Summary .................................................................................................. 183
Method Details....................................................................................................... 184
getModuleName ............................................................................................................... 184
__construct ....................................................................................................................... 184
getConnection .................................................................................................................. 184
Doctrine_Connection_Mssql.......................................................................... 184
Inheritance................................................................................................................. 0
Method Summary .................................................................................................. 184
Method Details....................................................................................................... 185
checkSequence................................................................................................................. 185
getServerVersion.............................................................................................................. 185
quoteIdentifier.................................................................................................................. 185
__construct ....................................................................................................................... 185
modifyLimitQuery............................................................................................................. 185
Doctrine_Connection_Mssql_Exception ........................................................ 186
Method Summary .................................................................................................. 186
Method Details....................................................................................................... 186
processErrorInfo .............................................................................................................. 186
Doctrine_Connection_Mysql.......................................................................... 186
Inheritance................................................................................................................. 0
Method Summary .................................................................................................. 186
Method Details....................................................................................................... 187
getDatabaseName ............................................................................................................ 187
setCharset ........................................................................................................................ 187
__construct ....................................................................................................................... 187
connect ............................................................................................................................. 187
replace.............................................................................................................................. 187
Doctrine_Connection_Mysql_Exception ........................................................ 188
Method Summary .................................................................................................. 188
Method Details....................................................................................................... 188

----------------- Brought to you by


Table of Contents xv

processErrorInfo .............................................................................................................. 188


Doctrine_Connection_Oracle......................................................................... 189
Inheritance................................................................................................................. 0
Method Summary .................................................................................................. 189
Method Details....................................................................................................... 189
modifyLimitSubquery ....................................................................................................... 189
__construct ....................................................................................................................... 189
setDateFormat.................................................................................................................. 189
modifyLimitQuery............................................................................................................. 189
Doctrine_Connection_Oracle_Exception ....................................................... 190
Method Summary .................................................................................................. 190
Method Details....................................................................................................... 190
processErrorInfo .............................................................................................................. 190
Doctrine_Connection_Pgsql .......................................................................... 191
Inheritance................................................................................................................. 0
Method Summary .................................................................................................. 191
Method Details....................................................................................................... 191
convertBooleans ............................................................................................................... 191
getServerVersion.............................................................................................................. 191
setCharset ........................................................................................................................ 191
__construct ....................................................................................................................... 192
modifyLimitQuery............................................................................................................. 192
Doctrine_Connection_Pgsql_Exception ......................................................... 192
Method Summary .................................................................................................. 192
Method Details....................................................................................................... 193
processErrorInfo .............................................................................................................. 193
Doctrine_Connection_Profiler ....................................................................... 193
Method Summary .................................................................................................. 193
Method Details....................................................................................................... 193
pop.................................................................................................................................... 193
getAll ................................................................................................................................ 194
__call ................................................................................................................................. 194
get..................................................................................................................................... 194
__construct ....................................................................................................................... 194
lastEvent........................................................................................................................... 194
count................................................................................................................................. 194
getIterator ........................................................................................................................ 194
setFilterQueryType........................................................................................................... 194
Doctrine_Connection_Sqlite .......................................................................... 195
Inheritance................................................................................................................. 0
Method Summary .................................................................................................. 195
Method Details....................................................................................................... 195
dropDatabase ................................................................................................................... 195
__construct ....................................................................................................................... 195
connect ............................................................................................................................. 195
createDatabase................................................................................................................. 195
Doctrine_Connection_Sqlite_Exception ........................................................ 196
Method Summary .................................................................................................. 196
Method Details....................................................................................................... 196
processErrorInfo .............................................................................................................. 196

----------------- Brought to you by


Table of Contents xvi

Doctrine_Connection_Statement................................................................... 196
Method Summary .................................................................................................. 196
Method Details....................................................................................................... 197
rowCount .......................................................................................................................... 197
closeCursor....................................................................................................................... 198
fetchColumn ..................................................................................................................... 198
errorInfo ........................................................................................................................... 198
fetchObject ....................................................................................................................... 198
getStatement .................................................................................................................... 199
setFetchMode ................................................................................................................... 199
errorCode ......................................................................................................................... 199
fetch.................................................................................................................................. 199
columnCount .................................................................................................................... 199
bindColumn ...................................................................................................................... 200
bindParam ........................................................................................................................ 200
getQuery........................................................................................................................... 200
__construct ....................................................................................................................... 200
getAttribute ...................................................................................................................... 201
execute ............................................................................................................................. 201
getColumnMeta ................................................................................................................ 201
getConnection .................................................................................................................. 201
bindValue.......................................................................................................................... 201
nextRowset ....................................................................................................................... 202
fetchAll ............................................................................................................................. 202
setAttribute ...................................................................................................................... 202
Doctrine_Connection_UnitOfWork ................................................................ 203
Inheritance................................................................................................................. 0
Method Summary .................................................................................................. 203
Method Details....................................................................................................... 204
update............................................................................................................................... 204
saveAll .............................................................................................................................. 204
processSingleInsert .......................................................................................................... 204
saveAssociations............................................................................................................... 204
delete ................................................................................................................................ 204
saveGraph......................................................................................................................... 204
save................................................................................................................................... 205
_cascadeDelete ................................................................................................................. 205
insert ................................................................................................................................ 205
buildFlushTree ................................................................................................................. 205
saveRelated ...................................................................................................................... 205
Doctrine_Data................................................................................................ 206
Direct Sub-Classes..................................................................................................... 0
Method Summary .................................................................................................. 206
Method Details....................................................................................................... 206
getFormats ....................................................................................................................... 206
importData........................................................................................................................ 207
isRelation.......................................................................................................................... 207
getModels ......................................................................................................................... 207
setModels ......................................................................................................................... 207
getFormat ......................................................................................................................... 207
setFormat ......................................................................................................................... 207
exportData ........................................................................................................................ 207
getDirectory ..................................................................................................................... 207

----------------- Brought to you by


Table of Contents xvii

setDirectory ...................................................................................................................... 208


purge ................................................................................................................................ 208
exportIndividualFiles........................................................................................................ 208
Doctrine_Data_Export ................................................................................... 208
Inheritance................................................................................................................. 0
Method Summary .................................................................................................. 208
Method Details....................................................................................................... 208
dumpData ......................................................................................................................... 208
__construct ....................................................................................................................... 209
prepareData...................................................................................................................... 209
doExport ........................................................................................................................... 209
Doctrine_Data_Import ................................................................................... 209
Inheritance................................................................................................................. 0
Method Summary .................................................................................................. 209
Method Details....................................................................................................... 210
_loadData.......................................................................................................................... 210
doImport ........................................................................................................................... 210
_getImportedObject.......................................................................................................... 210
_buildRows ....................................................................................................................... 210
__construct ....................................................................................................................... 210
_processRow ..................................................................................................................... 210
_loadNestedSetData ......................................................................................................... 210
_buildNestedSetRows ....................................................................................................... 211
doParsing.......................................................................................................................... 211
Doctrine_DataDict ......................................................................................... 211
Inheritance................................................................................................................. 0
Direct Sub-Classes..................................................................................................... 0
Method Summary .................................................................................................. 211
Method Details....................................................................................................... 211
compareDefinition ............................................................................................................ 211
parseBoolean .................................................................................................................... 212
Doctrine_DataDict_Firebird .......................................................................... 212
Inheritance................................................................................................................. 0
Method Summary .................................................................................................. 212
Method Details....................................................................................................... 212
getCharsetFieldDeclaration ............................................................................................. 212
getCollationFieldDeclaration ........................................................................................... 212
getNativeDeclaration ....................................................................................................... 213
getPortableDeclaration .................................................................................................... 213
Doctrine_DataDict_Informix ......................................................................... 213
Inheritance................................................................................................................. 0
Method Summary .................................................................................................. 213
Method Details....................................................................................................... 214
getNativeDeclaration ....................................................................................................... 214
Doctrine_DataDict_Mssql .............................................................................. 214
Inheritance................................................................................................................. 0
Method Summary .................................................................................................. 214
Method Details....................................................................................................... 214
getNativeDeclaration ....................................................................................................... 214
getPortableDeclaration .................................................................................................... 215

----------------- Brought to you by


Table of Contents xviii

Doctrine_DataDict_Mysql .............................................................................. 215


Inheritance................................................................................................................. 0
Method Summary .................................................................................................. 215
Method Details....................................................................................................... 215
getIntegerDeclaration ...................................................................................................... 215
getCharsetFieldDeclaration ............................................................................................. 216
getCollationFieldDeclaration ........................................................................................... 216
getNativeDeclaration ....................................................................................................... 216
getPortableDeclaration .................................................................................................... 216
Doctrine_DataDict_Oracle ............................................................................. 217
Inheritance................................................................................................................. 0
Method Summary .................................................................................................. 217
Method Details....................................................................................................... 217
getNativeDeclaration ....................................................................................................... 217
getPortableDeclaration .................................................................................................... 217
Doctrine_DataDict_Pgsql............................................................................... 218
Inheritance................................................................................................................. 0
Method Summary .................................................................................................. 218
Method Details....................................................................................................... 218
getIntegerDeclaration ...................................................................................................... 218
getNativeDeclaration ....................................................................................................... 218
getPortableDeclaration .................................................................................................... 219
parseBoolean .................................................................................................................... 219
Doctrine_DataDict_Sqlite .............................................................................. 219
Inheritance................................................................................................................. 0
Method Summary .................................................................................................. 219
Method Details....................................................................................................... 219
getIntegerDeclaration ...................................................................................................... 219
getNativeDeclaration ....................................................................................................... 220
getPortableDeclaration .................................................................................................... 220
Doctrine_DataType ........................................................................................ 220
Method Summary .................................................................................................. 220
Method Details....................................................................................................... 221
getName ........................................................................................................................... 221
getDefaultLength.............................................................................................................. 221
__construct ....................................................................................................................... 221
Doctrine_Event .............................................................................................. 221
Method Summary .................................................................................................. 221
Method Details....................................................................................................... 222
getName ........................................................................................................................... 222
getCode ............................................................................................................................ 222
getParams......................................................................................................................... 222
start .................................................................................................................................. 222
__get ................................................................................................................................. 222
getQuery........................................................................................................................... 222
__construct ....................................................................................................................... 223
getInvoker ........................................................................................................................ 223
end.................................................................................................................................... 223
set ..................................................................................................................................... 223
hasEnded .......................................................................................................................... 223
getElapsedSecs ................................................................................................................ 223

----------------- Brought to you by


Table of Contents xix

__set.................................................................................................................................. 223
setInvoker......................................................................................................................... 224
skipOperation ................................................................................................................... 224
Doctrine_EventListener................................................................................. 224
Direct Sub-Classes..................................................................................................... 0
Method Summary .................................................................................................. 224
Method Details....................................................................................................... 225
postSavepointRollback ..................................................................................................... 225
postTransactionRollback .................................................................................................. 225
postClose .......................................................................................................................... 225
postSavepointCommit ...................................................................................................... 226
preTransactionBegin ........................................................................................................ 226
preSavepointRollback....................................................................................................... 226
preFetch ........................................................................................................................... 226
postExec ........................................................................................................................... 226
preConnect ....................................................................................................................... 226
preSavepointCreate.......................................................................................................... 226
preTransactionCommit..................................................................................................... 226
preError............................................................................................................................ 226
preStmtExecute................................................................................................................ 226
onCollectionDelete ........................................................................................................... 226
prePrepare........................................................................................................................ 227
postSavepointCreate ........................................................................................................ 227
preFetchAll ....................................................................................................................... 227
preClose............................................................................................................................ 227
preSavepointCommit ........................................................................................................ 227
preQuery........................................................................................................................... 227
postTransactionBegin....................................................................................................... 227
postStmtExecute .............................................................................................................. 227
preTransactionRollback.................................................................................................... 227
postError .......................................................................................................................... 227
postConnect...................................................................................................................... 227
postFetchAll...................................................................................................................... 228
postFetch.......................................................................................................................... 228
onOpen ............................................................................................................................. 228
postPrepare ...................................................................................................................... 228
onPreCollectionDelete...................................................................................................... 228
postTransactionCommit ................................................................................................... 228
preExec............................................................................................................................. 228
postQuery ......................................................................................................................... 228
Doctrine_EventListener_Chain...................................................................... 229
Inheritance................................................................................................................. 0
Method Summary .................................................................................................. 229
Method Details....................................................................................................... 230
add.................................................................................................................................... 230
onSleep ............................................................................................................................. 230
postTransactionRollback .................................................................................................. 230
postClose .......................................................................................................................... 230
preTransactionBegin ........................................................................................................ 230
preFetch ........................................................................................................................... 230
postExec ........................................................................................................................... 231
preConnect ....................................................................................................................... 231
get..................................................................................................................................... 231
preTransactionCommit..................................................................................................... 231

----------------- Brought to you by


Table of Contents xx

onPreLoad ........................................................................................................................ 231


preError............................................................................................................................ 231
preStmtExecute................................................................................................................ 231
onCollectionDelete ........................................................................................................... 231
prePrepare........................................................................................................................ 231
onLoad .............................................................................................................................. 232
preFetchAll ....................................................................................................................... 232
preClose............................................................................................................................ 232
preQuery........................................................................................................................... 232
postTransactionBegin....................................................................................................... 232
postStmtExecute .............................................................................................................. 232
preTransactionRollback.................................................................................................... 232
postError .......................................................................................................................... 232
set ..................................................................................................................................... 232
onWakeUp ........................................................................................................................ 233
postConnect...................................................................................................................... 233
postFetchAll...................................................................................................................... 233
postFetch.......................................................................................................................... 233
onOpen ............................................................................................................................. 233
postPrepare ...................................................................................................................... 233
onPreCollectionDelete...................................................................................................... 233
postTransactionCommit ................................................................................................... 233
preExec............................................................................................................................. 233
postQuery ......................................................................................................................... 234
Doctrine_EventListener_Interface ................................................................ 234
Method Summary .................................................................................................. 234
Method Details....................................................................................................... 235
postTransactionRollback .................................................................................................. 235
preTransactionBegin ........................................................................................................ 235
preFetch ........................................................................................................................... 235
postExec ........................................................................................................................... 235
preConnect ....................................................................................................................... 235
preTransactionCommit..................................................................................................... 235
preError............................................................................................................................ 235
preStmtExecute................................................................................................................ 235
prePrepare........................................................................................................................ 235
preFetchAll ....................................................................................................................... 235
preQuery........................................................................................................................... 235
postTransactionBegin....................................................................................................... 236
postStmtExecute .............................................................................................................. 236
preTransactionRollback.................................................................................................... 236
postError .......................................................................................................................... 236
postConnect...................................................................................................................... 236
postFetchAll...................................................................................................................... 236
postFetch.......................................................................................................................... 236
postPrepare ...................................................................................................................... 236
postTransactionCommit ................................................................................................... 236
preExec............................................................................................................................. 236
postQuery ......................................................................................................................... 236
Doctrine_Exception ....................................................................................... 237
Method Summary .................................................................................................. 237
Method Details....................................................................................................... 237
errorMessage ................................................................................................................... 237

----------------- Brought to you by


Table of Contents xxi

Doctrine_Export ............................................................................................ 237


Inheritance................................................................................................................. 0
Direct Sub-Classes..................................................................................................... 0
Method Summary .................................................................................................. 237
Method Details....................................................................................................... 239
exportSchema................................................................................................................... 239
dropDatabaseSql .............................................................................................................. 239
exportGeneratorsSql ........................................................................................................ 240
createConstraintSql.......................................................................................................... 240
dropSequence................................................................................................................... 240
createIndexSql ................................................................................................................. 240
getDeclaration .................................................................................................................. 241
createTableSql.................................................................................................................. 241
getDefaultFieldDeclaration .............................................................................................. 241
getNotNullFieldDeclaration ............................................................................................. 241
getAdvancedForeignKeyOptions ...................................................................................... 242
dropDatabase ................................................................................................................... 242
exportSortedClassesSql.................................................................................................... 242
exportClassesSql .............................................................................................................. 242
getCharsetFieldDeclaration ............................................................................................. 242
getCollationFieldDeclaration ........................................................................................... 242
dropIndex ......................................................................................................................... 243
dropSequenceSql.............................................................................................................. 243
createConstraint............................................................................................................... 243
alterTableSql .................................................................................................................... 243
exportTable....................................................................................................................... 244
getForeignKeyBaseDeclaration........................................................................................ 244
createForeignKeySql ........................................................................................................ 244
getCheckDeclaration ........................................................................................................ 244
exportClasses ................................................................................................................... 244
dropTable ......................................................................................................................... 245
exportSql .......................................................................................................................... 245
getForeignKeyReferentialAction ...................................................................................... 245
alterTable ......................................................................................................................... 245
dropIndexSql .................................................................................................................... 246
dropTableSql .................................................................................................................... 246
dropConstraint ................................................................................................................. 246
createSequence ................................................................................................................ 246
createIndex....................................................................................................................... 247
getUniqueFieldDeclaration .............................................................................................. 247
getForeignKeyDeclaration ............................................................................................... 247
getTemporaryTableQuery ................................................................................................ 247
dropForeignKey................................................................................................................ 248
createSequenceSql........................................................................................................... 248
getIndexDeclaration ......................................................................................................... 248
getAllGenerators .............................................................................................................. 248
createDatabase................................................................................................................. 249
createForeignKey ............................................................................................................. 249
getFieldDeclarationList .................................................................................................... 249
createTable....................................................................................................................... 249
createDatabaseSql ........................................................................................................... 249
getIndexFieldDeclarationList ........................................................................................... 249
Doctrine_Export_Firebird .............................................................................. 250
Inheritance................................................................................................................. 0

----------------- Brought to you by


Table of Contents xxii

Method Summary .................................................................................................. 250


Method Details....................................................................................................... 250
_dropAutoincrement ......................................................................................................... 250
createIndexSql ................................................................................................................. 251
checkSupportedChanges.................................................................................................. 251
dropDatabase ................................................................................................................... 251
dropSequenceSql.............................................................................................................. 251
createConstraint............................................................................................................... 251
dropTable ......................................................................................................................... 252
alterTable ......................................................................................................................... 252
createSequence ................................................................................................................ 252
getTemporaryTableQuery ................................................................................................ 252
createDatabase................................................................................................................. 253
createTable....................................................................................................................... 253
_makeAutoincrement........................................................................................................ 253
Doctrine_Export_Frontbase........................................................................... 253
Inheritance................................................................................................................. 0
Method Summary .................................................................................................. 253
Method Details....................................................................................................... 254
dropDatabaseSql .............................................................................................................. 254
dropSequenceSql.............................................................................................................. 254
alterTable ......................................................................................................................... 254
dropIndexSql .................................................................................................................... 254
dropTableSql .................................................................................................................... 255
createSequence ................................................................................................................ 255
createDatabaseSql ........................................................................................................... 255
Doctrine_Export_Mssql ................................................................................. 255
Inheritance................................................................................................................. 0
Method Summary .................................................................................................. 255
Method Details....................................................................................................... 256
getNotNullFieldDeclaration ............................................................................................. 256
dropDatabase ................................................................................................................... 256
dropSequenceSql.............................................................................................................. 256
alterTable ......................................................................................................................... 256
createSequence ................................................................................................................ 257
getTemporaryTableQuery ................................................................................................ 257
getIndexDeclaration ......................................................................................................... 257
createDatabase................................................................................................................. 257
Doctrine_Export_Mysql ................................................................................. 258
Inheritance................................................................................................................. 0
Method Summary .................................................................................................. 258
Method Details....................................................................................................... 258
dropDatabaseSql .............................................................................................................. 258
createIndexSql ................................................................................................................. 259
getDeclaration .................................................................................................................. 259
createTableSql.................................................................................................................. 259
getDefaultFieldDeclaration .............................................................................................. 259
getAdvancedForeignKeyOptions ...................................................................................... 260
alterTableSql .................................................................................................................... 260
dropIndexSql .................................................................................................................... 260
dropTableSql .................................................................................................................... 260
createSequence ................................................................................................................ 261
dropForeignKey................................................................................................................ 261

----------------- Brought to you by


Table of Contents xxiii

getIndexDeclaration ......................................................................................................... 261


createDatabaseSql ........................................................................................................... 261
getIndexFieldDeclarationList ........................................................................................... 261
Doctrine_Export_Oracle ................................................................................ 262
Inheritance................................................................................................................. 0
Method Summary .................................................................................................. 262
Method Details....................................................................................................... 262
createTableSql.................................................................................................................. 262
getAdvancedForeignKeyOptions ...................................................................................... 263
dropDatabase ................................................................................................................... 263
dropSequenceSql.............................................................................................................. 263
dropAutoincrement........................................................................................................... 263
dropTable ......................................................................................................................... 263
alterTable ......................................................................................................................... 264
getTemporaryTableQuery ................................................................................................ 264
createSequenceSql........................................................................................................... 264
getIndexDeclaration ......................................................................................................... 264
createDatabase................................................................................................................. 265
createTable....................................................................................................................... 265
_makeAutoincrement........................................................................................................ 265
Doctrine_Export_Pgsql .................................................................................. 266
Inheritance................................................................................................................. 0
Method Summary .................................................................................................. 266
Method Details....................................................................................................... 266
dropDatabaseSql .............................................................................................................. 266
createTableSql.................................................................................................................. 266
getAdvancedForeignKeyOptions ...................................................................................... 267
dropSequenceSql.............................................................................................................. 267
alterTableSql .................................................................................................................... 267
alterTable ......................................................................................................................... 267
createSequenceSql........................................................................................................... 268
createDatabaseSql ........................................................................................................... 268
Doctrine_Export_Reporter............................................................................. 268
Method Summary .................................................................................................. 268
Method Details....................................................................................................... 268
pop.................................................................................................................................... 268
add.................................................................................................................................... 269
getIterator ........................................................................................................................ 269
Doctrine_Export_Schema .............................................................................. 269
Method Summary .................................................................................................. 269
Method Details....................................................................................................... 269
exportSchema................................................................................................................... 269
buildSchema ..................................................................................................................... 269
Doctrine_Export_Sqlite.................................................................................. 270
Inheritance................................................................................................................. 0
Method Summary .................................................................................................. 270
Method Details....................................................................................................... 270
createIndexSql ................................................................................................................. 270
createTableSql.................................................................................................................. 271
getAdvancedForeignKeyOptions ...................................................................................... 271
dropDatabase ................................................................................................................... 271

----------------- Brought to you by


Table of Contents xxiv

dropSequenceSql.............................................................................................................. 271
alterTableSql .................................................................................................................... 271
createSequence ................................................................................................................ 272
createDatabase................................................................................................................. 272
createForeignKey ............................................................................................................. 272
getIndexFieldDeclarationList ........................................................................................... 272
Doctrine_Expression ..................................................................................... 273
Method Summary .................................................................................................. 273
Method Details....................................................................................................... 273
parseExpression ............................................................................................................... 273
setExpression ................................................................................................................... 273
__toString ......................................................................................................................... 273
parseClause ...................................................................................................................... 274
__construct ....................................................................................................................... 274
getSql ............................................................................................................................... 274
getConnection .................................................................................................................. 274
Doctrine_Expression_Driver .......................................................................... 274
Inheritance................................................................................................................. 0
Direct Sub-Classes..................................................................................................... 0
Method Summary .................................................................................................. 274
Method Details....................................................................................................... 277
pi....................................................................................................................................... 277
upper ................................................................................................................................ 277
avg .................................................................................................................................... 278
md5................................................................................................................................... 278
add.................................................................................................................................... 278
between ............................................................................................................................ 278
length................................................................................................................................ 279
ltrim .................................................................................................................................. 279
__call ................................................................................................................................. 279
trim ................................................................................................................................... 279
cos .................................................................................................................................... 279
regexp............................................................................................................................... 279
not..................................................................................................................................... 279
mul.................................................................................................................................... 280
substring........................................................................................................................... 280
rtrim ................................................................................................................................. 280
coalesce ............................................................................................................................ 280
neq.................................................................................................................................... 280
in....................................................................................................................................... 281
mod................................................................................................................................... 281
now ................................................................................................................................... 281
sum ................................................................................................................................... 281
isNull ................................................................................................................................ 281
sub .................................................................................................................................... 282
lte...................................................................................................................................... 282
sin ..................................................................................................................................... 282
gte..................................................................................................................................... 282
count................................................................................................................................. 282
getIdentifiers .................................................................................................................... 283
guid................................................................................................................................... 283
max ................................................................................................................................... 283
eq...................................................................................................................................... 283
getIdentifier...................................................................................................................... 283

----------------- Brought to you by


Table of Contents xxv

round ................................................................................................................................ 283


lt ....................................................................................................................................... 284
gt ...................................................................................................................................... 284
div ..................................................................................................................................... 284
lower................................................................................................................................. 284
isNotNull .......................................................................................................................... 285
soundex ............................................................................................................................ 285
concat ............................................................................................................................... 285
acos................................................................................................................................... 285
locate ................................................................................................................................ 285
min.................................................................................................................................... 286
Doctrine_Expression_Firebird ....................................................................... 286
Inheritance................................................................................................................. 0
Method Summary .................................................................................................. 286
Method Details....................................................................................................... 286
patternEscapeString ........................................................................................................ 286
functionTable.................................................................................................................... 286
Doctrine_Expression_Mssql........................................................................... 287
Inheritance................................................................................................................. 0
Method Summary .................................................................................................. 287
Method Details....................................................................................................... 287
substring........................................................................................................................... 287
now ................................................................................................................................... 287
guid................................................................................................................................... 288
concat ............................................................................................................................... 288
Doctrine_Expression_Mysql .......................................................................... 288
Inheritance................................................................................................................. 0
Method Summary .................................................................................................. 288
Method Details....................................................................................................... 289
month................................................................................................................................ 289
matchPattern .................................................................................................................... 289
regexp............................................................................................................................... 289
random ............................................................................................................................. 289
day .................................................................................................................................... 289
guid................................................................................................................................... 289
year................................................................................................................................... 290
Doctrine_Expression_Oracle ......................................................................... 290
Inheritance................................................................................................................. 0
Method Summary .................................................................................................. 290
Method Details....................................................................................................... 291
random ............................................................................................................................. 291
substring........................................................................................................................... 291
now ................................................................................................................................... 291
guid................................................................................................................................... 291
concat ............................................................................................................................... 291
Doctrine_Expression_Pgsql ........................................................................... 292
Inheritance................................................................................................................. 0
Method Summary .................................................................................................. 292
Method Details....................................................................................................... 292
md5................................................................................................................................... 292
matchPattern .................................................................................................................... 293

----------------- Brought to you by


Table of Contents xxvi

regexp............................................................................................................................... 293
random ............................................................................................................................. 293
date_part .......................................................................................................................... 293
substring........................................................................................................................... 293
now ................................................................................................................................... 294
age .................................................................................................................................... 294
to_char.............................................................................................................................. 294
translate ........................................................................................................................... 294
concat ............................................................................................................................... 294
Doctrine_Expression_Sqlite........................................................................... 295
Inheritance................................................................................................................. 0
Method Summary .................................................................................................. 295
Method Details....................................................................................................... 295
rtrimImpl .......................................................................................................................... 295
modImpl............................................................................................................................ 295
md5Impl ........................................................................................................................... 296
locateImpl......................................................................................................................... 296
sha1Impl ........................................................................................................................... 296
regexp............................................................................................................................... 296
random ............................................................................................................................. 296
substring........................................................................................................................... 296
now ................................................................................................................................... 297
trimImpl............................................................................................................................ 297
ltrimImpl........................................................................................................................... 297
soundex ............................................................................................................................ 297
concatImpl ........................................................................................................................ 297
Doctrine_File ................................................................................................. 297
Inheritance................................................................................................................. 0
Method Summary .................................................................................................. 297
Method Details....................................................................................................... 298
setTableDefinition ............................................................................................................ 298
get..................................................................................................................................... 298
setUp ................................................................................................................................ 298
Doctrine_File_Index....................................................................................... 298
Inheritance................................................................................................................. 0
Method Summary .................................................................................................. 298
Method Details....................................................................................................... 298
setTableDefinition ............................................................................................................ 298
setUp ................................................................................................................................ 298
Doctrine_Formatter....................................................................................... 299
Inheritance................................................................................................................. 0
Method Summary .................................................................................................. 299
Method Details....................................................................................................... 299
getIndexName .................................................................................................................. 299
fixIndexName ................................................................................................................... 300
convertBooleans ............................................................................................................... 300
getSequenceName............................................................................................................ 300
getTableName .................................................................................................................. 300
escapePattern................................................................................................................... 300
quote................................................................................................................................. 301
quoteIdentifier.................................................................................................................. 301
quoteMultipleIdentifier .................................................................................................... 301

----------------- Brought to you by


Table of Contents xxvii

fixSequenceName............................................................................................................. 301
Doctrine_Hook............................................................................................... 302
Method Summary .................................................................................................. 302
Method Details....................................................................................................... 302
setFieldParser .................................................................................................................. 302
hookWhere ....................................................................................................................... 302
hookLimit.......................................................................................................................... 303
hookOrderby..................................................................................................................... 303
getQuery........................................................................................................................... 303
__construct ....................................................................................................................... 303
hookOffset ........................................................................................................................ 303
setTypeParser................................................................................................................... 303
Doctrine_Hook_Equal .................................................................................... 304
Inheritance................................................................................................................. 0
Method Summary .................................................................................................. 304
Method Details....................................................................................................... 304
parse................................................................................................................................. 304
Doctrine_Hook_Integer ................................................................................. 305
Inheritance................................................................................................................. 0
Method Summary .................................................................................................. 305
Method Details....................................................................................................... 305
parseSingle....................................................................................................................... 305
Doctrine_Hook_Parser................................................................................... 306
Direct Sub-Classes..................................................................................................... 0
Method Summary .................................................................................................. 306
Method Details....................................................................................................... 306
getParams......................................................................................................................... 306
parse................................................................................................................................. 306
getCondition ..................................................................................................................... 306
Doctrine_Hook_Parser_Complex ................................................................... 307
Inheritance................................................................................................................. 0
Direct Sub-Classes..................................................................................................... 0
Method Summary .................................................................................................. 307
Method Details....................................................................................................... 307
parseSingle....................................................................................................................... 307
parse................................................................................................................................. 307
parseClause ...................................................................................................................... 308
__construct ....................................................................................................................... 308
Doctrine_Hook_WordLike ............................................................................. 308
Inheritance................................................................................................................. 0
Method Summary .................................................................................................. 308
Method Details....................................................................................................... 308
parseSingle....................................................................................................................... 308
Doctrine_Hydrator......................................................................................... 309
Inheritance................................................................................................................. 0
Method Summary .................................................................................................. 309
Method Details....................................................................................................... 309
hydrateResultSet .............................................................................................................. 309
_gatherRowData ............................................................................................................... 309

----------------- Brought to you by


Table of Contents xxviii

Doctrine_Hydrator_Abstract ......................................................................... 310


Direct Sub-Classes..................................................................................................... 0
Method Summary .................................................................................................. 310
Method Details....................................................................................................... 310
getHydrationMode ........................................................................................................... 310
hydrateResultSet .............................................................................................................. 310
setHydrationMode ............................................................................................................ 311
__construct ....................................................................................................................... 311
setQueryComponents ....................................................................................................... 311
getQueryComponents....................................................................................................... 311
Doctrine_Hydrator_ArrayDriver .................................................................... 311
Method Summary .................................................................................................. 311
Method Details....................................................................................................... 312
setLastElement................................................................................................................. 312
initRelated ........................................................................................................................ 312
getNullPointer .................................................................................................................. 312
getLastKey........................................................................................................................ 312
getElementCollection ....................................................................................................... 312
registerCollection ............................................................................................................. 312
flush .................................................................................................................................. 312
getElement ....................................................................................................................... 313
Doctrine_Hydrator_RecordDriver.................................................................. 313
Method Summary .................................................................................................. 313
Method Details....................................................................................................... 313
setLastElement................................................................................................................. 313
initRelated ........................................................................................................................ 313
getNullPointer .................................................................................................................. 314
getLastKey........................................................................................................................ 314
getElementCollection ....................................................................................................... 314
registerCollection ............................................................................................................. 314
flush .................................................................................................................................. 314
_getClassnameToReturn................................................................................................... 314
getElement ....................................................................................................................... 314
Doctrine_I18n................................................................................................ 315
Inheritance................................................................................................................. 0
Method Summary .................................................................................................. 315
Method Details....................................................................................................... 315
setTableDefinition ............................................................................................................ 315
__construct ....................................................................................................................... 315
buildRelation .................................................................................................................... 315
Doctrine_Import ............................................................................................ 316
Inheritance................................................................................................................. 0
Direct Sub-Classes..................................................................................................... 0
Method Summary .................................................................................................. 316
Method Details....................................................................................................... 317
userExists ......................................................................................................................... 317
viewExists......................................................................................................................... 317
listTableViews................................................................................................................... 317
databaseExists.................................................................................................................. 317
listTableIndexes................................................................................................................ 317
listTableColumns .............................................................................................................. 317
tableExists ........................................................................................................................ 318

----------------- Brought to you by


Table of Contents xxix

listViews ........................................................................................................................... 318


listDatabases .................................................................................................................... 318
tableIndexExists ............................................................................................................... 318
tableViewExists ................................................................................................................ 318
functionExists ................................................................................................................... 318
listUsers............................................................................................................................ 318
listTables .......................................................................................................................... 319
tableTriggerExists ............................................................................................................ 319
importSchema .................................................................................................................. 319
tableConstraintExists ....................................................................................................... 319
listFunctions ..................................................................................................................... 319
listTableConstraints ......................................................................................................... 319
listTriggers ....................................................................................................................... 319
triggerExists ..................................................................................................................... 320
tableColumnExists............................................................................................................ 320
listTableRelations ............................................................................................................. 320
listSequences.................................................................................................................... 320
sequenceExists ................................................................................................................. 320
listTableTriggers .............................................................................................................. 320
Doctrine_Import_Builder .............................................................................. 321
Inheritance................................................................................................................. 0
Method Summary .................................................................................................. 321
Method Details....................................................................................................... 322
setSuffix............................................................................................................................ 322
buildAttributes.................................................................................................................. 322
buildDefinition .................................................................................................................. 322
buildActAs ........................................................................................................................ 322
setTargetPath ................................................................................................................... 322
setBaseClassPrefix ........................................................................................................... 322
setPackagesPrefix ............................................................................................................ 322
setBaseClassesDirectory .................................................................................................. 323
setOptions......................................................................................................................... 323
writeDefinition.................................................................................................................. 323
buildIndexes ..................................................................................................................... 323
setBaseClassName ........................................................................................................... 323
writeTableDefinition......................................................................................................... 323
buildChecks ...................................................................................................................... 323
loadTemplate .................................................................................................................... 323
buildSetUp........................................................................................................................ 323
buildAccessors.................................................................................................................. 323
__construct ....................................................................................................................... 324
getTargetPath................................................................................................................... 324
buildTableDefinition ......................................................................................................... 324
buildColumns.................................................................................................................... 324
setPackagesPath............................................................................................................... 324
setOption .......................................................................................................................... 324
buildListeners................................................................................................................... 324
buildRecord ...................................................................................................................... 324
buildPhpDocs.................................................................................................................... 324
getBaseClassPrefix ........................................................................................................... 324
buildOptions ..................................................................................................................... 325
generateTableClasses....................................................................................................... 325
generateBaseClasses........................................................................................................ 325
Doctrine_Import_Firebird ............................................................................. 325

----------------- Brought to you by


Table of Contents xxx

Inheritance................................................................................................................. 0
Method Summary .................................................................................................. 325
Method Details....................................................................................................... 326
listTableViews................................................................................................................... 326
listTableColumns .............................................................................................................. 326
listViews ........................................................................................................................... 326
listUsers............................................................................................................................ 326
listTables .......................................................................................................................... 326
listFunctions ..................................................................................................................... 326
listTableTriggers .............................................................................................................. 327
Doctrine_Import_Mssql ................................................................................. 327
Inheritance................................................................................................................. 0
Method Summary .................................................................................................. 327
Method Details....................................................................................................... 327
listTableViews................................................................................................................... 327
listTableIndexes................................................................................................................ 328
listTableColumns .............................................................................................................. 328
listViews ........................................................................................................................... 328
listTables .......................................................................................................................... 328
listTriggers ....................................................................................................................... 328
listTableRelations ............................................................................................................. 328
listSequences.................................................................................................................... 329
listTableTriggers .............................................................................................................. 329
Doctrine_Import_Mysql ................................................................................. 329
Inheritance................................................................................................................. 0
Method Summary .................................................................................................. 329
Method Details....................................................................................................... 330
listTableIndexes................................................................................................................ 330
listTableColumns .............................................................................................................. 330
listViews ........................................................................................................................... 330
listTables .......................................................................................................................... 330
listTableConstraints ......................................................................................................... 330
listTableRelations ............................................................................................................. 330
listSequences.................................................................................................................... 331
Doctrine_Import_Oracle ................................................................................ 331
Inheritance................................................................................................................. 0
Method Summary .................................................................................................. 331
Method Details....................................................................................................... 332
listTableViews................................................................................................................... 332
listTableIndexes................................................................................................................ 332
listTableColumns .............................................................................................................. 332
listViews ........................................................................................................................... 332
listDatabases .................................................................................................................... 332
listUsers............................................................................................................................ 332
listTables .......................................................................................................................... 332
listFunctions ..................................................................................................................... 333
listTableConstraints ......................................................................................................... 333
listTriggers ....................................................................................................................... 333
listTableRelations ............................................................................................................. 333
listSequences.................................................................................................................... 333
listTableTriggers .............................................................................................................. 333
Doctrine_Import_Pgsql.................................................................................. 334

----------------- Brought to you by


Table of Contents xxxi

Inheritance................................................................................................................. 0
Method Summary .................................................................................................. 334
Method Details....................................................................................................... 334
listTableViews................................................................................................................... 334
listTableIndexes................................................................................................................ 334
listTableColumns .............................................................................................................. 335
listTables .......................................................................................................................... 335
listTableConstraints ......................................................................................................... 335
listTriggers ....................................................................................................................... 335
listTableRelations ............................................................................................................. 335
listTableTriggers .............................................................................................................. 335
Doctrine_Import_Schema .............................................................................. 336
Method Summary .................................................................................................. 336
Method Details....................................................................................................... 337
getOption.......................................................................................................................... 337
getOptions ........................................................................................................................ 337
_processInheritance ......................................................................................................... 337
setOptions......................................................................................................................... 337
importSchema .................................................................................................................. 337
buildSchema ..................................................................................................................... 337
_fixDuplicateRelations ...................................................................................................... 338
setOption .......................................................................................................................... 338
_autoCompleteOppositeRelations..................................................................................... 338
_validateSchemaElement ................................................................................................. 338
_buildRelationships .......................................................................................................... 338
parseSchema .................................................................................................................... 338
_buildUniqueRelationKey ................................................................................................. 339
_findBaseSuperClass ........................................................................................................ 339
Doctrine_Import_Sqlite ................................................................................. 339
Inheritance................................................................................................................. 0
Method Summary .................................................................................................. 339
Method Details....................................................................................................... 340
listTableViews................................................................................................................... 340
listTableIndexes................................................................................................................ 340
listTableColumns .............................................................................................................. 340
listViews ........................................................................................................................... 340
listDatabases .................................................................................................................... 340
listUsers............................................................................................................................ 340
listTables .......................................................................................................................... 340
listFunctions ..................................................................................................................... 341
listTableConstraints ......................................................................................................... 341
listTriggers ....................................................................................................................... 341
listSequences.................................................................................................................... 341
listTableTriggers .............................................................................................................. 341
Doctrine_Inflector ......................................................................................... 342
Method Summary .................................................................................................. 342
Method Details....................................................................................................... 342
classify .............................................................................................................................. 342
seemsUtf8......................................................................................................................... 342
urlize................................................................................................................................. 343
classifyCallback ................................................................................................................ 343
unaccent ........................................................................................................................... 343
tableize ............................................................................................................................. 343

----------------- Brought to you by


Table of Contents xxxii

Doctrine_IntegrityMapper ............................................................................ 344


Method Summary .................................................................................................. 344
Method Details....................................................................................................... 344
buildIntegrityRelations..................................................................................................... 344
processDeleteIntegrity ..................................................................................................... 344
invokeIntegrityActions ..................................................................................................... 344
buildIntegrityRelationQuery............................................................................................. 344
Doctrine_Lib .................................................................................................. 345
Method Summary .................................................................................................. 345
Method Details....................................................................................................... 345
getTableAsString .............................................................................................................. 345
makeDirectories ............................................................................................................... 346
getCollectionAsString....................................................................................................... 346
getConnectionAsString..................................................................................................... 346
copyDirectory ................................................................................................................... 346
formatSql .......................................................................................................................... 346
isValidClassName ............................................................................................................. 346
getRecordStateAsString ................................................................................................... 346
getConnectionStateAsString ............................................................................................ 346
removeDirectories ............................................................................................................ 347
arrayDeepMerge .............................................................................................................. 347
getRecordAsString ........................................................................................................... 347
Doctrine_Locking_Manager_Pessimistic....................................................... 347
Method Summary .................................................................................................. 347
Method Details....................................................................................................... 348
__construct ....................................................................................................................... 348
releaseAgedLocks............................................................................................................. 348
getLockOwner .................................................................................................................. 348
releaseLock ...................................................................................................................... 348
getLock ............................................................................................................................. 349
Doctrine_Manager......................................................................................... 349
Inheritance................................................................................................................. 0
Method Summary .................................................................................................. 349
Method Details....................................................................................................... 350
connection ........................................................................................................................ 350
getConnectionForComponent .......................................................................................... 350
bindComponent ................................................................................................................ 350
hasConnectionForComponent .......................................................................................... 351
_buildDsnPartsArray......................................................................................................... 351
getInstance ....................................................................................................................... 351
createDatabases ............................................................................................................... 351
__toString ......................................................................................................................... 351
contains ............................................................................................................................ 351
getCurrentConnection...................................................................................................... 351
setQueryRegistry.............................................................................................................. 352
openConnection................................................................................................................ 352
registerValidators............................................................................................................. 352
count................................................................................................................................. 352
getConnections................................................................................................................. 352
dropDatabases.................................................................................................................. 352
setDefaultAttributes ......................................................................................................... 353
getConnectionName ......................................................................................................... 353
getIterator ........................................................................................................................ 353

----------------- Brought to you by


Table of Contents xxxiii

getConnection .................................................................................................................. 353


getValidators .................................................................................................................... 353
setCurrentConnection ...................................................................................................... 353
getQueryRegistry ............................................................................................................. 354
parsePdoDsn..................................................................................................................... 354
closeConnection ............................................................................................................... 354
parseDsn........................................................................................................................... 354
Doctrine_Migration ....................................................................................... 354
Method Summary .................................................................................................. 354
Method Details....................................................................................................... 355
_transaction ...................................................................................................................... 355
getNextVersion................................................................................................................. 355
_createMigrationTable ..................................................................................................... 355
getMigrationClass ............................................................................................................ 356
getMigrationClassesDirectory.......................................................................................... 356
getNextMigrationClassVersion ........................................................................................ 356
setTableName................................................................................................................... 356
getTableName .................................................................................................................. 356
migrateDryRun ................................................................................................................. 356
getMigrationClasses......................................................................................................... 356
getErrors .......................................................................................................................... 357
hasMigrated ..................................................................................................................... 357
__construct ....................................................................................................................... 357
getCurrentVersion............................................................................................................ 357
getLatestVersion .............................................................................................................. 357
hasErrors .......................................................................................................................... 357
getNumErrors .................................................................................................................. 357
setCurrentVersion ............................................................................................................ 357
_doMigrateStep ................................................................................................................ 358
_doMigrate ....................................................................................................................... 358
loadMigrationClassesFromDirectory ............................................................................... 358
_throwErrorsException..................................................................................................... 358
migrate ............................................................................................................................. 358
addError ........................................................................................................................... 359
loadMigrationClass........................................................................................................... 359
Doctrine_Migration_Base.............................................................................. 359
Method Summary .................................................................................................. 359
Method Details....................................................................................................... 360
removeColumn ................................................................................................................. 360
renameTable..................................................................................................................... 360
createConstraint............................................................................................................... 360
_addChange ...................................................................................................................... 361
table.................................................................................................................................. 361
renameColumn ................................................................................................................. 361
foreignKey ........................................................................................................................ 361
dropTable ......................................................................................................................... 362
column .............................................................................................................................. 362
postUp .............................................................................................................................. 362
dropConstraint ................................................................................................................. 362
preUp................................................................................................................................ 362
constraint ......................................................................................................................... 362
preDown ........................................................................................................................... 363
addColumn ....................................................................................................................... 363
postDown.......................................................................................................................... 363

----------------- Brought to you by


Table of Contents xxxiv

dropForeignKey................................................................................................................ 363
removeIndex ..................................................................................................................... 363
getChanges....................................................................................................................... 364
changeColumn.................................................................................................................. 364
createForeignKey ............................................................................................................. 364
getNumChanges ............................................................................................................... 364
addIndex ........................................................................................................................... 364
createTable....................................................................................................................... 365
index ................................................................................................................................. 365
Doctrine_Migration_Builder ......................................................................... 365
Inheritance................................................................................................................. 0
Method Summary .................................................................................................. 365
Method Details....................................................................................................... 366
buildCreateForeignKey .................................................................................................... 366
buildDropForeignKey ....................................................................................................... 366
generateMigrationsFromDb ............................................................................................. 366
setMigrationsPath ............................................................................................................ 366
buildDropTable ................................................................................................................. 366
buildAddIndex .................................................................................................................. 367
buildRemoveIndex ............................................................................................................ 367
generateMigrationsFromDiff............................................................................................ 367
loadTemplate .................................................................................................................... 367
generateMigrationsFromModels...................................................................................... 367
__construct ....................................................................................................................... 367
buildMigrationClass ......................................................................................................... 368
buildRemoveColumn......................................................................................................... 368
getMigrationsPath ............................................................................................................ 368
generateMigrationClass ................................................................................................... 368
buildChangeColumn ......................................................................................................... 368
buildAddColumn ............................................................................................................... 369
buildCreateTable .............................................................................................................. 369
Doctrine_Migration_Diff ............................................................................... 369
Method Summary .................................................................................................. 369
Method Details....................................................................................................... 370
_buildChanges .................................................................................................................. 370
generateChanges.............................................................................................................. 370
__construct ....................................................................................................................... 370
getUniqueId...................................................................................................................... 370
generateMigrationClasses................................................................................................ 370
_generateModels .............................................................................................................. 370
_buildModelInformation ................................................................................................... 371
_diff................................................................................................................................... 371
Doctrine_Migration_Process ......................................................................... 371
Method Summary .................................................................................................. 371
Method Details....................................................................................................... 372
processRenamedTable...................................................................................................... 372
processDroppedTable....................................................................................................... 372
processCreatedTable........................................................................................................ 372
processCreatedIndex........................................................................................................ 372
processDroppedForeignKey ............................................................................................. 372
processCreatedColumn .................................................................................................... 373
processRenamedColumn .................................................................................................. 373
processDroppedIndex....................................................................................................... 373

----------------- Brought to you by


Table of Contents xxxv

processChangedColumn ................................................................................................... 373


processCreatedForeignKey .............................................................................................. 373
processCreatedConstraint................................................................................................ 373
processDroppedConstraints ............................................................................................. 374
getConnection .................................................................................................................. 374
processDroppedColumn ................................................................................................... 374
Doctrine_Node............................................................................................... 374
Direct Sub-Classes..................................................................................................... 0
Method Summary .................................................................................................. 374
Method Details....................................................................................................... 375
traverse ............................................................................................................................ 375
setIteratorType................................................................................................................. 375
getRecord ......................................................................................................................... 375
setIteratorOptions ............................................................................................................ 375
__construct ....................................................................................................................... 375
factory .............................................................................................................................. 375
setRecord.......................................................................................................................... 376
getIterator ........................................................................................................................ 376
Doctrine_Node_Interface .............................................................................. 376
Method Summary .................................................................................................. 376
Method Details....................................................................................................... 377
getDescendants ................................................................................................................ 377
insertAsNextSiblingOf ...................................................................................................... 377
getLevel ............................................................................................................................ 378
moveAsPrevSiblingOf ....................................................................................................... 378
getAncestors..................................................................................................................... 378
hasParent.......................................................................................................................... 378
delete ................................................................................................................................ 378
hasPrevSibling.................................................................................................................. 378
isEqualTo .......................................................................................................................... 378
moveAsLastChildOf .......................................................................................................... 378
getChildren....................................................................................................................... 379
hasChildren ...................................................................................................................... 379
isLeaf ................................................................................................................................ 379
hasNextSibling ................................................................................................................. 379
addChild ........................................................................................................................... 379
isRoot................................................................................................................................ 379
getLastChild ..................................................................................................................... 379
moveAsFirstChildOf.......................................................................................................... 379
getParent .......................................................................................................................... 380
moveAsNextSiblingOf....................................................................................................... 380
getPath ............................................................................................................................. 380
insertAsPrevSiblingOf ...................................................................................................... 380
getNumberDescendants ................................................................................................... 380
getPrevSibling .................................................................................................................. 380
getSiblings........................................................................................................................ 380
getNumberChildren.......................................................................................................... 381
insertAsFirstChildOf......................................................................................................... 381
getNextSibling.................................................................................................................. 381
insertAsParentOf .............................................................................................................. 381
isDescendantOf................................................................................................................. 381
insertAsLastChildOf ......................................................................................................... 381
isDescendantOfOrEqualTo ............................................................................................... 381
getFirstChild..................................................................................................................... 381

----------------- Brought to you by


Table of Contents xxxvi

isValidNode ...................................................................................................................... 382


Doctrine_Node_MaterializedPath_LevelOrderIterator.................................. 382
Method Summary .................................................................................................. 382
Method Details....................................................................................................... 382
key .................................................................................................................................... 382
rewind............................................................................................................................... 382
current.............................................................................................................................. 382
valid .................................................................................................................................. 382
__construct ....................................................................................................................... 383
next................................................................................................................................... 383
Doctrine_Node_MaterializedPath_PostOrderIterator ................................... 383
Method Summary .................................................................................................. 383
Method Details....................................................................................................... 383
key .................................................................................................................................... 383
rewind............................................................................................................................... 383
current.............................................................................................................................. 383
valid .................................................................................................................................. 384
__construct ....................................................................................................................... 384
next................................................................................................................................... 384
Doctrine_Node_MaterializedPath_PreOrderIterator..................................... 384
Method Summary .................................................................................................. 384
Method Details....................................................................................................... 384
key .................................................................................................................................... 384
rewind............................................................................................................................... 384
current.............................................................................................................................. 385
valid .................................................................................................................................. 385
__construct ....................................................................................................................... 385
next................................................................................................................................... 385
Doctrine_Node_NestedSet............................................................................. 385
Inheritance................................................................................................................. 0
Method Summary .................................................................................................. 385
Method Details....................................................................................................... 386
getDescendants ................................................................................................................ 386
insertAsNextSiblingOf ...................................................................................................... 387
getLevel ............................................................................................................................ 387
moveAsPrevSiblingOf ....................................................................................................... 387
getAncestors..................................................................................................................... 387
hasParent.......................................................................................................................... 387
delete ................................................................................................................................ 387
hasPrevSibling.................................................................................................................. 387
isEqualTo .......................................................................................................................... 387
setLeftValue...................................................................................................................... 388
moveAsLastChildOf .......................................................................................................... 388
getChildren....................................................................................................................... 388
hasChildren ...................................................................................................................... 388
detach ............................................................................................................................... 388
isLeaf ................................................................................................................................ 388
hasNextSibling ................................................................................................................. 388
addChild ........................................................................................................................... 388
isRoot................................................................................................................................ 389
getLeftValue ..................................................................................................................... 389
getLastChild ..................................................................................................................... 389

----------------- Brought to you by


Table of Contents xxxvii

moveAsFirstChildOf.......................................................................................................... 389
getParent .......................................................................................................................... 389
moveAsNextSiblingOf....................................................................................................... 389
getPath ............................................................................................................................. 389
insertAsPrevSiblingOf ...................................................................................................... 390
getNumberDescendants ................................................................................................... 390
getPrevSibling .................................................................................................................. 390
getSiblings........................................................................................................................ 390
getNumberChildren.......................................................................................................... 390
makeRoot.......................................................................................................................... 390
setRootValue .................................................................................................................... 390
insertAsFirstChildOf......................................................................................................... 390
setRightValue ................................................................................................................... 391
getNextSibling.................................................................................................................. 391
insertAsParentOf .............................................................................................................. 391
isDescendantOf................................................................................................................. 391
getRootValue .................................................................................................................... 391
insertAsLastChildOf ......................................................................................................... 391
isDescendantOfOrEqualTo ............................................................................................... 391
getFirstChild..................................................................................................................... 391
isValidNode ...................................................................................................................... 392
getRightValue ................................................................................................................... 392
Doctrine_Node_NestedSet_PreOrderIterator ................................................ 392
Method Summary .................................................................................................. 392
Method Details....................................................................................................... 392
key .................................................................................................................................... 392
rewind............................................................................................................................... 392
current.............................................................................................................................. 393
valid .................................................................................................................................. 393
__construct ....................................................................................................................... 393
count................................................................................................................................. 393
next................................................................................................................................... 393
Doctrine_Null ................................................................................................ 393
Method Summary .................................................................................................. 393
Method Details....................................................................................................... 394
__toString ......................................................................................................................... 394
exists................................................................................................................................. 394
Doctrine_Overloadable .................................................................................. 394
Method Summary .................................................................................................. 394
Method Details....................................................................................................... 394
__call ................................................................................................................................. 394
Doctrine_Pager.............................................................................................. 395
Method Summary .................................................................................................. 395
Method Details....................................................................................................... 396
getNumResults ................................................................................................................. 396
_adjustOffset..................................................................................................................... 396
getLastIndice.................................................................................................................... 396
haveToPaginate ................................................................................................................ 396
setPage ............................................................................................................................. 397
getRange .......................................................................................................................... 397
getMaxPerPage ................................................................................................................ 397
getExecuted...................................................................................................................... 397

----------------- Brought to you by


Table of Contents xxxviii

getFirstPage ..................................................................................................................... 397


getLastPage ...................................................................................................................... 397
setCountQuery.................................................................................................................. 398
getCountQueryParams ..................................................................................................... 398
getQuery........................................................................................................................... 398
__construct ....................................................................................................................... 398
_setNumResults ................................................................................................................ 398
_initialize .......................................................................................................................... 399
execute ............................................................................................................................. 399
getCountQuery ................................................................................................................. 399
_setExecuted..................................................................................................................... 399
setCountQueryParams...................................................................................................... 398
_setLastPage..................................................................................................................... 400
getNextPage ..................................................................................................................... 400
getPage............................................................................................................................. 400
getResultsInPage.............................................................................................................. 400
setMaxPerPage................................................................................................................. 400
_setQuery.......................................................................................................................... 400
getFirstIndice ................................................................................................................... 401
getPreviousPage ............................................................................................................... 401
Doctrine_Pager_Layout ................................................................................. 401
Method Summary .................................................................................................. 401
Method Details....................................................................................................... 402
_parseReplacementsTemplate.......................................................................................... 402
getPagerRange ................................................................................................................. 403
setSelectedTemplate ........................................................................................................ 403
_parseUrlTemplate ........................................................................................................... 403
setSeparatorTemplate ...................................................................................................... 403
_setPager .......................................................................................................................... 403
addMaskReplacement ...................................................................................................... 403
getPager ........................................................................................................................... 404
getSeparatorTemplate...................................................................................................... 404
__toString ......................................................................................................................... 404
removeMaskReplacement ................................................................................................ 404
getUrlMask....................................................................................................................... 404
_setUrlMask...................................................................................................................... 404
processPage...................................................................................................................... 405
__construct ....................................................................................................................... 405
_parseTemplate ................................................................................................................ 405
_parseMaskReplacements ................................................................................................ 405
_setPagerRange ................................................................................................................ 405
execute ............................................................................................................................. 406
getSelectedTemplate........................................................................................................ 406
_parseUrl .......................................................................................................................... 406
cleanMaskReplacements .................................................................................................. 406
getTemplate...................................................................................................................... 406
display .............................................................................................................................. 406
setTemplate ...................................................................................................................... 407
Doctrine_Pager_Range .................................................................................. 407
Direct Sub-Classes..................................................................................................... 0
Method Summary .................................................................................................. 407
Method Details....................................................................................................... 408
getOption.......................................................................................................................... 408
rangeAroundPage............................................................................................................. 408

----------------- Brought to you by


Table of Contents xxxix

isInRange.......................................................................................................................... 408
_setOptions ....................................................................................................................... 408
getOptions ........................................................................................................................ 408
getPager ........................................................................................................................... 408
__construct ....................................................................................................................... 409
_initialize .......................................................................................................................... 409
setPager............................................................................................................................ 409
Doctrine_Pager_Range_Jumping ................................................................... 409
Inheritance................................................................................................................. 0
Method Summary .................................................................................................. 409
Method Details....................................................................................................... 410
rangeAroundPage............................................................................................................. 410
getChunkLength ............................................................................................................... 410
_initialize .......................................................................................................................... 410
_setChunkLength.............................................................................................................. 410
Doctrine_Pager_Range_Sliding ..................................................................... 410
Inheritance................................................................................................................. 0
Method Summary .................................................................................................. 410
Method Details....................................................................................................... 411
rangeAroundPage............................................................................................................. 411
getChunkLength ............................................................................................................... 411
_initialize .......................................................................................................................... 411
_setChunkLength.............................................................................................................. 411
Doctrine_Parser............................................................................................. 412
Direct Sub-Classes..................................................................................................... 0
Method Summary .................................................................................................. 412
Method Details....................................................................................................... 412
dump................................................................................................................................. 412
getParser .......................................................................................................................... 412
load ................................................................................................................................... 412
dumpData ......................................................................................................................... 413
loadData ........................................................................................................................... 413
doLoad .............................................................................................................................. 413
doDump ............................................................................................................................ 413
Doctrine_Parser_Json .................................................................................... 413
Inheritance................................................................................................................. 0
Method Summary .................................................................................................. 413
Method Details....................................................................................................... 414
dumpData ......................................................................................................................... 414
loadData ........................................................................................................................... 414
Doctrine_Parser_Serialize ............................................................................. 414
Inheritance................................................................................................................. 0
Method Summary .................................................................................................. 414
Method Details....................................................................................................... 414
dumpData ......................................................................................................................... 414
loadData ........................................................................................................................... 415
Doctrine_Parser_Xml..................................................................................... 415
Inheritance................................................................................................................. 0
Method Summary .................................................................................................. 415
Method Details....................................................................................................... 415

----------------- Brought to you by


Table of Contents xl

arrayToXml ....................................................................................................................... 415


dumpData ......................................................................................................................... 415
prepareData...................................................................................................................... 416
loadData ........................................................................................................................... 416
Doctrine_Parser_Yml ..................................................................................... 416
Inheritance................................................................................................................. 0
Method Summary .................................................................................................. 416
Method Details....................................................................................................... 416
dumpData ......................................................................................................................... 416
loadData ........................................................................................................................... 417
Doctrine_Record_Generator .......................................................................... 417
Inheritance................................................................................................................. 0
Direct Sub-Classes..................................................................................................... 0
Method Summary .................................................................................................. 417
Method Details....................................................................................................... 418
buildChildDefinitions........................................................................................................ 418
getOption.......................................................................................................................... 418
__isset ............................................................................................................................... 418
buildForeignRelation ........................................................................................................ 418
initOptions ........................................................................................................................ 418
generateClass ................................................................................................................... 418
getOptions ........................................................................................................................ 419
addChild ........................................................................................................................... 419
__get ................................................................................................................................. 419
setOption .......................................................................................................................... 419
buildForeignKeys.............................................................................................................. 419
buildTable......................................................................................................................... 419
buildRelation .................................................................................................................... 419
initialize ............................................................................................................................ 420
buildLocalRelation............................................................................................................ 420
Doctrine_Query ............................................................................................. 420
Inheritance................................................................................................................. 0
Method Summary .................................................................................................. 420
Method Details....................................................................................................... 422
processPendingSubqueries .............................................................................................. 422
fetchArray......................................................................................................................... 422
getSqlAggregateAlias ....................................................................................................... 423
load ................................................................................................................................... 423
processPendingAggregates .............................................................................................. 423
buildAssociativeRelationSql ............................................................................................. 423
buildSimpleRelationSql .................................................................................................... 423
getSqlQuery...................................................................................................................... 423
copy .................................................................................................................................. 423
getAggregateAlias ............................................................................................................ 424
buildIndexBy..................................................................................................................... 424
parseSubquery ................................................................................................................. 424
serialize ............................................................................................................................ 424
parseDqlQuery.................................................................................................................. 424
getExpressionOwner ........................................................................................................ 424
contains ............................................................................................................................ 425
isSubquery........................................................................................................................ 425
query................................................................................................................................. 425
getLimitSubquery............................................................................................................. 425

----------------- Brought to you by


Table of Contents xli

buildInheritanceJoinSql.................................................................................................... 425
createSubquery ................................................................................................................ 425
_buildSqlQueryBase ......................................................................................................... 426
parseFunctionExpression ................................................................................................. 426
_killReference ................................................................................................................... 426
fetchOne ........................................................................................................................... 426
parseClause ...................................................................................................................... 426
_buildSqlFromPart............................................................................................................ 426
parseIdentifierReference.................................................................................................. 427
count................................................................................................................................. 427
getDqlPart ........................................................................................................................ 427
getCountQuery ................................................................................................................. 427
loadRoot ........................................................................................................................... 427
adjustProcessedParam ..................................................................................................... 427
__clone .............................................................................................................................. 427
processPendingFields....................................................................................................... 428
free ................................................................................................................................... 428
reset.................................................................................................................................. 428
parseSelectField ............................................................................................................... 428
parseSelect ....................................................................................................................... 428
_processPendingJoinConditions ....................................................................................... 428
addPendingJoinCondition ................................................................................................. 429
create................................................................................................................................ 429
unserialize ........................................................................................................................ 429
Doctrine_Query_Abstract .............................................................................. 429
Direct Sub-Classes..................................................................................................... 0
Method Summary .................................................................................................. 429
Method Details....................................................................................................... 433
generateSqlTableAlias...................................................................................................... 433
update............................................................................................................................... 433
_getDqlCallback................................................................................................................ 433
getParts ............................................................................................................................ 433
hasAliasDeclaration.......................................................................................................... 434
addOrderBy ...................................................................................................................... 434
expireQueryCache ............................................................................................................ 434
generateTableAlias........................................................................................................... 434
getCacheDriver ................................................................................................................ 434
clear.................................................................................................................................. 435
fixArrayParameterValues ................................................................................................. 435
isLimitSubqueryUsed ....................................................................................................... 435
delete ................................................................................................................................ 435
select ................................................................................................................................ 435
generateNewSqlTableAlias .............................................................................................. 435
distinct.............................................................................................................................. 435
getParams......................................................................................................................... 436
orderBy............................................................................................................................. 436
getDql ............................................................................................................................... 436
calculateQueryCacheHash ............................................................................................... 436
getSqlQuery...................................................................................................................... 436
getInternalParams............................................................................................................ 436
from .................................................................................................................................. 436
_hasDqlQueryPart............................................................................................................. 437
forUpdate ......................................................................................................................... 437
_processWhereIn .............................................................................................................. 437
getSqlTableAlias............................................................................................................... 437

----------------- Brought to you by


Table of Contents xlii

useCache .......................................................................................................................... 437


getTableAliasMap............................................................................................................. 437
getInheritanceCondition................................................................................................... 438
parseDqlQuery.................................................................................................................. 438
__toString ......................................................................................................................... 438
expireResultCache............................................................................................................ 438
leftJoin .............................................................................................................................. 438
_preQuery ......................................................................................................................... 439
getAliasMap...................................................................................................................... 439
addHaving ........................................................................................................................ 439
getType............................................................................................................................. 439
setQueryPart .................................................................................................................... 439
setHydrationMode ............................................................................................................ 439
getTableAliases ................................................................................................................ 440
getSqlTableAliasSeed ....................................................................................................... 440
limit .................................................................................................................................. 440
getSqlParts ....................................................................................................................... 440
innerJoin ........................................................................................................................... 440
hasTableAlias.................................................................................................................... 440
setSqlQueryPart ............................................................................................................... 441
_addDqlQueryPart ............................................................................................................ 441
getSqlQueryPart ............................................................................................................... 441
getCountQueryParams ..................................................................................................... 441
getQuery........................................................................................................................... 441
_getDqlCallbackComponents............................................................................................ 442
getQueryPart .................................................................................................................... 442
hasSqlTableAlias .............................................................................................................. 442
addFrom ........................................................................................................................... 442
__construct ....................................................................................................................... 442
andWhere ......................................................................................................................... 443
useResultCache ................................................................................................................ 443
getQueryCacheLifeSpan................................................................................................... 443
getRoot ............................................................................................................................. 443
_processDqlQueryPart...................................................................................................... 443
_getParser......................................................................................................................... 443
getQueryComponent ........................................................................................................ 444
addSqlTableAlias .............................................................................................................. 444
execute ............................................................................................................................. 444
orWhere............................................................................................................................ 444
preQuery........................................................................................................................... 439
getTableAlias .................................................................................................................... 445
having ............................................................................................................................... 445
removeQueryPart ............................................................................................................. 445
getComponentAlias .......................................................................................................... 445
where................................................................................................................................ 446
setResultCacheLifeSpan................................................................................................... 446
addSqlQueryPart .............................................................................................................. 446
setOption .......................................................................................................................... 446
setCacheLifeSpan............................................................................................................. 446
removeSqlQueryPart ........................................................................................................ 447
set ..................................................................................................................................... 447
getView............................................................................................................................. 447
getAliasDeclaration .......................................................................................................... 447
andWhereNotIn ................................................................................................................ 447
getSql ............................................................................................................................... 448
getConnection .................................................................................................................. 448

----------------- Brought to you by


Table of Contents xliii

addGroupBy...................................................................................................................... 448
addQueryPart ................................................................................................................... 448
offset................................................................................................................................. 448
getQueryCacheDriver....................................................................................................... 448
getTableAliasSeed ............................................................................................................ 449
removeDqlQueryPart........................................................................................................ 449
andWhereIn ...................................................................................................................... 449
free ................................................................................................................................... 449
getFlattenedParams ......................................................................................................... 449
setParams ......................................................................................................................... 449
useQueryCache................................................................................................................. 450
generateNewTableAlias ................................................................................................... 450
getRootDeclaration........................................................................................................... 450
orWhereIn......................................................................................................................... 450
orWhereNotIn................................................................................................................... 450
getCachedForm ................................................................................................................ 451
_constructQueryFromCache............................................................................................. 451
setView ............................................................................................................................. 451
getResultCacheDriver ...................................................................................................... 451
whereNotIn....................................................................................................................... 451
_execute............................................................................................................................ 444
addTableAlias ................................................................................................................... 452
parseQuery ....................................................................................................................... 452
addWhere ......................................................................................................................... 452
setQueryCacheLifeSpan ................................................................................................... 452
calculateResultCacheHash ............................................................................................... 452
getQueryComponents....................................................................................................... 452
copySubqueryInfo............................................................................................................. 453
addSelect .......................................................................................................................... 453
groupBy ............................................................................................................................ 453
getRootAlias ..................................................................................................................... 453
getResultCacheLifeSpan .................................................................................................. 453
whereIn ............................................................................................................................ 453
expireCache...................................................................................................................... 454
Doctrine_Query_Check .................................................................................. 454
Method Summary .................................................................................................. 454
Method Details....................................................................................................... 454
parseSingle....................................................................................................................... 454
parseFunction................................................................................................................... 454
parse................................................................................................................................. 455
parseClause ...................................................................................................................... 455
getTable............................................................................................................................ 455
__construct ....................................................................................................................... 455
getSql ............................................................................................................................... 455
Doctrine_Query_Condition ............................................................................ 456
Inheritance................................................................................................................. 0
Direct Sub-Classes..................................................................................................... 0
Method Summary .................................................................................................. 456
Method Details....................................................................................................... 456
parse................................................................................................................................. 456
parseLiteralValue ............................................................................................................. 456
Doctrine_Query_Filter ................................................................................... 457
Method Summary .................................................................................................. 457

----------------- Brought to you by


Table of Contents xliv

Method Details....................................................................................................... 457


preQuery........................................................................................................................... 457
postQuery ......................................................................................................................... 457
Doctrine_Query_Filter_Chain ........................................................................ 458
Method Summary .................................................................................................. 458
Method Details....................................................................................................... 458
add.................................................................................................................................... 458
get..................................................................................................................................... 458
preQuery........................................................................................................................... 458
set ..................................................................................................................................... 459
postQuery ......................................................................................................................... 459
Doctrine_Query_Filter_Interface ................................................................... 459
Method Summary .................................................................................................. 459
Method Details....................................................................................................... 459
preQuery........................................................................................................................... 459
postQuery ......................................................................................................................... 459
Doctrine_Query_Forupdate ........................................................................... 460
Inheritance................................................................................................................. 0
Method Summary .................................................................................................. 460
Method Details....................................................................................................... 460
parse................................................................................................................................. 460
Doctrine_Query_From ................................................................................... 460
Inheritance................................................................................................................. 0
Method Summary .................................................................................................. 460
Method Details....................................................................................................... 461
parse................................................................................................................................. 461
Doctrine_Query_Groupby .............................................................................. 461
Inheritance................................................................................................................. 0
Method Summary .................................................................................................. 461
Method Details....................................................................................................... 461
parse................................................................................................................................. 461
Doctrine_Query_Having................................................................................. 462
Inheritance................................................................................................................. 0
Method Summary .................................................................................................. 462
Method Details....................................................................................................... 462
load ................................................................................................................................... 462
Doctrine_Query_JoinCondition...................................................................... 462
Inheritance................................................................................................................. 0
Method Summary .................................................................................................. 462
Method Details....................................................................................................... 463
load ................................................................................................................................... 463
_processPossibleAggExpression ....................................................................................... 463
Doctrine_Query_Limit ................................................................................... 463
Inheritance................................................................................................................. 0
Method Summary .................................................................................................. 463
Method Details....................................................................................................... 463
parse................................................................................................................................. 463
Doctrine_Query_Offset .................................................................................. 464

----------------- Brought to you by


Table of Contents xlv

Inheritance................................................................................................................. 0
Method Summary .................................................................................................. 464
Method Details....................................................................................................... 464
parse................................................................................................................................. 464
Doctrine_Query_Orderby ............................................................................... 464
Inheritance................................................................................................................. 0
Method Summary .................................................................................................. 464
Method Details....................................................................................................... 464
parse................................................................................................................................. 464
Doctrine_Query_Part ..................................................................................... 465
Direct Sub-Classes..................................................................................................... 0
Method Summary .................................................................................................. 465
Method Details....................................................................................................... 465
getQuery........................................................................................................................... 465
__construct ....................................................................................................................... 465
Doctrine_Query_Registry............................................................................... 466
Method Summary .................................................................................................. 466
Method Details....................................................................................................... 466
has .................................................................................................................................... 466
add.................................................................................................................................... 466
get..................................................................................................................................... 466
Doctrine_Query_Select .................................................................................. 467
Inheritance................................................................................................................. 0
Method Summary .................................................................................................. 467
Method Details....................................................................................................... 467
parse................................................................................................................................. 467
Doctrine_Query_Set....................................................................................... 467
Inheritance................................................................................................................. 0
Method Summary .................................................................................................. 467
Method Details....................................................................................................... 468
parse................................................................................................................................. 468
_processPossibleAggExpression ....................................................................................... 468
Doctrine_Query_Tokenizer ............................................................................ 468
Method Summary .................................................................................................. 468
Method Details....................................................................................................... 469
bracketTrim ...................................................................................................................... 469
tokenizeQuery .................................................................................................................. 469
quoteExplode.................................................................................................................... 469
bracketExplode................................................................................................................. 469
sqlExplode ........................................................................................................................ 470
clauseExplode................................................................................................................... 470
Doctrine_Query_Where.................................................................................. 470
Inheritance................................................................................................................. 0
Method Summary .................................................................................................. 470
Method Details....................................................................................................... 471
parseValue........................................................................................................................ 471
load ................................................................................................................................... 471
_buildWhereInArraySqlPart ............................................................................................. 471
_buildSql ........................................................................................................................... 471

----------------- Brought to you by


Table of Contents xlvi

parseExists ....................................................................................................................... 471


Doctrine_RawSql ........................................................................................... 471
Inheritance................................................................................................................. 0
Method Summary .................................................................................................. 471
Method Details....................................................................................................... 472
parseDqlQueryPart........................................................................................................... 472
getSqlQuery...................................................................................................................... 472
parseDqlQuery.................................................................................................................. 473
parseQueryPart ................................................................................................................ 473
_addDqlQueryPart ............................................................................................................ 473
__construct ....................................................................................................................... 473
count................................................................................................................................. 473
getFields ........................................................................................................................... 473
getCountQuery ................................................................................................................. 474
addComponent ................................................................................................................. 474
Doctrine_Record............................................................................................ 474
Inheritance................................................................................................................. 0
Direct Sub-Classes..................................................................................................... 0
Method Summary .................................................................................................. 474
Method Details....................................................................................................... 478
assignDefaultValues ......................................................................................................... 478
getIncremented ................................................................................................................ 478
preSave............................................................................................................................. 478
preDqlUpdate ................................................................................................................... 478
loadReference................................................................................................................... 478
mapValue.......................................................................................................................... 478
deleteNode ....................................................................................................................... 479
preDelete .......................................................................................................................... 479
postHydrate ...................................................................................................................... 479
_get ................................................................................................................................... 479
state.................................................................................................................................. 479
load ................................................................................................................................... 479
postUpdate ....................................................................................................................... 479
postValidate...................................................................................................................... 480
validateOnInsert ............................................................................................................... 480
coreSetRelated ................................................................................................................. 480
getPrepared...................................................................................................................... 480
clearRelated ..................................................................................................................... 480
delete ................................................................................................................................ 480
refreshRelated .................................................................................................................. 481
__call ................................................................................................................................. 481
getMutators ...................................................................................................................... 481
identifier ........................................................................................................................... 481
copy .................................................................................................................................. 481
obtainReference ............................................................................................................... 481
refresh .............................................................................................................................. 482
importFrom ...................................................................................................................... 482
merge ............................................................................................................................... 482
getErrorStack ................................................................................................................... 482
serialize ............................................................................................................................ 482
getAccessor ...................................................................................................................... 482
hydrate ............................................................................................................................. 483
hasReference .................................................................................................................... 483
__toString ......................................................................................................................... 483

----------------- Brought to you by


Table of Contents xlvii

construct........................................................................................................................... 483
contains ............................................................................................................................ 483
get..................................................................................................................................... 479
save................................................................................................................................... 483
validate ............................................................................................................................. 484
postSave ........................................................................................................................... 484
linkInDb ............................................................................................................................ 484
clearMutator..................................................................................................................... 484
getReferences................................................................................................................... 484
clearAccessor ................................................................................................................... 484
getPendingUnlinks ........................................................................................................... 484
getLastModified................................................................................................................ 485
_isValueModified .............................................................................................................. 485
columnCount .................................................................................................................... 485
getLast.............................................................................................................................. 485
getModified ...................................................................................................................... 485
__unset.............................................................................................................................. 485
hasRelation ....................................................................................................................... 486
link.................................................................................................................................... 486
preInsert........................................................................................................................... 486
trySave ............................................................................................................................. 486
preValidate ....................................................................................................................... 486
unlink................................................................................................................................ 487
getTable............................................................................................................................ 487
unshiftFilter...................................................................................................................... 487
__construct ....................................................................................................................... 483
getNode ............................................................................................................................ 487
preHydrate ....................................................................................................................... 487
preDqlDelete .................................................................................................................... 488
exists................................................................................................................................. 488
getOid ............................................................................................................................... 488
count................................................................................................................................. 488
getPendingDeletes ........................................................................................................... 488
postInsert ......................................................................................................................... 488
replace.............................................................................................................................. 489
_resetModified .................................................................................................................. 489
hasMutator ....................................................................................................................... 489
postUnserialize ................................................................................................................. 489
validateOnUpdate............................................................................................................. 489
setRelated......................................................................................................................... 489
assignIdentifier................................................................................................................. 489
getIterator ........................................................................................................................ 490
set ..................................................................................................................................... 490
hasAccessor ...................................................................................................................... 490
assignInheritanceValues .................................................................................................. 490
oid..................................................................................................................................... 490
getData ............................................................................................................................. 490
free ................................................................................................................................... 490
unlinkInDb ........................................................................................................................ 491
getMutator........................................................................................................................ 491
cleanData.......................................................................................................................... 491
hasAccessorMutator ......................................................................................................... 491
exportTo ........................................................................................................................... 491
preUnserialize .................................................................................................................. 491
call .................................................................................................................................... 481
errorStack ........................................................................................................................ 492

----------------- Brought to you by


Table of Contents xlviii

_index ............................................................................................................................... 492


reference .......................................................................................................................... 492
fromArray ......................................................................................................................... 492
_set ................................................................................................................................... 490
getAccessors..................................................................................................................... 492
rawGet .............................................................................................................................. 493
toString............................................................................................................................. 483
postSerialize ..................................................................................................................... 493
toArray.............................................................................................................................. 493
unserialize ........................................................................................................................ 493
setUp ................................................................................................................................ 493
isModified ......................................................................................................................... 494
synchronizeWithArray ...................................................................................................... 494
preDqlSelect ..................................................................................................................... 494
postDelete......................................................................................................................... 494
resetPendingUnlinks ........................................................................................................ 494
preUpdate......................................................................................................................... 494
preSerialize ...................................................................................................................... 494
isValid ............................................................................................................................... 495
Doctrine_Record_Abstract............................................................................. 495
Inheritance................................................................................................................. 0
Direct Sub-Classes..................................................................................................... 0
Method Summary .................................................................................................. 495
Method Details....................................................................................................... 496
setTableDefinition ............................................................................................................ 496
hasColumn ........................................................................................................................ 496
setListener........................................................................................................................ 496
check ................................................................................................................................ 496
setTableName................................................................................................................... 496
hasColumns ...................................................................................................................... 496
unique............................................................................................................................... 496
loadGenerator................................................................................................................... 497
option................................................................................................................................ 497
attribute............................................................................................................................ 497
getTable............................................................................................................................ 497
hasMany ........................................................................................................................... 497
setSubclasses ................................................................................................................... 497
hasOne.............................................................................................................................. 497
setInheritanceMap ........................................................................................................... 498
getListener ....................................................................................................................... 498
actAs ................................................................................................................................. 498
addListener....................................................................................................................... 498
bindQueryParts................................................................................................................. 498
setUp ................................................................................................................................ 498
index ................................................................................................................................. 498
setAttribute ...................................................................................................................... 499
Doctrine_Record_Filter ................................................................................. 499
Direct Sub-Classes..................................................................................................... 0
Method Summary .................................................................................................. 499
Method Details....................................................................................................... 499
setTable ............................................................................................................................ 499
getTable............................................................................................................................ 499
filterGet ............................................................................................................................ 499
filterSet............................................................................................................................. 500

----------------- Brought to you by


Table of Contents xlix

Doctrine_Record_Filter_Compound............................................................... 500
Inheritance................................................................................................................. 0
Method Summary .................................................................................................. 500
Method Details....................................................................................................... 500
init .................................................................................................................................... 500
__construct ....................................................................................................................... 500
filterGet ............................................................................................................................ 500
filterSet............................................................................................................................. 501
Doctrine_Record_Filter_Standard ................................................................. 501
Inheritance................................................................................................................. 0
Method Summary .................................................................................................. 501
Method Details....................................................................................................... 501
filterGet ............................................................................................................................ 501
filterSet............................................................................................................................. 501
Doctrine_Record_Iterator.............................................................................. 502
Method Summary .................................................................................................. 502
Method Details....................................................................................................... 502
initNullObject ................................................................................................................... 502
current.............................................................................................................................. 502
__construct ....................................................................................................................... 502
Doctrine_Record_Listener ............................................................................. 503
Direct Sub-Classes..................................................................................................... 0
Method Summary .................................................................................................. 503
Method Details....................................................................................................... 503
preSave............................................................................................................................. 503
preDqlUpdate ................................................................................................................... 504
getOption.......................................................................................................................... 504
preDelete .......................................................................................................................... 504
postHydrate ...................................................................................................................... 504
postUpdate ....................................................................................................................... 504
postValidate...................................................................................................................... 504
postSave ........................................................................................................................... 504
preInsert........................................................................................................................... 504
preValidate ....................................................................................................................... 504
preHydrate ....................................................................................................................... 504
preDqlDelete .................................................................................................................... 505
postInsert ......................................................................................................................... 505
postUnserialize ................................................................................................................. 505
setOption .......................................................................................................................... 505
preUnserialize .................................................................................................................. 505
postSerialize ..................................................................................................................... 505
preDqlSelect ..................................................................................................................... 505
postDelete......................................................................................................................... 505
preUpdate......................................................................................................................... 505
preSerialize ...................................................................................................................... 505
Doctrine_Record_Listener_Chain .................................................................. 506
Inheritance................................................................................................................. 0
Method Summary .................................................................................................. 506
Method Details....................................................................................................... 507
preSave............................................................................................................................. 507
preDqlUpdate ................................................................................................................... 507
getOption.......................................................................................................................... 507

----------------- Brought to you by


Table of Contents l

preDelete .......................................................................................................................... 507


postHydrate ...................................................................................................................... 507
postUpdate ....................................................................................................................... 507
postValidate...................................................................................................................... 507
add.................................................................................................................................... 507
get..................................................................................................................................... 507
postSave ........................................................................................................................... 508
preInsert........................................................................................................................... 508
preValidate ....................................................................................................................... 508
preHydrate ....................................................................................................................... 508
preDqlDelete .................................................................................................................... 508
postInsert ......................................................................................................................... 508
postUnserialize ................................................................................................................. 508
setOption .......................................................................................................................... 508
set ..................................................................................................................................... 508
preUnserialize .................................................................................................................. 509
postSerialize ..................................................................................................................... 509
preDqlSelect ..................................................................................................................... 509
postDelete......................................................................................................................... 509
preUpdate......................................................................................................................... 509
preSerialize ...................................................................................................................... 509
Doctrine_Record_Listener_Interface............................................................. 509
Method Summary .................................................................................................. 509
Method Details....................................................................................................... 510
preSave............................................................................................................................. 510
preDelete .......................................................................................................................... 510
postHydrate ...................................................................................................................... 510
postUpdate ....................................................................................................................... 510
postSave ........................................................................................................................... 510
preInsert........................................................................................................................... 510
preHydrate ....................................................................................................................... 510
postInsert ......................................................................................................................... 510
postUnserialize ................................................................................................................. 511
preUnserialize .................................................................................................................. 511
postSerialize ..................................................................................................................... 511
postDelete......................................................................................................................... 511
preUpdate......................................................................................................................... 511
preSerialize ...................................................................................................................... 511
Doctrine_Relation ......................................................................................... 511
Direct Sub-Classes..................................................................................................... 0
Method Summary .................................................................................................. 511
Method Details....................................................................................................... 512
getLocal ............................................................................................................................ 512
isOneToOne ...................................................................................................................... 512
getRelationDql.................................................................................................................. 512
offsetUnset ....................................................................................................................... 512
getAlias............................................................................................................................. 513
getForeignColumnName .................................................................................................. 513
offsetSet ........................................................................................................................... 513
isDeferred......................................................................................................................... 513
offsetGet ........................................................................................................................... 513
getForeign ........................................................................................................................ 513
__toString ......................................................................................................................... 513
isCascadeDelete ............................................................................................................... 513

----------------- Brought to you by


Table of Contents li

hasConstraint ................................................................................................................... 513


offsetExists ....................................................................................................................... 514
getType............................................................................................................................. 514
fetchRelatedFor................................................................................................................ 514
isEqual .............................................................................................................................. 514
getTable............................................................................................................................ 514
__construct ....................................................................................................................... 514
getLocalColumnName ...................................................................................................... 514
getForeignFieldName....................................................................................................... 514
getForeignKeyName......................................................................................................... 515
getLocalFieldName .......................................................................................................... 515
isDeferrable ...................................................................................................................... 515
getClass ............................................................................................................................ 515
toArray.............................................................................................................................. 515
Doctrine_Relation_Association ..................................................................... 515
Inheritance................................................................................................................. 0
Direct Sub-Classes..................................................................................................... 0
Method Summary .................................................................................................. 515
Method Details....................................................................................................... 516
getRelationDql.................................................................................................................. 516
getLocalRefFieldName ..................................................................................................... 516
getForeignRefColumnName ............................................................................................. 516
getAssociationFactory ...................................................................................................... 516
fetchRelatedFor................................................................................................................ 516
getAssociationTable ......................................................................................................... 516
getLocalRefColumnName................................................................................................. 516
getForeignRefFieldName ................................................................................................. 517
Doctrine_Relation_Association_Self .............................................................. 517
Inheritance................................................................................................................. 0
Method Summary .................................................................................................. 517
Method Details....................................................................................................... 517
getRelationDql.................................................................................................................. 517
fetchRelatedFor................................................................................................................ 517
Doctrine_Relation_ForeignKey...................................................................... 518
Inheritance................................................................................................................. 0
Method Summary .................................................................................................. 518
Method Details....................................................................................................... 518
fetchRelatedFor................................................................................................................ 518
getCondition ..................................................................................................................... 518
Doctrine_Relation_LocalKey ......................................................................... 518
Inheritance................................................................................................................. 0
Method Summary .................................................................................................. 518
Method Details....................................................................................................... 519
fetchRelatedFor................................................................................................................ 519
getCondition ..................................................................................................................... 519
Doctrine_Relation_Nest................................................................................. 519
Inheritance................................................................................................................. 0
Method Summary .................................................................................................. 519
Method Details....................................................................................................... 519
fetchRelatedFor................................................................................................................ 519

----------------- Brought to you by


Table of Contents lii

Doctrine_Relation_Parser.............................................................................. 520
Method Summary .................................................................................................. 520
Method Details....................................................................................................... 520
getPendingRelations......................................................................................................... 520
getRelation ....................................................................................................................... 521
getPendingRelation .......................................................................................................... 521
getImpl ............................................................................................................................. 521
bind................................................................................................................................... 521
completeAssocDefinition .................................................................................................. 521
hasRelation ....................................................................................................................... 521
guessColumns................................................................................................................... 521
getTable............................................................................................................................ 522
__construct ....................................................................................................................... 522
unsetPendingRelations ..................................................................................................... 522
completeDefinition ........................................................................................................... 522
getIdentifiers .................................................................................................................... 522
getRelations...................................................................................................................... 522
Doctrine_Search ............................................................................................ 523
Inheritance................................................................................................................. 0
Direct Sub-Classes..................................................................................................... 0
Method Summary .................................................................................................. 523
Method Details....................................................................................................... 523
setTableDefinition ............................................................................................................ 523
batchUpdateIndex ............................................................................................................ 523
analyze.............................................................................................................................. 523
readTableData .................................................................................................................. 523
updateIndex...................................................................................................................... 524
__construct ....................................................................................................................... 524
search ............................................................................................................................... 524
Doctrine_Search_Analyzer............................................................................. 524
Method Summary .................................................................................................. 524
Method Details....................................................................................................... 524
analyze.............................................................................................................................. 524
Doctrine_Search_Analyzer_Interface ............................................................ 525
Method Summary .................................................................................................. 525
Method Details....................................................................................................... 525
analyze.............................................................................................................................. 525
Doctrine_Search_Analyzer_Standard ............................................................ 525
Direct Sub-Classes..................................................................................................... 0
Method Summary .................................................................................................. 525
Method Details....................................................................................................... 525
analyze.............................................................................................................................. 525
Doctrine_Search_Analyzer_Utf8 .................................................................... 526
Inheritance................................................................................................................. 0
Method Summary .................................................................................................. 526
Method Details....................................................................................................... 526
analyze.............................................................................................................................. 526
Doctrine_Search_File .................................................................................... 526
Inheritance................................................................................................................. 0
Method Summary .................................................................................................. 526

----------------- Brought to you by


Table of Contents liii

Method Details....................................................................................................... 527


indexDirectory .................................................................................................................. 527
__construct ....................................................................................................................... 527
buildRelation .................................................................................................................... 527
Doctrine_Search_Indexer .............................................................................. 527
Method Summary .................................................................................................. 527
Method Details....................................................................................................... 527
indexDirectory .................................................................................................................. 527
Doctrine_Search_Indexer_Dir........................................................................ 528
Method Summary .................................................................................................. 528
Method Details....................................................................................................... 528
add.................................................................................................................................... 528
Doctrine_Search_Listener ............................................................................. 528
Inheritance................................................................................................................. 0
Method Summary .................................................................................................. 528
Method Details....................................................................................................... 529
postUpdate ....................................................................................................................... 529
__construct ....................................................................................................................... 529
postInsert ......................................................................................................................... 529
preUpdate......................................................................................................................... 529
Doctrine_Search_Parser ................................................................................ 529
Method Summary .................................................................................................. 529
Method Details....................................................................................................... 529
parse................................................................................................................................. 529
Doctrine_Search_Query ................................................................................. 530
Method Summary .................................................................................................. 530
Method Details....................................................................................................... 530
getParams......................................................................................................................... 530
query................................................................................................................................. 530
parseClause ...................................................................................................................... 530
isExpression ..................................................................................................................... 530
__construct ....................................................................................................................... 531
getSql ............................................................................................................................... 531
parseTerm ........................................................................................................................ 531
getWords .......................................................................................................................... 531
parseWord ........................................................................................................................ 531
Doctrine_Search_Record ............................................................................... 531
Inheritance................................................................................................................. 0
Method Summary .................................................................................................. 531
Method Details....................................................................................................... 531
setTableDefinition ............................................................................................................ 531
setUp ................................................................................................................................ 532
Doctrine_Sequence........................................................................................ 532
Inheritance................................................................................................................. 0
Direct Sub-Classes..................................................................................................... 0
Method Summary .................................................................................................. 532
Method Details....................................................................................................... 532
lastInsertId ....................................................................................................................... 532
currId................................................................................................................................ 532

----------------- Brought to you by


Table of Contents liv

nextId................................................................................................................................ 533
Doctrine_Sequence_Db2................................................................................ 533
Inheritance................................................................................................................. 0
Method Summary .................................................................................................. 533
Method Details....................................................................................................... 533
lastInsertId ....................................................................................................................... 533
lastSequenceId ................................................................................................................. 534
nextSequenceId ................................................................................................................ 534
Doctrine_Sequence_Firebird ......................................................................... 534
Inheritance................................................................................................................. 0
Method Summary .................................................................................................. 534
Method Details....................................................................................................... 535
lastInsertId ....................................................................................................................... 535
currId................................................................................................................................ 535
nextID ............................................................................................................................... 535
Doctrine_Sequence_Mssql............................................................................. 535
Inheritance................................................................................................................. 0
Method Summary .................................................................................................. 535
Method Details....................................................................................................... 536
checkSequence................................................................................................................. 536
lastInsertId ....................................................................................................................... 536
currId................................................................................................................................ 536
nextId................................................................................................................................ 536
Doctrine_Sequence_Mysql............................................................................. 537
Inheritance................................................................................................................. 0
Method Summary .................................................................................................. 537
Method Details....................................................................................................... 537
lastInsertId ....................................................................................................................... 537
currId................................................................................................................................ 537
nextId................................................................................................................................ 537
Doctrine_Sequence_Oracle............................................................................ 538
Inheritance................................................................................................................. 0
Method Summary .................................................................................................. 538
Method Details....................................................................................................... 538
lastInsertID....................................................................................................................... 538
currID ............................................................................................................................... 538
nextID ............................................................................................................................... 539
Doctrine_Sequence_Pgsql ............................................................................. 539
Inheritance................................................................................................................. 0
Method Summary .................................................................................................. 539
Method Details....................................................................................................... 539
lastInsertId ....................................................................................................................... 539
currId................................................................................................................................ 540
nextId................................................................................................................................ 540
Doctrine_Sequence_Sqlite............................................................................. 540
Inheritance................................................................................................................. 0
Method Summary .................................................................................................. 540
Method Details....................................................................................................... 540
lastInsertId ....................................................................................................................... 540

----------------- Brought to you by


Table of Contents lv

currId................................................................................................................................ 541
nextId................................................................................................................................ 541
Doctrine_Parser_Spyc.................................................................................... 541
Method Summary .................................................................................................. 541
Method Details....................................................................................................... 542
dump................................................................................................................................. 542
load ................................................................................................................................... 542
YAMLLoad ........................................................................................................................ 542
_linkRef............................................................................................................................. 543
YAMLDump ...................................................................................................................... 543
Doctrine_Parser_Spyc_YamlNode.................................................................. 543
Method Summary .................................................................................................. 543
Method Details....................................................................................................... 543
__construct ....................................................................................................................... 543
Doctrine_Table .............................................................................................. 544
Inheritance................................................................................................................. 0
Method Summary .................................................................................................. 544
Method Details....................................................................................................... 547
getOption.......................................................................................................................... 547
addNamedQuery............................................................................................................... 548
getTemplates .................................................................................................................... 548
hasColumn ........................................................................................................................ 548
find.................................................................................................................................... 548
getColumnNames ............................................................................................................. 548
setColumns ....................................................................................................................... 548
__isset ............................................................................................................................... 549
getRepository ................................................................................................................... 549
getColumns....................................................................................................................... 549
removeColumn ................................................................................................................. 549
clear.................................................................................................................................. 549
getGenerator .................................................................................................................... 549
createQuery...................................................................................................................... 549
isIdentifierComposite ....................................................................................................... 549
setConnection................................................................................................................... 550
getRelation ....................................................................................................................... 550
getDefinitionOf ................................................................................................................. 550
__call ................................................................................................................................. 550
getOptions ........................................................................................................................ 550
getProxy ........................................................................................................................... 550
addCheckConstraint ......................................................................................................... 550
validateUniques................................................................................................................ 551
setTableName................................................................................................................... 551
getRelationParser............................................................................................................. 551
createNamedQuery .......................................................................................................... 551
getIndex............................................................................................................................ 551
bind................................................................................................................................... 551
__toString ......................................................................................................................... 551
construct........................................................................................................................... 551
setOptions......................................................................................................................... 552
removeRecord .................................................................................................................. 552
isInheritedColumn ............................................................................................................ 552
getUniques ....................................................................................................................... 552
unique............................................................................................................................... 552

----------------- Brought to you by


Table of Contents lvi

hasGenerator .................................................................................................................... 552


getTableName .................................................................................................................. 552
setData ............................................................................................................................. 553
getIdentifierColumnNames .............................................................................................. 553
getRecord ......................................................................................................................... 553
getComponentName......................................................................................................... 553
__get ................................................................................................................................. 553
getFilters .......................................................................................................................... 553
addTemplate..................................................................................................................... 553
findBySql .......................................................................................................................... 553
executeOne....................................................................................................................... 554
hasRelation ....................................................................................................................... 554
validateField ..................................................................................................................... 554
isIdentifierAutoincrement ................................................................................................ 554
getColumnDefinition ........................................................................................................ 554
_resolveFindByFieldName................................................................................................ 554
hasTemplate ..................................................................................................................... 555
initIdentifier ..................................................................................................................... 555
getRecordInstance ........................................................................................................... 555
isIdentifier ........................................................................................................................ 555
unshiftFilter...................................................................................................................... 555
__construct ....................................................................................................................... 551
findBy ............................................................................................................................... 556
setColumn......................................................................................................................... 556
getTypeOf ......................................................................................................................... 556
getClassnameToReturn .................................................................................................... 556
count................................................................................................................................. 556
execute ............................................................................................................................. 556
addGenerator ................................................................................................................... 557
findOneBy ......................................................................................................................... 557
findAll ............................................................................................................................... 557
enumValue........................................................................................................................ 557
getFieldNames ................................................................................................................. 557
enumIndex ........................................................................................................................ 557
getEnumValues................................................................................................................. 557
getDefaultValueOf ............................................................................................................ 557
setOption .......................................................................................................................... 558
isTree................................................................................................................................ 558
setMethodOwner .............................................................................................................. 558
prepareValue .................................................................................................................... 558
getQueryObject ................................................................................................................ 558
getFieldName ................................................................................................................... 559
getTree ............................................................................................................................. 559
getRelations...................................................................................................................... 559
getExportableFormat ....................................................................................................... 559
getIdentifier...................................................................................................................... 559
getIdentifierType .............................................................................................................. 559
getConnection .................................................................................................................. 559
addForeignKey ................................................................................................................. 560
export ............................................................................................................................... 560
getColumnOwner.............................................................................................................. 560
getData ............................................................................................................................. 560
getGenerators................................................................................................................... 560
bindQueryPart .................................................................................................................. 560
getBoundQueryPart.......................................................................................................... 561
getTemplate...................................................................................................................... 561

----------------- Brought to you by


Table of Contents lvii

getColumnCount............................................................................................................... 561
bindQueryParts................................................................................................................. 561
addIndex ........................................................................................................................... 561
findByDql .......................................................................................................................... 561
getFieldValidators ............................................................................................................ 561
initDefinition..................................................................................................................... 562
applyInheritance............................................................................................................... 562
getMethodOwner.............................................................................................................. 562
hasDefaultValues.............................................................................................................. 562
create................................................................................................................................ 562
getColumnName............................................................................................................... 562
getTypeOfColumn............................................................................................................. 563
hasField ............................................................................................................................ 563
addRecord ........................................................................................................................ 563
getFieldLength ................................................................................................................. 563
Doctrine_Table_Exception............................................................................. 563
Method Summary .................................................................................................. 563
Method Details....................................................................................................... 563
__construct ....................................................................................................................... 563
Doctrine_Table_Repository ........................................................................... 564
Method Summary .................................................................................................. 564
Method Details....................................................................................................... 564
evictAll.............................................................................................................................. 564
add.................................................................................................................................... 564
contains ............................................................................................................................ 565
get..................................................................................................................................... 565
evict .................................................................................................................................. 565
getTable............................................................................................................................ 565
__construct ....................................................................................................................... 565
count................................................................................................................................. 565
getIterator ........................................................................................................................ 565
loadAll............................................................................................................................... 565
Doctrine_Task ............................................................................................... 566
Direct Sub-Classes..................................................................................................... 0
Method Summary .................................................................................................. 566
Method Details....................................................................................................... 566
notify................................................................................................................................. 566
getArguments ................................................................................................................... 566
getRequiredArgumentsDescriptions ................................................................................ 567
ask .................................................................................................................................... 567
validate ............................................................................................................................. 567
getTaskName.................................................................................................................... 567
__construct ....................................................................................................................... 567
getOptionalArgumentsDescriptions ................................................................................. 567
getOptionalArguments ..................................................................................................... 567
execute ............................................................................................................................. 567
getArgument..................................................................................................................... 567
setArguments ................................................................................................................... 567
getDescription .................................................................................................................. 568
addArgument .................................................................................................................... 568
getRequiredArguments .................................................................................................... 568
Doctrine_Task_BuildAll ................................................................................. 568

----------------- Brought to you by


Table of Contents lviii

Inheritance................................................................................................................. 0
Method Summary .................................................................................................. 568
Method Details....................................................................................................... 568
__construct ....................................................................................................................... 568
execute ............................................................................................................................. 568
Doctrine_Task_BuildAllLoad ......................................................................... 569
Inheritance................................................................................................................. 0
Method Summary .................................................................................................. 569
Method Details....................................................................................................... 569
__construct ....................................................................................................................... 569
execute ............................................................................................................................. 569
Doctrine_Task_BuildAllReload...................................................................... 569
Inheritance................................................................................................................. 0
Method Summary .................................................................................................. 569
Method Details....................................................................................................... 570
__construct ....................................................................................................................... 570
execute ............................................................................................................................. 570
Doctrine_Task_Compile................................................................................. 570
Inheritance................................................................................................................. 0
Method Summary .................................................................................................. 570
Method Details....................................................................................................... 570
execute ............................................................................................................................. 570
Doctrine_Task_CreateDb ............................................................................... 571
Inheritance................................................................................................................. 0
Method Summary .................................................................................................. 571
Method Details....................................................................................................... 571
execute ............................................................................................................................. 571
Doctrine_Task_CreateTables ......................................................................... 571
Inheritance................................................................................................................. 0
Method Summary .................................................................................................. 571
Method Details....................................................................................................... 571
execute ............................................................................................................................. 571
Doctrine_Task_Dql ........................................................................................ 572
Inheritance................................................................................................................. 0
Method Summary .................................................................................................. 572
Method Details....................................................................................................... 572
execute ............................................................................................................................. 572
_printResults..................................................................................................................... 572
Doctrine_Task_DropDb.................................................................................. 572
Inheritance................................................................................................................. 0
Method Summary .................................................................................................. 572
Method Details....................................................................................................... 573
execute ............................................................................................................................. 573
Doctrine_Task_DumpData ............................................................................. 573
Inheritance................................................................................................................. 0
Method Summary .................................................................................................. 573
Method Details....................................................................................................... 573
execute ............................................................................................................................. 573

----------------- Brought to you by


Table of Contents lix

Doctrine_Task_GenerateMigration ............................................................... 573


Inheritance................................................................................................................. 0
Method Summary .................................................................................................. 573
Method Details....................................................................................................... 574
execute ............................................................................................................................. 574
Doctrine_Task_GenerateMigrationsDb ......................................................... 574
Inheritance................................................................................................................. 0
Method Summary .................................................................................................. 574
Method Details....................................................................................................... 574
execute ............................................................................................................................. 574
Doctrine_Task_GenerateMigrationsModels .................................................. 574
Inheritance................................................................................................................. 0
Method Summary .................................................................................................. 574
Method Details....................................................................................................... 575
execute ............................................................................................................................. 575
Doctrine_Task_GenerateModelsDb ............................................................... 575
Inheritance................................................................................................................. 0
Method Summary .................................................................................................. 575
Method Details....................................................................................................... 575
execute ............................................................................................................................. 575
Doctrine_Task_GenerateModelsYaml............................................................ 575
Inheritance................................................................................................................. 0
Method Summary .................................................................................................. 575
Method Details....................................................................................................... 576
execute ............................................................................................................................. 576
Doctrine_Task_GenerateSql .......................................................................... 576
Inheritance................................................................................................................. 0
Method Summary .................................................................................................. 576
Method Details....................................................................................................... 576
execute ............................................................................................................................. 576
Doctrine_Task_GenerateYamlDb................................................................... 576
Inheritance................................................................................................................. 0
Method Summary .................................................................................................. 576
Method Details....................................................................................................... 577
execute ............................................................................................................................. 577
Doctrine_Task_GenerateYamlModels............................................................ 577
Inheritance................................................................................................................. 0
Method Summary .................................................................................................. 577
Method Details....................................................................................................... 577
execute ............................................................................................................................. 577
Doctrine_Task_LoadData............................................................................... 577
Inheritance................................................................................................................. 0
Method Summary .................................................................................................. 577
Method Details....................................................................................................... 578
execute ............................................................................................................................. 578
Doctrine_Task_Migrate ................................................................................. 578
Inheritance................................................................................................................. 0

----------------- Brought to you by


Table of Contents lx

Method Summary .................................................................................................. 578


Method Details....................................................................................................... 578
execute ............................................................................................................................. 578
Doctrine_Task_RebuildDb ............................................................................. 578
Inheritance................................................................................................................. 0
Method Summary .................................................................................................. 578
Method Details....................................................................................................... 579
__construct ....................................................................................................................... 579
execute ............................................................................................................................. 579
Doctrine_Template ........................................................................................ 579
Inheritance................................................................................................................. 0
Direct Sub-Classes..................................................................................................... 0
Method Summary .................................................................................................. 579
Method Details....................................................................................................... 580
setTableDefinition ............................................................................................................ 580
setTable ............................................................................................................................ 580
getOption.......................................................................................................................... 580
getPlugin .......................................................................................................................... 580
getOptions ........................................................................................................................ 580
addChild ........................................................................................................................... 580
get..................................................................................................................................... 580
getTable............................................................................................................................ 581
__construct ....................................................................................................................... 581
getInvoker ........................................................................................................................ 581
set ..................................................................................................................................... 581
setInvoker......................................................................................................................... 581
setUp ................................................................................................................................ 581
Doctrine_Template_Geographical ................................................................. 582
Inheritance................................................................................................................. 0
Method Summary .................................................................................................. 582
Method Details....................................................................................................... 582
setTableDefinition ............................................................................................................ 582
getDistanceQuery ............................................................................................................. 582
getDistance....................................................................................................................... 582
Doctrine_Template_I18n ............................................................................... 583
Inheritance................................................................................................................. 0
Method Summary .................................................................................................. 583
Method Details....................................................................................................... 583
__construct ....................................................................................................................... 583
getI18n ............................................................................................................................. 583
setUp ................................................................................................................................ 583
Doctrine_Template_Listener_Sluggable........................................................ 584
Inheritance................................................................................................................. 0
Method Summary .................................................................................................. 584
Method Details....................................................................................................... 584
buildSlug .......................................................................................................................... 584
preInsert........................................................................................................................... 584
__construct ....................................................................................................................... 584
getUniqueSlug.................................................................................................................. 584
preUpdate......................................................................................................................... 585

----------------- Brought to you by


Table of Contents lxi

Doctrine_Template_Listener_SoftDelete ....................................................... 585


Inheritance................................................................................................................. 0
Method Summary .................................................................................................. 585
Method Details....................................................................................................... 585
preDelete .......................................................................................................................... 585
__construct ....................................................................................................................... 585
preDqlDelete .................................................................................................................... 585
preDqlSelect ..................................................................................................................... 586
postDelete......................................................................................................................... 586
Doctrine_Template_Listener_Timestampable ............................................... 586
Inheritance................................................................................................................. 0
Method Summary .................................................................................................. 586
Method Details....................................................................................................... 586
getTimestamp ................................................................................................................... 586
preDqlUpdate ................................................................................................................... 586
preInsert........................................................................................................................... 587
__construct ....................................................................................................................... 587
preUpdate......................................................................................................................... 587
Doctrine_Template_NestedSet ...................................................................... 587
Inheritance................................................................................................................. 0
Method Summary .................................................................................................. 587
Method Details....................................................................................................... 587
setTableDefinition ............................................................................................................ 587
setUp ................................................................................................................................ 587
Doctrine_Template_Searchable..................................................................... 588
Inheritance................................................................................................................. 0
Method Summary .................................................................................................. 588
Method Details....................................................................................................... 588
batchUpdateIndex ............................................................................................................ 588
__construct ....................................................................................................................... 588
searchTableProxy ............................................................................................................. 588
setUp ................................................................................................................................ 589
Doctrine_Template_Sluggable ...................................................................... 589
Inheritance................................................................................................................. 0
Method Summary .................................................................................................. 589
Method Details....................................................................................................... 589
setTableDefinition ............................................................................................................ 589
Doctrine_Template_SoftDelete...................................................................... 589
Inheritance................................................................................................................. 0
Method Summary .................................................................................................. 589
Method Details....................................................................................................... 590
setTableDefinition ............................................................................................................ 590
Doctrine_Template_Timestampable.............................................................. 590
Inheritance................................................................................................................. 0
Method Summary .................................................................................................. 590
Method Details....................................................................................................... 590
setTableDefinition ............................................................................................................ 590
Doctrine_Template_Versionable ................................................................... 590
Inheritance................................................................................................................. 0

----------------- Brought to you by


Table of Contents lxii

Method Summary .................................................................................................. 590


Method Details....................................................................................................... 591
revert ................................................................................................................................ 591
__construct ....................................................................................................................... 591
getAuditLog ...................................................................................................................... 591
setUp ................................................................................................................................ 591
Doctrine_Transaction.................................................................................... 592
Inheritance................................................................................................................. 0
Direct Sub-Classes..................................................................................................... 0
Method Summary .................................................................................................. 592
Method Details....................................................................................................... 593
createSavePoint................................................................................................................ 593
getIsolation....................................................................................................................... 593
beginInternalTransaction ................................................................................................. 593
commit.............................................................................................................................. 594
beginTransaction.............................................................................................................. 594
rollbackSavePoint............................................................................................................. 594
rollback............................................................................................................................. 594
_doCommit........................................................................................................................ 595
getTransactionLevel ......................................................................................................... 595
addCollection.................................................................................................................... 595
getInvalid.......................................................................................................................... 595
setIsolation ....................................................................................................................... 595
addInvalid ......................................................................................................................... 596
getInternalTransactionLevel ............................................................................................ 596
_doBeginTransaction ........................................................................................................ 596
getState ............................................................................................................................ 596
releaseSavePoint .............................................................................................................. 596
_doRollback ...................................................................................................................... 596
Doctrine_Transaction_Firebird ..................................................................... 597
Inheritance................................................................................................................. 0
Method Summary .................................................................................................. 597
Method Details....................................................................................................... 597
createSavePoint................................................................................................................ 597
rollbackSavePoint............................................................................................................. 597
setIsolation ....................................................................................................................... 597
releaseSavePoint .............................................................................................................. 598
Doctrine_Transaction_Mssql ......................................................................... 598
Inheritance................................................................................................................. 0
Method Summary .................................................................................................. 598
Method Details....................................................................................................... 598
_doCommit........................................................................................................................ 598
setIsolation ....................................................................................................................... 599
_doBeginTransaction ........................................................................................................ 599
_doRollback ...................................................................................................................... 599
Doctrine_Transaction_Mysql......................................................................... 599
Inheritance................................................................................................................. 0
Method Summary .................................................................................................. 599
Method Details....................................................................................................... 600
createSavePoint................................................................................................................ 600
getIsolation....................................................................................................................... 600
rollbackSavePoint............................................................................................................. 600

----------------- Brought to you by


Table of Contents lxiii

setIsolation ....................................................................................................................... 600


releaseSavePoint .............................................................................................................. 600
Doctrine_Transaction_Oracle ........................................................................ 601
Inheritance................................................................................................................. 0
Method Summary .................................................................................................. 601
Method Details....................................................................................................... 601
createSavePoint................................................................................................................ 601
rollbackSavePoint............................................................................................................. 601
setIsolation ....................................................................................................................... 601
releaseSavePoint .............................................................................................................. 602
Doctrine_Transaction_Pgsql ......................................................................... 602
Inheritance................................................................................................................. 0
Method Summary .................................................................................................. 602
Method Details....................................................................................................... 602
createSavePoint................................................................................................................ 602
rollbackSavePoint............................................................................................................. 602
setIsolation ....................................................................................................................... 603
releaseSavePoint .............................................................................................................. 603
Doctrine_Transaction_Sqlite ......................................................................... 603
Inheritance................................................................................................................. 0
Method Summary .................................................................................................. 603
Method Details....................................................................................................... 604
setIsolation ....................................................................................................................... 604
Doctrine_Tree................................................................................................ 604
Direct Sub-Classes..................................................................................................... 0
Method Summary .................................................................................................. 604
Method Details....................................................................................................... 604
setTableDefinition ............................................................................................................ 604
getBaseComponent........................................................................................................... 605
__construct ....................................................................................................................... 605
getAttribute ...................................................................................................................... 605
factory .............................................................................................................................. 605
setUp ................................................................................................................................ 605
setAttribute ...................................................................................................................... 605
Doctrine_Tree_Interface................................................................................ 606
Method Summary .................................................................................................. 606
Method Details....................................................................................................... 606
createRoot ........................................................................................................................ 606
findRoot ............................................................................................................................ 606
fetchBranch ...................................................................................................................... 606
fetchTree .......................................................................................................................... 607
Doctrine_Tree_NestedSet .............................................................................. 607
Inheritance................................................................................................................. 0
Method Summary .................................................................................................. 607
Method Details....................................................................................................... 608
setTableDefinition ............................................................................................................ 608
returnQueryWithRootId.................................................................................................... 608
fetchRoots......................................................................................................................... 608
setBaseQuery.................................................................................................................... 608
__construct ....................................................................................................................... 608

----------------- Brought to you by


Table of Contents lxiv

createRoot ........................................................................................................................ 609


getMaxRootId ................................................................................................................... 609
getBaseQuery ................................................................................................................... 609
findRoot ............................................................................................................................ 609
fetchBranch ...................................................................................................................... 609
getBaseAlias ..................................................................................................................... 609
fetchTree .......................................................................................................................... 610
resetBaseQuery ................................................................................................................ 610
fetchRoot .......................................................................................................................... 610
getNextRootId .................................................................................................................. 610
Doctrine_Validator ........................................................................................ 610
Method Summary .................................................................................................. 610
Method Details....................................................................................................... 611
isValidType ....................................................................................................................... 611
validateLength.................................................................................................................. 611
getStringLength ............................................................................................................... 611
validateRecord.................................................................................................................. 611
hasErrors .......................................................................................................................... 611
getValidator ...................................................................................................................... 612
Doctrine_Validator_Country .......................................................................... 612
Method Summary .................................................................................................. 612
Method Details....................................................................................................... 612
validate ............................................................................................................................. 612
getCountries ..................................................................................................................... 612
Doctrine_Validator_Creditcard...................................................................... 613
Method Summary .................................................................................................. 613
Method Details....................................................................................................... 613
validate ............................................................................................................................. 613
Doctrine_Validator_Date ............................................................................... 613
Method Summary .................................................................................................. 613
Method Details....................................................................................................... 614
validate ............................................................................................................................. 614
Doctrine_Validator_Driver............................................................................. 614
Direct Sub-Classes..................................................................................................... 0
Method Summary .................................................................................................. 614
Method Details....................................................................................................... 614
__isset ............................................................................................................................... 614
__get ................................................................................................................................. 614
getArgs ............................................................................................................................. 614
getArg............................................................................................................................... 615
setArg ............................................................................................................................... 615
__set.................................................................................................................................. 615
Doctrine_Validator_Email ............................................................................. 615
Method Summary .................................................................................................. 615
Method Details....................................................................................................... 616
validate ............................................................................................................................. 616
Doctrine_Validator_ErrorStack ..................................................................... 616
Inheritance................................................................................................................. 0
Method Summary .................................................................................................. 616
Method Details....................................................................................................... 616

----------------- Brought to you by


Table of Contents lxv

add.................................................................................................................................... 616
clear.................................................................................................................................. 617
contains ............................................................................................................................ 617
get..................................................................................................................................... 617
__construct ....................................................................................................................... 617
count................................................................................................................................. 617
getClassname ................................................................................................................... 617
getIterator ........................................................................................................................ 617
set ..................................................................................................................................... 617
getValidators .................................................................................................................... 618
remove.............................................................................................................................. 618
toArray.............................................................................................................................. 618
Doctrine_Validator_Exception ....................................................................... 618
Method Summary .................................................................................................. 618
Method Details....................................................................................................... 618
inspect .............................................................................................................................. 618
__toString ......................................................................................................................... 619
__construct ....................................................................................................................... 619
count................................................................................................................................. 619
getInvalidRecords............................................................................................................. 619
getIterator ........................................................................................................................ 619
Doctrine_Validator_Future ............................................................................ 619
Method Summary .................................................................................................. 619
Method Details....................................................................................................... 619
validate ............................................................................................................................. 619
Doctrine_Validator_HtmlColor ...................................................................... 620
Method Summary .................................................................................................. 620
Method Details....................................................................................................... 620
validate ............................................................................................................................. 620
Doctrine_Validator_Ip ................................................................................... 620
Method Summary .................................................................................................. 620
Method Details....................................................................................................... 621
validate ............................................................................................................................. 621
Doctrine_Validator_Minlength ...................................................................... 621
Method Summary .................................................................................................. 621
Method Details....................................................................................................... 621
validate ............................................................................................................................. 621
Doctrine_Validator_Nospace ......................................................................... 621
Inheritance................................................................................................................. 0
Method Summary .................................................................................................. 621
Method Details....................................................................................................... 622
validate ............................................................................................................................. 622
Doctrine_Validator_Notblank ........................................................................ 622
Inheritance................................................................................................................. 0
Method Summary .................................................................................................. 622
Method Details....................................................................................................... 622
validate ............................................................................................................................. 622
Doctrine_Validator_Notnull .......................................................................... 623
Inheritance................................................................................................................. 0

----------------- Brought to you by


Table of Contents lxvi

Method Summary .................................................................................................. 623


Method Details....................................................................................................... 623
validate ............................................................................................................................. 623
Doctrine_Validator_Past................................................................................ 623
Method Summary .................................................................................................. 623
Method Details....................................................................................................... 624
validate ............................................................................................................................. 624
Doctrine_Validator_Range............................................................................. 624
Method Summary .................................................................................................. 624
Method Details....................................................................................................... 624
validate ............................................................................................................................. 624
Doctrine_Validator_Readonly ........................................................................ 624
Method Summary .................................................................................................. 624
Method Details....................................................................................................... 625
validate ............................................................................................................................. 625
Doctrine_Validator_Regexp ........................................................................... 625
Method Summary .................................................................................................. 625
Method Details....................................................................................................... 625
validate ............................................................................................................................. 625
Doctrine_Validator_Time............................................................................... 626
Method Summary .................................................................................................. 626
Method Details....................................................................................................... 626
validate ............................................................................................................................. 626
Doctrine_Validator_Timestamp..................................................................... 626
Method Summary .................................................................................................. 626
Method Details....................................................................................................... 627
validate ............................................................................................................................. 627
Doctrine_Validator_Unique ........................................................................... 627
Method Summary .................................................................................................. 627
Method Details....................................................................................................... 627
validate ............................................................................................................................. 627
Doctrine_Validator_Unsigned ....................................................................... 627
Method Summary .................................................................................................. 627
Method Details....................................................................................................... 628
validate ............................................................................................................................. 628
Doctrine_Validator_Usstate........................................................................... 628
Method Summary .................................................................................................. 628
Method Details....................................................................................................... 628
validate ............................................................................................................................. 628
getStates........................................................................................................................... 628
Doctrine_View ............................................................................................... 629
Method Summary .................................................................................................. 629
Method Details....................................................................................................... 629
getViewSql........................................................................................................................ 629
getName ........................................................................................................................... 629
drop .................................................................................................................................. 629
getQuery........................................................................................................................... 630

----------------- Brought to you by


Table of Contents lxvii

__construct ....................................................................................................................... 630


getViewDql ....................................................................................................................... 630
execute ............................................................................................................................. 630
getConnection .................................................................................................................. 630
getSelectSql ..................................................................................................................... 630
create................................................................................................................................ 630

----------------- Brought to you by


Doctrine_Parser_YamlSf 68

Doctrine_Parser_YamlSf

Method Summary
Returns Name Description
string dump The dump method, when supplied with an array, will do its best to convert
the array into friendly YAML.
array load The load method, when supplied with a YAML stream (string or file), will
do its best to convert YAML in a file into a PHP array. Usage:

Listing
0-1

Method Details
(string) dump($array, $inline = 4)

Parameter Summary

$array PHP array

Dump YAML from PHP array statically


The dump method, when supplied with an array, will do its best to convert the array into
friendly YAML.

(array) load($input)

Parameter Summary

$input Path of YAML file or string containing YAML

Load YAML into a PHP array statically


The load method, when supplied with a YAML stream (string or file), will do its best to
convert YAML in a file into a PHP array. Usage: <pre><code> <![CDATA[ $array =
sfYAML::Load('config.yml'); print_r($array);]]> </code></pre>

----------------- Brought to you by


Doctrine_Parser_YamlSf_Dumper 69

Doctrine_Parser_YamlSf_Dumper

Method Summary
Returns Name Description
string dump

Method Details
(string) dump($input, $inline, $indent)

Parameter Summary

$input The PHP value


$inline The level where you switch to inline YAML

$indent The level o indentation indentation (used internally)

Dumps a PHP value to YAML.


<strong>returns</strong> The YAML representation of the PHP value

Doctrine_Parser_YamlSf_Inline

Method Summary
Returns Name Description
string dump

----------------- Brought to you by


Doctrine_Parser_YamlSf_Inline 70

array load
string evaluateScalar
string parseSequence
string parseMapping
string parseScalar
string dumpArray
getTimestampRegex
string parseQuotedScalar

Method Details
(string) dump($value)

Parameter Summary

$value PHP

Dumps PHP array to YAML.


<strong>returns</strong> YAML

(array) load($value)

Parameter Summary

$value YAML

Load YAML into a PHP array.


<strong>returns</strong> PHP array

(string) evaluateScalar($scalar)

Parameter Summary
Evaluates scalars and replaces magic values.
<strong>returns</strong> YAML

(string) parseSequence($sequence, [[[amp]]]$i, $i)

Parameter Summary
Parse sequence to yaml
<strong>returns</strong> YAML

----------------- Brought to you by


Doctrine_Parser_YamlSf_Inline 71

(string) parseMapping($mapping, [[[amp]]]$i, $i)

Parameter Summary
Parses mapping.
<strong>returns</strong> YAML

(string) parseScalar((scalar) $scalar, $delimiters = null, $stringDelimiters


= array('"', "'"), [[[amp]]]$i, $evaluate = true, $i)

Parameter Summary

$stringDelimiters String delimiter

Parses scalar to yaml


<strong>returns</strong> YAML

(string) dumpArray($value)

Parameter Summary

$value The array to dump

Dumps PHP array to YAML


<strong>returns</strong> YAML

getTimestampRegex()

Parameter Summary

(string) parseQuotedScalar($scalar, [[[amp]]]$i, $i)

Parameter Summary
Parses quotes scalar
<strong>returns</strong> YAML

----------------- Brought to you by


Doctrine_Parser_YamlSf_Parser 72

Doctrine_Parser_YamlSf_Parser

Method Summary
Returns Name Description
getNextEmbedBlock
integer getRealCurrentLineNb
mixed parseValue
Boolean isCurrentLineEmpty
Boolean isCurrentLineBlank
mixed parse
string parseFoldedScalar
integer getCurrentLineIndentation
__construct
Boolean isCurrentLineComment
Boolean isNextLineIndented
string cleanup
moveToPreviousLine
moveToNextLine

Method Details
getNextEmbedBlock(0)

Parameter Summary

0 A YAML string

Returns the next embed block of YAML.

(integer) getRealCurrentLineNb()

Parameter Summary

----------------- Brought to you by


Doctrine_Parser_YamlSf_Parser 73

Returns the current line number (takes the offset into account).
<strong>returns</strong> The current line number

(mixed) parseValue($value)

Parameter Summary

$value A YAML value

Parses a YAML value.


<strong>returns</strong> A PHP value

(Boolean) isCurrentLineEmpty()

Parameter Summary
Returns true if the current line is blank or if it is a comment line.
<strong>returns</strong> Returns true if the current line is empty or if it is a comment line,
false otherwise

(Boolean) isCurrentLineBlank()

Parameter Summary
Returns true if the current line is blank.
<strong>returns</strong> Returns true if the current line is blank, false otherwise

(mixed) parse($value)

Parameter Summary

$value A YAML string

Parses a YAML string to a PHP value.


<strong>returns</strong> A PHP value

(string) parseFoldedScalar($separator, $indicator = '', $indentation)

Parameter Summary

$separator The separator that was used to begin this folded scalar (| or &gt;)
$indicator The indicator that was used to begin this folded scalar (+ or -)
$indentation The indentation that was used to begin this folded scalar

Parses a folded scalar.


<strong>returns</strong> The text value

----------------- Brought to you by


Doctrine_Parser_YamlSf_Parser 74

(integer) getCurrentLineIndentation()

Parameter Summary
Returns the current line indentation.
<strong>returns</strong> The current line indentation

__construct($offset)

Parameter Summary

$offset The offset of YAML document (used for line numbers in error messages)

Constructor

(Boolean) isCurrentLineComment()

Parameter Summary
Returns true if the current line is a comment line.
<strong>returns</strong> Returns true if the current line is a comment line, false otherwise

(Boolean) isNextLineIndented()

Parameter Summary
Returns true if the next line is indented.
<strong>returns</strong> Returns true if the next line is indented, false otherwise

(string) cleanup($value)

Parameter Summary

$value The input YAML string

Cleanups a YAML string to be parsed.


<strong>returns</strong> A cleaned up YAML string

moveToPreviousLine()

Parameter Summary
Moves the parser to the previous line.

moveToNextLine()

Parameter Summary

----------------- Brought to you by


Doctrine 75

Moves the parser to the next line.

Doctrine

Method Summary
Returns Name Description
string generateSqlFromModels
dump
boolean isValidModelClass
generateYamlFromModels
generateMigrationsFromDb
getConnectionByTableName
debug
loadModel
array getLoadedModels Will filter through an array of classes and return
the Doctrine_Records out of them. If you do not
specify $classes it will return all of the currently
loaded Doctrine_Records
createDatabases
boolean autoload
array generateMigrationsFromDiff
dumpData
array initializeModels This will also inheritently initialize any model
behaviors and add the models generated by
Doctrine generators and add them to the
$models array
array filterInvalidModels This will inflect the class, causing it to be loaded
in to memory.
compile
generateMigrationsFromModels
getTable
__construct
string getPath
array getLoadedModelFiles

----------------- Brought to you by


Doctrine 76

generateModelsFromYaml
loadData The output of dumpData can be fed to loadData
dropDatabases
boolean generateModelsFromDb
createTablesFromArray
generateMigrationClass
generateYamlFromDb This should probably be fixed. We should write
something to generate a yaml schema file
directly from the database.
createTablesFromModels
bool migrate
array generateSqlFromArray
loadModels

Method Details
(string) generateSqlFromModels($directory = null)

Parameter Summary
Generate a sql string to create the tables from all loaded models or the models found
in the passed directory.
<strong>returns</strong> String of sql queries. One query per line

dump($var, $output = true, $indent = "")

Parameter Summary

$var a variable of any type


$output whether to output the content

$indent indention string

dumps a given variable

(boolean) isValidModelClass($class)

Parameter Summary

$class Can be a string named after the class, an instance of the class, or an instance of the
class reflected

Checks if what is passed is a valid Doctrine_Record Will load class in to memory in


order to inflect it and find out information about the class

----------------- Brought to you by


Doctrine 77

generateYamlFromModels($yamlPath, $directory)

Parameter Summary

$yamlPath Path to your yaml schema files

$directory Directory to generate your models in

Generate yaml schema file for the models in the specified directory

generateMigrationsFromDb($migrationsPath)

Parameter Summary
Generate a set of migration classes from an existing database
<strong>throws</strong> new Doctrine_Migration_Exception

getConnectionByTableName($tableName)

Parameter Summary
Get the connection object for a table by the actual table name FIXME: I think this
method is flawed because a individual connections could have the same table name

debug($bool = null)

Parameter Summary
Turn on/off the debugging setting

loadModel($className, $path = null)

Parameter Summary
Load an individual model name and path in to the model loading registry

(array) getLoadedModels((classes) $classes = null)

Parameter Summary

$classes Array of classes to filter through, otherwise uses get_declared_classes()

Get all the loaded models, you can provide an array of classes or it will use
get_declared_classes()
Will filter through an array of classes and return the Doctrine_Records out of them. If you do
not specify $classes it will return all of the currently loaded Doctrine_Records

----------------- Brought to you by


Doctrine 78

createDatabases($specifiedConnections = array())

Parameter Summary

$specifiedConnections Array of connections you wish to create the database for

Creates databases for connections

(boolean) autoload($className, $classname)

Parameter Summary
simple autoload function returns true if the class was loaded, otherwise false

(array) generateMigrationsFromDiff($migrationsPath, $from, $to)

Parameter Summary

$migrationsPath Path to your Doctrine migration classes

$from From schema information


$to To schema information

Generate a set of migration classes by generating differences between two sets of


schema information

dumpData($yamlPath, $individualFiles = false)

Parameter Summary

$yamlPath Path to write the yaml data fixtures to


$individualFiles Whether or not to dump data to individual fixtures files

Dump data to a yaml fixtures file

(array) initializeModels($models)

Parameter Summary
Initialize all models so everything is present and loaded in to memory
This will also inheritently initialize any model behaviors and add the models generated by
Doctrine generators and add them to the $models array

----------------- Brought to you by


Doctrine 79

(array) filterInvalidModels((classes) $classes)

Parameter Summary

$classes Array of classes to filter through, otherwise uses get_declared_classes()

Filter through an array of classes and return all the classes that are valid models.
This will inflect the class, causing it to be loaded in to memory.

compile($target = null, $includedDrivers = array())

Parameter Summary
Method for making a single file of most used doctrine runtime components including
the compiled file instead of multiple files (in worst cases dozens of files) can improve
performance by an order of magnitude
<strong>throws</strong> Doctrine_Exception

generateMigrationsFromModels($migrationsPath, $modelsPath = null,


$modelLoading = null)

Parameter Summary

$migrationsPath Path to your Doctrine migration classes

$modelsPath Path to your Doctrine model classes


$modelLoading Style of model loading to use for loading the models in order to generate
migrations

Generate a set of migration classes from an existing set of models

getTable($componentName)

Parameter Summary
Get the Doctrine_Table object for the passed model

__construct()

Parameter Summary
<strong>throws</strong> Doctrine_Exception

(string) getPath()

Parameter Summary
Get the root path to Doctrine

----------------- Brought to you by


Doctrine 80

(array) getLoadedModelFiles()

Parameter Summary
Returns an array of all the loaded models and the path where each of them exists

generateModelsFromYaml($yamlPath, $directory, $options = array())

Parameter Summary

$yamlPath Path to your yaml schema files

$directory Directory to generate your models in

$options Array of options to pass to the schema importer

Generate a yaml schema file from an existing directory of models

loadData($yamlPath, $append = false)

Parameter Summary

$yamlPath Path to your yaml data fixtures

$append Whether or not to append the data

Load data from a yaml fixtures file.


The output of dumpData can be fed to loadData

dropDatabases($specifiedConnections = array())

Parameter Summary

$specifiedConnections Array of connections you wish to drop the database for

Drops databases for connections

(boolean) generateModelsFromDb($directory, $databases = array(),


$options = array())

Parameter Summary

$directory Directory to write your models to


$databases Array of databases to generate models for

$options Array of options

Method for importing existing schema to Doctrine_Record classes


<strong>throws</strong> Exception

----------------- Brought to you by


Doctrine 81

createTablesFromArray($array)

Parameter Summary

$array An array of models to be exported

Creates database tables for the models in the supplied array

generateMigrationClass($className, $migrationsPath)

Parameter Summary

$className Name of the Migration class to generate


$migrationsPath Path to directory which contains your migration classes

Generate new migration class skeleton

generateYamlFromDb($yamlPath, $databases = array(), $options =


array())

Parameter Summary

$yamlPath Path to write oyur yaml schema file to

$options Array of options

Generates models from database to temporary location then uses those models to
generate a yaml schema file.
This should probably be fixed. We should write something to generate a yaml schema file
directly from the database.

createTablesFromModels($directory = null)

Parameter Summary

$directory Directory containing your models

Creates database tables for the models in the specified directory

(bool) migrate($migrationsPath, $to = null)

Parameter Summary

$migrationsPath Path to migrations directory which contains your migration classes

$to Version you wish to migrate to.

----------------- Brought to you by


Doctrine_Access 82

Migrate database to specified $to version. Migrates from current to latest if you do
not specify.
<strong>returns</strong> true
<strong>throws</strong> new Doctrine_Migration_Exception

(array) generateSqlFromArray($array)

Parameter Summary
Generate a array of sql for the passed array of models

loadModels($directory, $modelLoading = null)

Parameter Summary

$directory Path to directory of models or array of directory paths


$modelLoading Pass value of Doctrine::ATTR_MODEL_LOADING to force a certain style of
model loading Allowed Doctrine::MODEL_LOADING_AGGRESSIVE(default)
or Doctrine::MODEL_LOADING_CONSERVATIVE

Recursively load all models from a directory or array of directories

Doctrine_Access

Method Summary
Returns Name Description
boolean __isset
add
offsetUnset
offsetSet
mixed offsetGet
boolean contains
mixed get
boolean offsetExists
mixed __get
__unset

----------------- Brought to you by


Doctrine_Access 83

setArray
set
boolean remove
__set

Method Details
(boolean) __isset($name)

Parameter Summary
Check if key exists in data
<strong>returns</strong> whether or not this object contains $name

add($value)

Parameter Summary

$value The value to add

Add the value

offsetUnset($offset)

Parameter Summary
Unset a given offset

offsetSet($offset, $value)

Parameter Summary
Sets $offset to $value

(mixed) offsetGet($offset)

Parameter Summary
An alias of get()

(boolean) contains($offset)

Parameter Summary

$offset The offset to check

----------------- Brought to you by


Doctrine_Access 84

Check if the specified offset exists


<strong>returns</strong> True if exists otherwise false

(mixed) get($offset)

Parameter Summary

$offset The offset to return

Return the element with the specified offset


<strong>returns</strong> The value of the return object

(boolean) offsetExists($offset)

Parameter Summary
Check if an offset axists
<strong>returns</strong> Whether or not this object contains $offset

(mixed) __get($name)

Parameter Summary
Get key from data

__unset($name)

Parameter Summary
Remove key from data

setArray($array)

Parameter Summary

$array An array of key =&gt; value pairs

Set an entire aray to the data

set($offset, $value)

Parameter Summary

$offset The offset to set

$value The value to set the offset to

Set the offset to the value

----------------- Brought to you by


Doctrine_Adapter_Db2 85

(boolean) remove($offset)

Parameter Summary

$offset The offset to remove

Remove the element with the specified offset


<strong>returns</strong> True if removed otherwise false

__set(($name) $name, ($value) $value)

Parameter Summary
Set key and value to data

Doctrine_Adapter_Db2

Method Summary
Returns Name Description
string getQuoteIdentifierSymbol
_commit
_setExecuteMode
setFetchMode
int _getExecuteMode
__construct dbname => (string) The name of the
database to user username => (string)
Connect to the database as this
username. password => (string)
Password associated with the
username. host => (string) What host
to conne
Doctrine_Statement_Db2 prepare
closeConnection
_connect
string _quote
_beginTransaction

----------------- Brought to you by


Doctrine_Adapter_Db2 86

_rollBack

Method Details
(string) getQuoteIdentifierSymbol()

Parameter Summary
Get the symbol used for identifier quoting

_commit()

Parameter Summary
Commit a transaction.

_setExecuteMode($mode)

Parameter Summary
Set the current execution mode

setFetchMode($mode)

Parameter Summary
Set the fetch mode.

(int) _getExecuteMode()

Parameter Summary
Get the current execution mode
<strong>returns</strong> the execution mode (DB2_AUTOCOMMIT_ON or
DB2_AUTOCOMMIT_OFF)

__construct($config)

Parameter Summary

$config An array of configuration keys.

$config is an array of key/value pairs containing configuration options. These


options are common to most adapters:
dbname =&gt; (string) The name of the database to user username =&gt; (string) Connect to
the database as this username. password =&gt; (string) Password associated with the
username. host =&gt; (string) What host to conne

----------------- Brought to you by


Doctrine_Adapter_Db2 87

(Doctrine_Statement_Db2) prepare($sql)

Parameter Summary

$sql The SQL statement with placeholders.

Prepare a sql statement and return it

closeConnection()

Parameter Summary
Close the connection resource

_connect()

Parameter Summary
Creates the connection resource

(string) _quote($value)

Parameter Summary

$value Raw string

Quote a raw string.


<strong>returns</strong> Quoted string

_beginTransaction()

Parameter Summary
Begin a transaction.

_rollBack()

Parameter Summary
Rollback a transaction.

----------------- Brought to you by


Doctrine_Adapter_Interface 88

Doctrine_Adapter_Interface

Method Summary
Returns Name Description
exec
commit
beginTransaction
errorInfo
rollBack
lastInsertId
query
errorCode
quote
prepare

Method Details
exec($statement)

Parameter Summary

commit()

Parameter Summary

beginTransaction()

Parameter Summary

errorInfo()

Parameter Summary

----------------- Brought to you by


Doctrine_Adapter_Mock 89

rollBack()

Parameter Summary

lastInsertId()

Parameter Summary

query($queryString)

Parameter Summary

errorCode()

Parameter Summary

quote($input)

Parameter Summary

prepare($prepareString)

Parameter Summary

Doctrine_Adapter_Mock

Method Summary
Returns Name Description
string pop
exec
string getName
array getAll
commit
beginTransaction
errorInfo

----------------- Brought to you by


Doctrine_Adapter_Mock 90

rollBack
integer lastInsertId
addQuery
query
errorCode
string quote
sqliteCreateFunction
__construct
Listing
0-2

getAttribute
integer count
prepare
forceLastInsertIdFail
forceException
setAttribute

Method Details
(string) pop()

Parameter Summary
Pop the last executed query from the array of executed queries and return it
<strong>returns</strong> Last executed sql string

exec($statement)

Parameter Summary
Execute a raw sql statement

(string) getName()

Parameter Summary
Get the name of the dbms used in this instance of the mock adapter
<strong>returns</strong> Name of the dbms

(array) getAll()

Parameter Summary
Get all the executed queries

----------------- Brought to you by


Doctrine_Adapter_Mock 91

<strong>returns</strong> Array of all executed queries

commit()

Parameter Summary
Commit a transaction

beginTransaction()

Parameter Summary
Begin a transaction

errorInfo()

Parameter Summary

rollBack()

Parameter Summary
Rollback a transaction

(integer) lastInsertId()

Parameter Summary
Get the id of the last inserted record

addQuery($query)

Parameter Summary
Add query to the stack of executed queries

query($query)

Parameter Summary
Fake the execution of query and add it to the stack of executed queries

errorCode()

Parameter Summary

----------------- Brought to you by


Doctrine_Adapter_Mock 92

(string) quote($input)

Parameter Summary
Quote a value for the dbms

sqliteCreateFunction()

Parameter Summary

__construct($name = null)

Parameter Summary
Doctrine mock adapter constructor
<pre><code> <![CDATA[ $conn = new Doctrine_Adapter_Mock('mysql');]]> </code></pre>

getAttribute($attribute)

Parameter Summary

(integer) count()

Parameter Summary
Get the number of queries executed

prepare($query)

Parameter Summary

$query Query to prepare

Prepare a query statement


<strong>returns</strong> Mock prepared statement

forceLastInsertIdFail($fail = true)

Parameter Summary
Force last insert to be failed

forceException($name, $message = '', $code)

Parameter Summary

$name Name of exception

----------------- Brought to you by


Doctrine_Adapter_Mysqli 93

$message Message for the exception

$code Code of the exception

Force an exception in to the array of exceptions

setAttribute($attribute, $value)

Parameter Summary

Doctrine_Adapter_Mysqli

Method Summary
Returns Name Description
_commit
integer lastInsertId Gets the last ID generated automatically by
an IDENTITY/AUTOINCREMENT column.
As a convention, on RDBMS brands that
support sequences (e.g. Oracle,
PostgreSQL, DB2), this method forms the
name of a sequence from the arguments
and returns the last id gen
Doctrine_Statement_Mysqli prepare
closeConnection
_connect
_beginTransaction
_rollBack

Method Details
_commit()

Parameter Summary
Commit a transaction.

----------------- Brought to you by


Doctrine_Adapter_Mysqli 94

(integer) lastInsertId($tableName = null, $primaryKey = null)

Parameter Summary

$tableName OPTIONAL Name of table.

$primaryKey OPTIONAL Name of primary key column.

Gets the last ID generated automatically by an IDENTITY/AUTOINCREMENT column. As a


convention, on RDBMS brands that support sequences (e.g. Oracle, PostgreSQL, DB2), this
method forms the name of a sequence from the arguments and returns the last id gen

(Doctrine_Statement_Mysqli) prepare($sql)

Parameter Summary

$sql SQL query

Prepare a statement and return a PDOStatement-like object.

closeConnection()

Parameter Summary
Force the connection to close.

_connect()

Parameter Summary
Creates a connection to the database.
<strong>throws</strong> Doctrine_Adapter_Exception

_beginTransaction()

Parameter Summary
Begin a transaction.

_rollBack()

Parameter Summary
Roll-back a transaction.

----------------- Brought to you by


Doctrine_Adapter_Oracle 95

Doctrine_Adapter_Oracle

Method Summary
Returns Name Description
exec
commit
boolean beginTransaction
errorInfo
boolean rollBack
integer lastInsertId
query
errorCode
string quote
__construct
'db','username'=>'usr','password'=>'pass'));]]> Listing
0-3

mixed getAttribute
prepare
resource getConnection
boolean setAttribute

Method Details
exec($statement)

Parameter Summary
Execute a raw sql statement

commit()

Parameter Summary

----------------- Brought to you by


Doctrine_Adapter_Oracle 96

Commit a transaction

(boolean) beginTransaction()

Parameter Summary
Begin a transaction

errorInfo()

Parameter Summary

(boolean) rollBack()

Parameter Summary
Rollback a transaction

(integer) lastInsertId()

Parameter Summary
Get the id of the last inserted record

query($query)

Parameter Summary
Execute query and return results as statement object

errorCode()

Parameter Summary

(string) quote($input)

Parameter Summary
Quote a value for the dbms

__construct($config = array(), $name)

Parameter Summary
Doctrine Oracle adapter constructor
<pre><code> <![CDATA[ $conn = new
Doctrine_Adapter_Oracle(array('dbname'=>'db','username'=>'usr','password'=>'pass'));]]>
</code></pre>

----------------- Brought to you by


Doctrine_Adapter_Statement 97

(mixed) getAttribute($attribute)

Parameter Summary
Retrieve a statement attribute
<strong>returns</strong> the attribute value

prepare($query)

Parameter Summary

$query Query to prepare

Prepare a query statement


<strong>returns</strong> prepared statement

(resource) getConnection()

Parameter Summary
Returns established OCI connection handler
<strong>returns</strong> OCI connection handler

(boolean) setAttribute($attribute, $value)

Parameter Summary

$value the value of given attribute

Set connection attribute


<strong>returns</strong> Returns TRUE on success or FALSE on failure.

Doctrine_Adapter_Statement

Method Summary
Returns Name Description
rowCount

----------------- Brought to you by


Doctrine_Adapter_Statement 98

errorInfo
setFetchMode
errorCode
mixed fetch
columnCount
execute
bindValue
nextRowset

Method Details
rowCount()

Parameter Summary

errorInfo()

Parameter Summary

setFetchMode($mode)

Parameter Summary

errorCode()

Parameter Summary

(mixed) fetch($fetchStyle, $cursorOrientation, $cursorOffset)

Parameter Summary

$fetchStyle Controls how the next row will be returned to the caller. This value
must be one of the Doctrine::FETCH_* constants, defaulting to
Doctrine::FETCH_BOTH
$cursorOrientation For a PDOStatement object representing a scrollable cursor, this value
determines which row will be returned to the caller. This value must be
one of the Doctrine::FETCH_ORI_* constants, defaultin
$cursorOffset <p> For a Doctrine_Adapter_Statement_Interface object representing a
scrollable cursor for which the $cursorOrientation parameter is set to
Doctrine::FETCH_ORI_ABS, this value specifies

----------------- Brought to you by


Doctrine_Adapter_Statement_Interface 99

columnCount()

Parameter Summary

execute()

Parameter Summary
execute()

bindValue($no, $value)

Parameter Summary

nextRowset()

Parameter Summary
nextRowSet

Doctrine_Adapter_Statement_Interface

Method Summary
Returns Name Description
integer rowCount If the last SQL statement executed by the associated Statement
object was a SELECT statement, some databases may return the
number of rows returned by that statement. However, this
behaviour is not guaranteed for all databases and should not be
relied
boolean closeCursor
string fetchColumn
array errorInfo
mixed fetchObject Fetches the next row and returns it as an object. This function is
an alternative to Doctrine_Adapter_Statement_Interface->fetch()
with Doctrine::FETCH_CLASS or Doctrine::FETCH_OBJ style.
boolean setFetchMode
string errorCode

----------------- Brought to you by


Doctrine_Adapter_Statement_Interface 100

mixed fetch
integer columnCount
boolean bindColumn
boolean bindParam Most parameters are input parameters, that is, parameters that
are used in a read-only fashion to build up the query. Some
drivers support the invocation of stored procedures that return
data as output parameters, and some also as input/output
paramete
mixed getAttribute
boolean execute If the prepared statement included parameter markers, you must
either: call PDOStatement->bindParam() to bind PHP variables
to the parameter markers: bound variables pass their value as
input and receive the output value, if any, of their associated
array getColumnMeta
boolean bindValue
boolean nextRowset Some database servers support stored procedures that return
more than one rowset (also known as a result set). The
nextRowset() method enables you to access the second and
subsequent rowsets associated with a PDOStatement object.
Each rowset can have a
array fetchAll
boolean setAttribute

Method Details
(integer) rowCount()

Parameter Summary
rowCount() returns the number of rows affected by the last DELETE, INSERT, or
UPDATE statement executed by the corresponding object.
If the last SQL statement executed by the associated Statement object was a SELECT
statement, some databases may return the number of rows returned by that statement.
However, this behaviour is not guaranteed for all databases and should not be relied
<strong>returns</strong> Returns the number of rows.

(boolean) closeCursor()

Parameter Summary
Closes the cursor, enabling the statement to be executed again.
<strong>returns</strong> Returns TRUE on success or FALSE on failure.

----------------- Brought to you by


Doctrine_Adapter_Statement_Interface 101

(string) fetchColumn($columnIndex)

Parameter Summary

$columnIndex 0-indexed number of the column you wish to retrieve from the row. If no
value is supplied, Doctrine_Adapter_Statement_Interface-&gt;fetchColumn()
fetches the first column.

Returns a single column from the next row of a result set or FALSE if there are no
more rows.
<strong>returns</strong> returns a single column in the next row of a result set.

(array) errorInfo()

Parameter Summary
Fetch extended error information associated with the last operation on the
statement handle
<strong>returns</strong> error info array

(mixed) fetchObject($className = 'stdClass', $args = array())

Parameter Summary

$className Name of the created class, defaults to stdClass.

$args Elements of this array are passed to the constructor.

Fetches the next row and returns it as an object.


Fetches the next row and returns it as an object. This function is an alternative to
Doctrine_Adapter_Statement_Interface-&gt;fetch() with Doctrine::FETCH_CLASS or
Doctrine::FETCH_OBJ style.
<strong>returns</strong> an instance of the required class with property names that
correspond to the column names or FALSE in case of an error.

(boolean) setFetchMode($mode, $arg1 = null, $arg2 = null)

Parameter Summary

$mode The fetch mode must be one of the Doctrine::FETCH_* constants.

Set the default fetch mode for this statement


<strong>returns</strong> Returns 1 on success or FALSE on failure.

(string) errorCode()

Parameter Summary
Fetch the SQLSTATE associated with the last operation on the statement handle

----------------- Brought to you by


Doctrine_Adapter_Statement_Interface 102

<strong>returns</strong> error code string

(mixed) fetch($fetchStyle = Doctrine::FETCH_BOTH, $cursorOrientation


= Doctrine::FETCH_ORI_NEXT, $cursorOffset = null)

Parameter Summary

$fetchStyle Controls how the next row will be returned to the caller. This value
must be one of the Doctrine::FETCH_* constants, defaulting to
Doctrine::FETCH_BOTH
$cursorOrientation For a PDOStatement object representing a scrollable cursor, this value
determines which row will be returned to the caller. This value must be
one of the Doctrine::FETCH_ORI_* constants, defaultin
$cursorOffset <p> For a Doctrine_Adapter_Statement_Interface object representing a
scrollable cursor for which the $cursorOrientation parameter is set to
Doctrine::FETCH_ORI_ABS, this value specifies

(integer) columnCount()

Parameter Summary
Returns the number of columns in the result set
<strong>returns</strong> Returns the number of columns in the result set represented by
the Doctrine_Adapter_Statement_Interface object. If there is no result set, this method should
return 0.

(boolean) bindColumn($column, $param, $type = null)

Parameter Summary

$column Number of the column (1-indexed) or name of the column in the result set. If using
the column name, be aware that the name should match the case of the column, as
returned by the driver.
$param Name of the PHP variable to which the column will be bound.
$type Data type of the parameter, specified by the Doctrine::PARAM_* constants.

Bind a column to a PHP variable


<strong>returns</strong> Returns TRUE on success or FALSE on failure

----------------- Brought to you by


Doctrine_Adapter_Statement_Interface 103

(boolean) bindParam($column, [[[amp]]]$variable, $type = null, $length


= null, $driverOptions = array(), $param, $variable)

Parameter Summary

$type Explicit data type for the parameter using the Doctrine::PARAM_* constants. To
return an INOUT parameter from a stored procedure, use the bitwise OR
operator to set the Doctrine::PARAM_INPUT_OUTPUT bits f
$length Length of the data type. To indicate that a parameter is an OUT parameter from a
stored procedure, you must explicitly set the length.
$param Parameter identifier. For a prepared statement using named placeholders, this
will be a parameter name of the form :name. For a prepared statement using
question mark placeholders, this will be the 1-inde
$variable Name of the PHP variable to bind to the SQL statement parameter.

Binds a PHP variable to a corresponding named or question mark placeholder in the


SQL statement that was use to prepare the statement. Unlike
Doctrine_Adapter_Statement_Interface->bindValue(), the variable is bound as a
reference and wil
Most parameters are input parameters, that is, parameters that are used in a read-only
fashion to build up the query. Some drivers support the invocation of stored procedures that
return data as output parameters, and some also as input/output paramete
<strong>returns</strong> Returns TRUE on success or FALSE on failure.

(mixed) getAttribute($attribute)

Parameter Summary
Retrieve a statement attribute
<strong>returns</strong> the attribute value

(boolean) execute($params = null)

Parameter Summary

$params An array of values with as many elements as there are bound parameters in the
SQL statement being executed.

Executes a prepared statement


If the prepared statement included parameter markers, you must either: call
PDOStatement-&gt;bindParam() to bind PHP variables to the parameter markers: bound
variables pass their value as input and receive the output value, if any, of their associated
<strong>returns</strong> Returns TRUE on success or FALSE on failure.

----------------- Brought to you by


Doctrine_Adapter_Statement_Interface 104

(array) getColumnMeta($column)

Parameter Summary

$column The 0-indexed column in the result set.

Returns metadata for a column in a result set


<strong>returns</strong> <p>Associative meta data array with the following
structure:</p> <p>native_type The PHP native type used to represent the column value.
driver:decl_ type The SQL type used to represen

(boolean) bindValue($param, $value, $type = null)

Parameter Summary

$param Parameter identifier. For a prepared statement using named placeholders, this will
be a parameter name of the form :name. For a prepared statement using question
mark placeholders, this will be the 1-inde
$value The value to bind to the parameter.
$type Explicit data type for the parameter using the Doctrine::PARAM_* constants.

Binds a value to a corresponding named or question mark placeholder in the SQL


statement that was use to prepare the statement.
<strong>returns</strong> Returns TRUE on success or FALSE on failure.

(boolean) nextRowset()

Parameter Summary
Advances to the next rowset in a multi-rowset statement handle
Some database servers support stored procedures that return more than one rowset (also
known as a result set). The nextRowset() method enables you to access the second and
subsequent rowsets associated with a PDOStatement object. Each rowset can have a
<strong>returns</strong> Returns TRUE on success or FALSE on failure.

(array) fetchAll($fetchStyle = Doctrine::FETCH_BOTH, $columnIndex)

Parameter Summary

$fetchStyle Controls how the next row will be returned to the caller. This value must be
one of the Doctrine::FETCH_* constants, defaulting to
Doctrine::FETCH_BOTH
$columnIndex Returns the indicated 0-indexed column when the value of $fetchStyle is
Doctrine::FETCH_COLUMN. Defaults to 0.

Returns an array containing all of the result set rows

----------------- Brought to you by


Doctrine_Adapter_Statement_Mock 105

(boolean) setAttribute($attribute, $value)

Parameter Summary

$value the value of given attribute

Set a statement attribute


<strong>returns</strong> Returns TRUE on success or FALSE on failure.

Doctrine_Adapter_Statement_Mock

Method Summary
Returns Name Description
integer rowCount rowCount() returns the number of rows affected by the last
DELETE, INSERT, or UPDATE statement executed by the
corresponding object. If the last SQL statement executed by the
associated Statement object was a SELECT statement, some
databases may return
boolean closeCursor Closes the cursor, enabling the statement to be executed again.
string fetchColumn Returns a single column from the next row of a result set or
FALSE if there are no more rows.
array errorInfo Fetch extended error information associated with the last
operation on the statement handle
mixed fetchObject Fetches the next row and returns it as an object. Fetches the
next row and returns it as an object. This function is an
alternative to Doctrine_Adapter_Statement_Interface->fetch()
with Doctrine::FETCH_CLASS or Doctrine::FETCH_OBJ style.
boolean setFetchMode Set the default fetch mode for this statement
string errorCode Fetch the SQLSTATE associated with the last operation on the
statement handle
mixed fetch
integer columnCount Returns the number of columns in the result set
boolean bindColumn Bind a column to a PHP variable

----------------- Brought to you by


Doctrine_Adapter_Statement_Mock 106

boolean bindParam Binds a PHP variable to a corresponding named or question


mark placeholder in the SQL statement that was use to prepare
the statement. Unlike Doctrine_Adapter_Statement_Interface-
>bindValue(), the variable is bound as a reference and will only
be eva
__construct
mixed getAttribute Retrieve a statement attribute
boolean execute Executes a prepared statement If the prepared statement
included parameter markers, you must either: call
PDOStatement->bindParam() to bind PHP variables to the
parameter markers: bound variables pass their value as input
and receive the output value
array getColumnMeta Returns metadata for a column in a result set

boolean bindValue Binds a value to a corresponding named or question mark


placeholder in the SQL statement that was use to prepare the
statement.
boolean nextRowset Advances to the next rowset in a multi-rowset statement handle
Some database servers support stored procedures that return
more than one rowset (also known as a result set). The
nextRowset() method enables you to access the second and
subsequent rowsets
array fetchAll Returns an array containing all of the result set rows
boolean setAttribute Set a statement attribute

Method Details
(integer) rowCount()

Parameter Summary
rowCount() returns the number of rows affected by the last DELETE, INSERT, or UPDATE
statement executed by the corresponding object. If the last SQL statement executed by the
associated Statement object was a SELECT statement, some databases may return
<strong>returns</strong> Returns the number of rows.

(boolean) closeCursor()

Parameter Summary
Closes the cursor, enabling the statement to be executed again.
<strong>returns</strong> Returns TRUE on success or FALSE on failure.

----------------- Brought to you by


Doctrine_Adapter_Statement_Mock 107

(string) fetchColumn($columnIndex)

Parameter Summary

$columnIndex 0-indexed number of the column you wish to retrieve from the row. If no
value is supplied, Doctrine_Adapter_Statement_Interface-&gt;fetchColumn()
fetches the first column.

Returns a single column from the next row of a result set or FALSE if there are no more rows.
<strong>returns</strong> returns a single column in the next row of a result set.

(array) errorInfo()

Parameter Summary
Fetch extended error information associated with the last operation on the statement handle
<strong>returns</strong> error info array

(mixed) fetchObject($className = 'stdClass', $args = array())

Parameter Summary

$className Name of the created class, defaults to stdClass.

$args Elements of this array are passed to the constructor.

Fetches the next row and returns it as an object. Fetches the next row and returns it as an
object. This function is an alternative to Doctrine_Adapter_Statement_Interface-&gt;fetch()
with Doctrine::FETCH_CLASS or Doctrine::FETCH_OBJ style.
<strong>returns</strong> an instance of the required class with property names that
correspond to the column names or FALSE in case of an error.

(boolean) setFetchMode($mode, $arg1 = null, $arg2 = null)

Parameter Summary

$mode The fetch mode must be one of the Doctrine::FETCH_* constants.

Set the default fetch mode for this statement


<strong>returns</strong> Returns 1 on success or FALSE on failure.

(string) errorCode()

Parameter Summary
Fetch the SQLSTATE associated with the last operation on the statement handle
<strong>returns</strong> error code string

----------------- Brought to you by


Doctrine_Adapter_Statement_Mock 108

(mixed) fetch($fetchStyle = Doctrine::FETCH_BOTH, $cursorOrientation


= Doctrine::FETCH_ORI_NEXT, $cursorOffset = null)

Parameter Summary

$fetchStyle Controls how the next row will be returned to the caller. This value
must be one of the Doctrine::FETCH_* constants, defaulting to
Doctrine::FETCH_BOTH
$cursorOrientation For a PDOStatement object representing a scrollable cursor, this value
determines which row will be returned to the caller. This value must be
one of the Doctrine::FETCH_ORI_* constants, defaultin
$cursorOffset <p> For a Doctrine_Adapter_Statement_Interface object representing a
scrollable cursor for which the $cursorOrientation parameter is set to
Doctrine::FETCH_ORI_ABS, this value specifies

(integer) columnCount()

Parameter Summary
Returns the number of columns in the result set
<strong>returns</strong> Returns the number of columns in the result set represented by
the Doctrine_Adapter_Statement_Interface object. If there is no result set, this method should
return 0.

(boolean) bindColumn($column, $param, $type = null)

Parameter Summary

$column Number of the column (1-indexed) or name of the column in the result set. If using
the column name, be aware that the name should match the case of the column, as
returned by the driver.
$param Name of the PHP variable to which the column will be bound.
$type Data type of the parameter, specified by the Doctrine::PARAM_* constants.

Bind a column to a PHP variable


<strong>returns</strong> Returns TRUE on success or FALSE on failure

(boolean) bindParam($column, [[[amp]]]$variable, $type = null, $length


= null, $driverOptions = array(), $param, $variable)

Parameter Summary

$type Explicit data type for the parameter using the Doctrine::PARAM_* constants. To
return an INOUT parameter from a stored procedure, use the bitwise OR
operator to set the Doctrine::PARAM_INPUT_OUTPUT bits f

----------------- Brought to you by


Doctrine_Adapter_Statement_Mock 109

$length Length of the data type. To indicate that a parameter is an OUT parameter from a
stored procedure, you must explicitly set the length.
$param Parameter identifier. For a prepared statement using named placeholders, this
will be a parameter name of the form :name. For a prepared statement using
question mark placeholders, this will be the 1-inde
$variable Name of the PHP variable to bind to the SQL statement parameter.

Binds a PHP variable to a corresponding named or question mark placeholder in the SQL
statement that was use to prepare the statement. Unlike
Doctrine_Adapter_Statement_Interface-&gt;bindValue(), the variable is bound as a reference
and will only be eva
<strong>returns</strong> Returns TRUE on success or FALSE on failure.

__construct((Doctrine_Adapter_Mock) $mock)

Parameter Summary
Constructor for mock adapter statements. Accepts instance of
Doctrine_Adapter_Mock

(mixed) getAttribute($attribute)

Parameter Summary
Retrieve a statement attribute
<strong>returns</strong> the attribute value

(boolean) execute($params = null)

Parameter Summary

$params An array of values with as many elements as there are bound parameters in the
SQL statement being executed.

Executes a prepared statement If the prepared statement included parameter markers, you
must either: call PDOStatement-&gt;bindParam() to bind PHP variables to the parameter
markers: bound variables pass their value as input and receive the output value
<strong>returns</strong> Returns TRUE on success or FALSE on failure.

(array) getColumnMeta($column)

Parameter Summary

$column The 0-indexed column in the result set.

Returns metadata for a column in a result set

----------------- Brought to you by


Doctrine_Adapter_Statement_Mock 110

<strong>returns</strong> <p>Associative meta data array with the following


structure:</p> <p>native_type The PHP native type used to represent the column value.
driver:decl_ type The SQL type used to represen

(boolean) bindValue($param, $value, $type = null)

Parameter Summary

$param Parameter identifier. For a prepared statement using named placeholders, this will
be a parameter name of the form :name. For a prepared statement using question
mark placeholders, this will be the 1-inde
$value The value to bind to the parameter.
$type Explicit data type for the parameter using the Doctrine::PARAM_* constants.

Binds a value to a corresponding named or question mark placeholder in the SQL statement
that was use to prepare the statement.
<strong>returns</strong> Returns TRUE on success or FALSE on failure.

(boolean) nextRowset()

Parameter Summary
Advances to the next rowset in a multi-rowset statement handle Some database servers
support stored procedures that return more than one rowset (also known as a result set). The
nextRowset() method enables you to access the second and subsequent rowsets
<strong>returns</strong> Returns TRUE on success or FALSE on failure.

(array) fetchAll($fetchMode = Doctrine::FETCH_BOTH, $fetchStyle,


$columnIndex)

Parameter Summary

$fetchStyle Controls how the next row will be returned to the caller. This value must be
one of the Doctrine::FETCH_* constants, defaulting to
Doctrine::FETCH_BOTH
$columnIndex Returns the indicated 0-indexed column when the value of $fetchStyle is
Doctrine::FETCH_COLUMN. Defaults to 0.

Returns an array containing all of the result set rows

(boolean) setAttribute($attribute, $value)

Parameter Summary

$value the value of given attribute

Set a statement attribute

----------------- Brought to you by


Doctrine_Adapter_Statement_Oracle 111

<strong>returns</strong> Returns TRUE on success or FALSE on failure.

Doctrine_Adapter_Statement_Oracle

Method Summary
Returns Name Description
integer rowCount If the last SQL statement executed by the associated Statement
object was a SELECT statement, some databases may return the
number of rows returned by that statement. However, this
behaviour is not guaranteed for all databases and should not be
relied
boolean closeCursor
string fetchColumn
array errorInfo
mixed fetchObject Fetches the next row and returns it as an object. This function is
an alternative to Doctrine_Adapter_Statement_Interface->fetch()
with Doctrine::FETCH_CLASS or Doctrine::FETCH_OBJ style.
boolean setFetchMode
string errorCode
mixed fetch
integer columnCount
boolean bindColumn
boolean bindParam Most parameters are input parameters, that is, parameters that
are used in a read-only fashion to build up the query. Some
drivers support the invocation of stored procedures that return
data as output parameters, and some also as input/output
paramete
__construct
mixed getAttribute
boolean execute If the prepared statement included parameter markers, you must
either: call PDOStatement->bindParam() to bind PHP variables
to the parameter markers: bound variables pass their value as
input and receive the output value, if any, of their associated
array getColumnMeta
boolean bindValue

----------------- Brought to you by


Doctrine_Adapter_Statement_Oracle 112

boolean nextRowset Some database servers support stored procedures that return
more than one rowset (also known as a result set). The
nextRowset() method enables you to access the second and
subsequent rowsets associated with a PDOStatement object.
Each rowset can have a
array fetchAll
boolean setAttribute

Method Details
(integer) rowCount()

Parameter Summary
rowCount() returns the number of rows affected by the last DELETE, INSERT, or
UPDATE statement executed by the corresponding object.
If the last SQL statement executed by the associated Statement object was a SELECT
statement, some databases may return the number of rows returned by that statement.
However, this behaviour is not guaranteed for all databases and should not be relied
<strong>returns</strong> Returns the number of rows.

(boolean) closeCursor()

Parameter Summary
Closes the cursor, enabling the statement to be executed again.
<strong>returns</strong> Returns TRUE on success or FALSE on failure.

(string) fetchColumn($columnIndex)

Parameter Summary

$columnIndex 0-indexed number of the column you wish to retrieve from the row. If no
value is supplied, Doctrine_Adapter_Statement_Interface-&gt;fetchColumn()
fetches the first column.

Returns a single column from the next row of a result set or FALSE if there are no
more rows.
<strong>returns</strong> returns a single column in the next row of a result set.

(array) errorInfo()

Parameter Summary
Fetch extended error information associated with the last operation on the
statement handle
<strong>returns</strong> error info array

----------------- Brought to you by


Doctrine_Adapter_Statement_Oracle 113

(mixed) fetchObject($className = 'stdClass', $args = array())

Parameter Summary

$className Name of the created class, defaults to stdClass.

$args Elements of this array are passed to the constructor.

Fetches the next row and returns it as an object.


Fetches the next row and returns it as an object. This function is an alternative to
Doctrine_Adapter_Statement_Interface-&gt;fetch() with Doctrine::FETCH_CLASS or
Doctrine::FETCH_OBJ style.
<strong>returns</strong> an instance of the required class with property names that
correspond to the column names or FALSE in case of an error.

(boolean) setFetchMode($mode, $arg1 = null, $arg2 = null)

Parameter Summary

$mode The fetch mode must be one of the Doctrine::FETCH_* constants.

Set the default fetch mode for this statement


<strong>returns</strong> Returns 1 on success or FALSE on failure.

(string) errorCode()

Parameter Summary
Fetch the SQLSTATE associated with the last operation on the statement handle
<strong>returns</strong> error code string

(mixed) fetch($fetchStyle = Doctrine::FETCH_BOTH, $cursorOrientation


= Doctrine::FETCH_ORI_NEXT, $cursorOffset = null)

Parameter Summary

$fetchStyle Controls how the next row will be returned to the caller. This value
must be one of the Doctrine::FETCH_* constants, defaulting to
Doctrine::FETCH_BOTH
$cursorOrientation For a PDOStatement object representing a scrollable cursor, this value
determines which row will be returned to the caller. This value must be
one of the Doctrine::FETCH_ORI_* constants, defaultin
$cursorOffset <p> For a Doctrine_Adapter_Statement_Interface object representing a
scrollable cursor for which the $cursorOrientation parameter is set to
Doctrine::FETCH_ORI_ABS, this value specifies

----------------- Brought to you by


Doctrine_Adapter_Statement_Oracle 114

(integer) columnCount()

Parameter Summary
Returns the number of columns in the result set
<strong>returns</strong> Returns the number of columns in the result set represented by
the Doctrine_Adapter_Statement_Interface object. If there is no result set, this method should
return 0.

(boolean) bindColumn($column, $param, $type = null)

Parameter Summary

$column Number of the column (1-indexed) or name of the column in the result set. If using
the column name, be aware that the name should match the case of the column, as
returned by the driver.
$param Name of the PHP variable to which the column will be bound.
$type Data type of the parameter, specified by the Doctrine::PARAM_* constants.

Bind a column to a PHP variable


<strong>returns</strong> Returns TRUE on success or FALSE on failure

(boolean) bindParam($column, [[[amp]]]$variable, $type = null, $length


= null, $driverOptions = array(), $param, $variable)

Parameter Summary

$type Explicit data type for the parameter using the Doctrine::PARAM_* constants. To
return an INOUT parameter from a stored procedure, use the bitwise OR
operator to set the Doctrine::PARAM_INPUT_OUTPUT bits f
$length Length of the data type. To indicate that a parameter is an OUT parameter from a
stored procedure, you must explicitly set the length.
$param Parameter identifier. For a prepared statement using named placeholders, this
will be a parameter name of the form :name. For a prepared statement using
question mark placeholders, this will be the 1-inde
$variable Name of the PHP variable to bind to the SQL statement parameter.

Binds a PHP variable to a corresponding named or question mark placeholder in the


SQL statement that was use to prepare the statement. Unlike
Doctrine_Adapter_Statement_Interface->bindValue(), the variable is bound as a
reference and wil
Most parameters are input parameters, that is, parameters that are used in a read-only
fashion to build up the query. Some drivers support the invocation of stored procedures that
return data as output parameters, and some also as input/output paramete
<strong>returns</strong> Returns TRUE on success or FALSE on failure.

----------------- Brought to you by


Doctrine_Adapter_Statement_Oracle 115

__construct(( ) $connection, $query, $executeMode)

Parameter Summary

$query Query string to be executed


$executeMode OCI execute mode

the constructor

(mixed) getAttribute($attribute)

Parameter Summary
Retrieve a statement attribute
<strong>returns</strong> the attribute value

(boolean) execute($params = null)

Parameter Summary

$params An array of values with as many elements as there are bound parameters in the
SQL statement being executed.

Executes a prepared statement


If the prepared statement included parameter markers, you must either: call
PDOStatement-&gt;bindParam() to bind PHP variables to the parameter markers: bound
variables pass their value as input and receive the output value, if any, of their associated
<strong>returns</strong> Returns TRUE on success or FALSE on failure.

(array) getColumnMeta($column)

Parameter Summary

$column The 0-indexed column in the result set.

Returns metadata for a column in a result set


<strong>returns</strong> <p>Associative meta data array with the following
structure:</p> <p>native_type The PHP native type used to represent the column value.
driver:decl_ type The SQL type used to represen

(boolean) bindValue($param, $value, $type = null)

Parameter Summary

$param Parameter identifier. For a prepared statement using named placeholders, this will
be a parameter name of the form :name. For a prepared statement using question
mark placeholders, this will be the 1-inde

----------------- Brought to you by


Doctrine_Adapter_Statement_Oracle 116

$value The value to bind to the parameter.


$type Explicit data type for the parameter using the Doctrine::PARAM_* constants.

Binds a value to a corresponding named or question mark placeholder in the SQL


statement that was use to prepare the statement.
<strong>returns</strong> Returns TRUE on success or FALSE on failure.

(boolean) nextRowset()

Parameter Summary
Advances to the next rowset in a multi-rowset statement handle
Some database servers support stored procedures that return more than one rowset (also
known as a result set). The nextRowset() method enables you to access the second and
subsequent rowsets associated with a PDOStatement object. Each rowset can have a
<strong>returns</strong> Returns TRUE on success or FALSE on failure.

(array) fetchAll($fetchStyle = Doctrine::FETCH_BOTH, $colnum,


$columnIndex)

Parameter Summary

$fetchStyle Controls how the next row will be returned to the caller. This value must be
one of the Doctrine::FETCH_* constants, defaulting to
Doctrine::FETCH_BOTH
$columnIndex Returns the indicated 0-indexed column when the value of $fetchStyle is
Doctrine::FETCH_COLUMN. Defaults to 0.

Returns an array containing all of the result set rows

(boolean) setAttribute($attribute, $value)

Parameter Summary

$value the value of given attribute

Set a statement attribute


<strong>returns</strong> Returns TRUE on success or FALSE on failure.

----------------- Brought to you by


Doctrine_AuditLog 117

Doctrine_AuditLog

Method Summary
Returns Name Description
setTableDefinition
__construct
array getVersion
Integer getMaxVersion

Method Details
setTableDefinition()

Parameter Summary
Set the table definition for the audit log table

__construct($options = array())

Parameter Summary

$options An array of options

Accepts array of options to configure the AuditLog

(array) getVersion(( ) $record, $version)

Parameter Summary
Get array of information for the passed record and the specified version
<strong>returns</strong> An array with version information

(Integer) getMaxVersion(( ) $record)

Parameter Summary

----------------- Brought to you by


Doctrine_AuditLog_Listener 118

Get the max version number for a given Doctrine_Record

Doctrine_AuditLog_Listener

Method Summary
Returns Name Description
preDelete
integer _getNextVersion
preInsert
__construct
postInsert
preUpdate

Method Details
preDelete(( ) $event)

Parameter Summary
Pre delete event hook deletes all related versions This will only delete version
records if the auditLog is enabled

(integer) _getNextVersion(( ) $record)

Parameter Summary
Get the next version number for the audit log

preInsert(( ) $event)

Parameter Summary
Pre insert event hook for incrementing version number

----------------- Brought to you by


Doctrine_Builder 119

__construct(( ) $auditLog)

Parameter Summary
Instantiate AuditLog listener and set the Doctrine_AuditLog instance to the class

postInsert(( ) $event)

Parameter Summary
Post insert event hook which creates the new version record This will only insert a
version record if the auditLog is enabled

preUpdate(( ) $event)

Parameter Summary
Pre update event hook for inserting new version record This will only insert a version
record if the auditLog is enabled

Doctrine_Builder

Method Summary
Returns Name Description
varExport

Method Details
varExport($var)

Parameter Summary
Special function for var_export() The normal code which is returned is malformed
and does not follow Doctrine standards So we do some string replacing to clean it up

----------------- Brought to you by


Doctrine_Cache 120

Doctrine_Cache

Method Summary
Returns Name Description
mixed getOption
string pop
boolean isSuccessful
array getAll
add
appendStats
clean
array preFetch advances the internal pointer of cached data and returns the
current element
getDriver
__construct
array preFetchAll returns the current cache data array

integer count
boolean preQuery adds the issued query to internal query stack and checks if
cached element exists
boolean setOption
ArrayIterator getIterator
boolean preExecute adds the issued query to internal query stack and checks if
cached element exists
reset
array readStats

----------------- Brought to you by


Doctrine_Cache 121

Method Details
(mixed) getOption($option)

Parameter Summary

$option the option name

Get value of option name


<strong>returns</strong> option value

(string) pop()

Parameter Summary
Pops a query from the stack

(boolean) isSuccessful()

Parameter Summary
Check whether or not the last cache opration was successful or not
<strong>returns</strong> whether or not the last cache operation was successful

(array) getAll($namespace = null)

Parameter Summary

$namespace optional query namespace

Get array of all executed queries


<strong>returns</strong> an array of sql query strings

add((string|array) $query, $namespace = null)

Parameter Summary

$query sql query string


$namespace connection namespace

Adds a query to internal query stack

appendStats()

Parameter Summary
Append all queries to stats file

----------------- Brought to you by


Doctrine_Cache 122

clean()

Parameter Summary
Delete all cache

(array) preFetch(( ) $event)

Parameter Summary
Listens the preFetch event of Doctrine_Connection_Statement
advances the internal pointer of cached data and returns the current element

getDriver()

Parameter Summary
Get the current cache driver instance

__construct((Doctrine_Cache_Interface|string) $driver, $options =


array())

Parameter Summary

$driver cache driver name or a driver object


$options cache driver options

constructor

(array) preFetchAll(( ) $event)

Parameter Summary
Listens the preFetchAll event of Doctrine_Connection_Statement
returns the current cache data array

(integer) count()

Parameter Summary
Count the number of queries on the stack
<strong>returns</strong> the number of queries in the stack

(boolean) preQuery(( ) $event)

Parameter Summary
Listens on the Doctrine_Event preQuery event

----------------- Brought to you by


Doctrine_Cache 123

adds the issued query to internal query stack and checks if cached element exists

(boolean) setOption($option, $value)

Parameter Summary

$option the option name

$value option value

Set option name and value


<strong>returns</strong> TRUE on success, FALSE on failure

(ArrayIterator) getIterator()

Parameter Summary
Get queries iterator
<strong>returns</strong> an iterator that iterates through the query stack

(boolean) preExecute(( ) $event)

Parameter Summary
Listens the preExecute event of Doctrine_Connection_Statement
adds the issued query to internal query stack and checks if cached element exists

reset()

Parameter Summary
Removes all queries from the query stack

(array) readStats()

Parameter Summary
Read stats file from disk

----------------- Brought to you by


Doctrine_Cache_Apc 124

Doctrine_Cache_Apc

Method Summary
Returns Name Description
boolean delete
mixed contains
boolean save Note : $data is always saved as a string
mixed fetch
__construct

Method Details
(boolean) delete($id)

Parameter Summary

$id cache id

Remove a cache record


<strong>returns</strong> true if no problem

(mixed) contains($id)

Parameter Summary

$id cache id

Test if a cache is available or not (for the given id)


<strong>returns</strong> false (a cache is not available) or &quot;last modified&quot;
timestamp (int) of the available cache record

----------------- Brought to you by


Doctrine_Cache_Array 125

(boolean) save($id, $data, $lifeTime = false)

Parameter Summary

$id cache id
$data data to cache
$lifeTime if != false, set a specific lifetime for this cache record (null =&gt; infinite
lifeTime)

Save some string datas into a cache record


Note : $data is always saved as a string
<strong>returns</strong> true if no problem

(mixed) fetch($id, $testCacheValidity = true)

Parameter Summary

$id cache id
$testCacheValidity if set to false, the cache validity won&apos;t be tested

Test if a cache is available for the given id and (if yes) return it (false else).
<strong>returns</strong> The stored variable on success. FALSE on failure.

__construct($options = array())

Parameter Summary

$options associative array of cache driver options

constructor

Doctrine_Cache_Array

Method Summary
Returns Name Description
boolean delete

----------------- Brought to you by


Doctrine_Cache_Array 126

mixed contains
boolean save Note : $data is always saved as a string
string fetch Note : return value is always "string" (unserialization is done by the
core not by the backend)
integer count
boolean deleteAll

Method Details
(boolean) delete($id)

Parameter Summary

$id cache id

Remove a cache record


<strong>returns</strong> true if no problem

(mixed) contains($id)

Parameter Summary

$id cache id

Test if a cache is available or not (for the given id)


<strong>returns</strong> false (a cache is not available) or &quot;last modified&quot;
timestamp (int) of the available cache record

(boolean) save($id, $data, $lifeTime = false)

Parameter Summary

$id cache id
$data data to cache
$lifeTime if != false, set a specific lifetime for this cache record (null =&gt; infinite
lifeTime)

Save some string datas into a cache record


Note : $data is always saved as a string
<strong>returns</strong> true if no problem

----------------- Brought to you by


Doctrine_Cache_Db 127

(string) fetch($id, $testCacheValidity = true)

Parameter Summary

$id cache id
$testCacheValidity if set to false, the cache validity won&apos;t be tested

Test if a cache is available for the given id and (if yes) return it (false else)
Note : return value is always &quot;string&quot; (unserialization is done by the core not by
the backend)
<strong>returns</strong> cached datas (or false)

(integer) count()

Parameter Summary

(boolean) deleteAll()

Parameter Summary
Remove all cache record
<strong>returns</strong> true if no problem

Doctrine_Cache_Db

Method Summary
Returns Name Description
boolean delete
mixed contains
boolean save Note : $data is always saved as a string
string fetch
__construct
integer count
getConnection
deleteAll $return bool true on success, false on failure

----------------- Brought to you by


Doctrine_Cache_Db 128

createTable

Method Details
(boolean) delete($id)

Parameter Summary

$id cache id

Remove a cache record


<strong>returns</strong> true if no problem

(mixed) contains($id)

Parameter Summary

$id cache id

Test if a cache is available or not (for the given id)


<strong>returns</strong> false (a cache is not available) or &quot;last modified&quot;
timestamp (int) of the available cache record

(boolean) save($id, $data, $lifeTime = false)

Parameter Summary

$id cache id
$data data to cache
$lifeTime if != false, set a specific lifetime for this cache record (null =&gt; infinite
lifeTime)

Save some string datas into a cache record


Note : $data is always saved as a string
<strong>returns</strong> true if no problem

(string) fetch($id, $testCacheValidity = true)

Parameter Summary

$id cache id
$testCacheValidity if set to false, the cache validity won&apos;t be tested

Test if a cache is available for the given id and (if yes) return it (false else).

----------------- Brought to you by


Doctrine_Cache_Db 129

<strong>returns</strong> cached datas (or false)

__construct($options, $_options)

Parameter Summary

$_options an array of options

Configure Database cache driver. Specify instance of Doctrine_Connection and


tableName to store cache in

(integer) count()

Parameter Summary
count returns the number of cached elements

getConnection()

Parameter Summary
Get the connection object associated with this cache driver

deleteAll()

Parameter Summary
Removes all cache records
$return bool true on success, false on failure

createTable()

Parameter Summary
Create the cache table

----------------- Brought to you by


Doctrine_Cache_Driver 130

Doctrine_Cache_Driver

Method Summary
Returns Name Description
mixed getOption
__construct
boolean setOption

Method Details
(mixed) getOption($option)

Parameter Summary

$option the option name

Get value of option


<strong>returns</strong> option value

__construct($options, $_options)

Parameter Summary

$_options an array of options

Configure cache driver with an array of options

(boolean) setOption($option, $value)

Parameter Summary

$option the option name

$value option value

Set option name and value

----------------- Brought to you by


Doctrine_Cache_Interface 131

<strong>returns</strong> TRUE on success, FALSE on failure

Doctrine_Cache_Interface

Method Summary
Returns Name Description
boolean delete
mixed contains
boolean save Note : $data is always saved as a string
string fetch Note : return value is always "string" (unserialization is done by the core
not by the backend)

Method Details
(boolean) delete($id)

Parameter Summary

$id cache id

Remove a cache record


<strong>returns</strong> true if no problem

(mixed) contains($id)

Parameter Summary

$id cache id

Test if a cache is available or not (for the given id)


<strong>returns</strong> false (a cache is not available) or &quot;last modified&quot;
timestamp (int) of the available cache record

----------------- Brought to you by


Doctrine_Cache_Memcache 132

(boolean) save($id, $data, $lifeTime = false)

Parameter Summary

$id cache id
$data data to cache
$lifeTime if != false, set a specific lifetime for this cache record (null =&gt; infinite
lifeTime)

Save some string datas into a cache record


Note : $data is always saved as a string
<strong>returns</strong> true if no problem

(string) fetch($id, $testCacheValidity = true)

Parameter Summary

$id cache id
$testCacheValidity if set to false, the cache validity won&apos;t be tested

Test if a cache is available for the given id and (if yes) return it (false else)
Note : return value is always &quot;string&quot; (unserialization is done by the core not by
the backend)
<strong>returns</strong> cached datas (or false)

Doctrine_Cache_Memcache

Method Summary
Returns Name Description
boolean delete
mixed contains
boolean save Note : $data is always saved as a string
mixed fetch
__construct

----------------- Brought to you by


Doctrine_Cache_Memcache 133

Method Details
(boolean) delete($id)

Parameter Summary

$id cache id

Remove a cache record


<strong>returns</strong> true if no problem

(mixed) contains($id)

Parameter Summary

$id cache id

Test if a cache is available or not (for the given id)


<strong>returns</strong> false (a cache is not available) or &quot;last modified&quot;
timestamp (int) of the available cache record

(boolean) save($id, $data, $lifeTime = false)

Parameter Summary

$id cache id
$data data to cache
$lifeTime if != false, set a specific lifetime for this cache record (null =&gt; infinite
lifeTime)

Save some string datas into a cache record


Note : $data is always saved as a string
<strong>returns</strong> true if no problem

(mixed) fetch($id, $testCacheValidity = true)

Parameter Summary

$id cache id
$testCacheValidity if set to false, the cache validity won&apos;t be tested

Test if a cache is available for the given id and (if yes) return it (false else)
<strong>returns</strong> The stored variable on success. FALSE on failure.

----------------- Brought to you by


Doctrine_Cache_Xcache 134

__construct($options = array())

Parameter Summary

$options associative array of cache driver options

constructor

Doctrine_Cache_Xcache

Method Summary
Returns Name Description
boolean delete
mixed contains
boolean save Note : $data is always saved as a string
string fetch
__construct

Method Details
(boolean) delete($id)

Parameter Summary

$id cache id

Remove a cache record


<strong>returns</strong> true if no problem

(mixed) contains($id)

Parameter Summary

$id cache id

----------------- Brought to you by


Doctrine_Cache_Xcache 135

Test if a cache is available or not (for the given id)


<strong>returns</strong> false (a cache is not available) or &quot;last modified&quot;
timestamp (int) of the available cache record

(boolean) save($id, $data, $lifeTime = false)

Parameter Summary

$id cache id
$data data to cache
$lifeTime if != false, set a specific lifetime for this cache record (null =&gt; infinite
lifeTime)

Save some string datas into a cache record


Note : $data is always saved as a string
<strong>returns</strong> true if no problem

(string) fetch($id, $testCacheValidity = true)

Parameter Summary

$id cache id
$testCacheValidity if set to false, the cache validity won&apos;t be tested

Test if a cache is available for the given id and (if yes) return it (false else).
<strong>returns</strong> cached datas (or false)

__construct($options = array())

Parameter Summary

$options associative array of cache driver options

constructor

----------------- Brought to you by


Doctrine_Cli 136

Doctrine_Cli

Method Summary
Returns Name Description
notify
printTasks
string _getTaskClassFromArgs
_run
__construct
run
array loadTasks
notifyException
array prepareArgs
array getLoadedTasks

Method Details
notify($notification = null, $style = 'HEADER')

Parameter Summary

$notification The notification message

$style Style to format the notification with(INFO, ERROR)

Notify the formatter of a message

printTasks($task = null, $full = false)

Parameter Summary
Prints an index of all the available tasks in the CLI instance

----------------- Brought to you by


Doctrine_Cli 137

(string) _getTaskClassFromArgs($args)

Parameter Summary

$args Array of arguments from the cli

Get the name of the task class based on the first argument which is always the task
name. Do some inflection to determine the class name
<strong>returns</strong> Task class name

_run($args)

Parameter Summary

$args Array of arguments for this task being executed

Run the actual task execution with the passed arguments


<strong>throws</strong> Doctrine_Cli_Exception $e

__construct($config = array())

Parameter Summary

run($args)

Parameter Summary
Public function to run the loaded task with the passed arguments
<strong>throws</strong> new Doctrine_Cli_Exception

(array) loadTasks($directory = null)

Parameter Summary

$directory Can be a string path or array of paths

Load tasks from the passed directory. If no directory is given it looks in the default
Doctrine/Task folder for the core tasks.
<strong>returns</strong> Array of tasks loaded

notifyException((Exception) $exception)

Parameter Summary
Notify the formatter of an exception

----------------- Brought to you by


Doctrine_Cli_AnsiColorFormatter 138

(array) prepareArgs($args)

Parameter Summary

$args Array of raw arguments

Prepare the raw arguments for execution. Combines with the required and optional
argument list in order to determine a complete array of arguments for the task
<strong>returns</strong> Array of prepared arguments

(array) getLoadedTasks()

Parameter Summary
Get array of all the Doctrine_Task child classes that are loaded

Doctrine_Cli_AnsiColorFormatter

Method Summary
Returns Name Description
Boolean supportsColors Colorization is disabled if not supported by the stream:

• windows
• non tty consoles

string excerpt
formatSection
setStyle
string format

----------------- Brought to you by


Doctrine_Cli_AnsiColorFormatter 139

Method Details
(Boolean) supportsColors($stream)

Parameter Summary

$stream A stream

Returns true if the stream supports colorization.


Colorization is disabled if not supported by the stream: <ul> <li> <p>windows</p> </li>
<li> <p>non tty consoles</p> </li> </ul>
<strong>returns</strong> true if the stream supports colorization, false otherwise

(string) excerpt($text, $size = null)

Parameter Summary

$text The text

$size The maximum size of the returned string (65 by default)

Truncates a line.
<strong>returns</strong> The truncated string

formatSection($section, $text, $size = null)

Parameter Summary

$section The section name

$text The text message


$size The maximum size allowed for a line (65 by default)

Formats a message within a section.

setStyle($name, $options = array())

Parameter Summary

$name The style name


$options An array of options

Sets a new style.

----------------- Brought to you by


Doctrine_Cli_Formatter 140

(string) format($text = '', $parameters = array(), $stream = STDOUT)

Parameter Summary

$text The test to style


$parameters An array of options or a style name

Formats a text according to the given style or parameters.


<strong>returns</strong> The styled text

Doctrine_Cli_Formatter

Method Summary
Returns Name Description
setMaxLineSize
string excerpt
formatSection
__construct
string format

Method Details
setMaxLineSize($size)

Parameter Summary

$size The maximum line size for a message

Sets the maximum line size.

(string) excerpt($text, $size = null)

Parameter Summary

$text The text

----------------- Brought to you by


Doctrine_Collection 141

$size The maximum size of the returned string (65 by default)

Truncates a line.
<strong>returns</strong> The truncated string

formatSection($section, $text, $size = null)

Parameter Summary

$section The section name

$text The text message


$size The maximum size allowed for a line (65 by default)

Formats a message within a section.

__construct($maxLineSize = 65)

Parameter Summary

(string) format($text = '', $parameters = array(), (stream) $stream =


STDOUT)

Parameter Summary

$text The test to style


$parameters An array of parameters

$stream A stream (default to STDOUT)

Formats a text according to the given parameters.


<strong>returns</strong> The formatted text

Doctrine_Collection

Method Summary
Returns Name Description

----------------- Brought to you by


Doctrine_Collection 142

string getKeyColumn
array toKeyValueArray
populateRelated
mixed key
integer compareRecords
boolean add
clear
delete
getRelation
Doctrine_Iterator_Normal getNormalIterator
importFrom
merge
array serialize
initNullObject
boolean loadRelated
string __toString
boolean contains
get There are two special cases:

if null is given as a key a new record is
created and attached

Listing </li>
0-4

at the end of the collection 2. if given key


does not exist, then a new record is
create and atta
save
array getSnapshot
processDiff an example: Snapshot with the objects 1,
2 and 4 Current data with objects 2, 3
and 5 The process would remove object 4
setData
takeSnapshot snapshots are used for diff processing,
for example when a fetched collection
has three elements, then two of those are
being removed the diff would contain one
element Doctrine_Collection::save()
attaches the diff with the help of last
snapshot.
getReference
mixed getLast
getTable
__construct

----------------- Brought to you by


Doctrine_Collection 143

setReference
search
array getDeleteDiff
integer count
synchronizeFromArray
mixed getFirst
mixed end
object ArrayIterator getIterator
set
array getData
setKeyColumn
free WARNING: After invoking free() the
collection is no longer considered to be
in a useable state. Subsequent usage
may result in unexpected behavior.
boolean remove
exportTo
array getPrimaryKeys
fromArray
toArray
unserialize
synchronizeWithArray it expects an array representation of a
Doctrine_Collection similar to the return
value of the toArray() method. It will
create Dectrine_Records that don't exist
on the collection, update the ones that do
and remove the ones missing in the
$array
array getKeys
array getInsertDiff

Method Details
(string) getKeyColumn()

Parameter Summary
Get the name of the key column

(array) toKeyValueArray($key, $value)

Parameter Summary
Build an array made up of the values from the 2 specified columns

----------------- Brought to you by


Doctrine_Collection 144

populateRelated($name, ( ) $coll)

Parameter Summary
Populate the relationship $name for all records in the passed collection

(mixed) key()

Parameter Summary
Get the current key

(integer) compareRecords((Doctrine_Record) $a, (Doctrine_Record) $b)

Parameter Summary
Compares two records. To be used on _snapshot diffs using array_udiff

(boolean) add((Doctrine_Record) $record, $key = null)

Parameter Summary

$record record to be added

$key optional key for the record

Adds a record to collection

clear()

Parameter Summary
Clears the collection.

delete(( ) $conn = null, $clearColl = true)

Parameter Summary
Deletes all records from this collection

getRelation()

Parameter Summary
Returns the relation object

(Doctrine_Iterator_Normal) getNormalIterator()

Parameter Summary

----------------- Brought to you by


Doctrine_Collection 145

Get normal iterator - an iterator that will not expand this collection

importFrom($type, $data)

Parameter Summary
Import data to a Doctrine_Collection from one of the supported Doctrine_Parser
formats

merge(( ) $coll)

Parameter Summary
Merges collection into $this and returns merged collection

(array) serialize()

Parameter Summary
This method is automatically called when this Doctrine_Collection is serialized

initNullObject(( ) $null)

Parameter Summary
Initializes the null object for this collection

(boolean) loadRelated($name = null)

Parameter Summary
Load all relationships or the named relationship passed

(string) __toString()

Parameter Summary
Returns a string representation of this object

(boolean) contains($key)

Parameter Summary

$key the key of the element

Whether or not this collection contains a specified element

----------------- Brought to you by


Doctrine_Collection 146

get($key)

Parameter Summary

$key the key of the element

Gets a record for given key


There are two special cases: <orderedlist> <li> <p>if null is given as a key a new record is
created and attached</p> </li> </orderedlist> at the end of the collection 2. if given key
does not exist, then a new record is create and atta
<strong>returns</strong> return a specified record

save(( ) $conn = null, $processDiff = true)

Parameter Summary

$conn optional connection parameter

Saves all records of this collection and processes the difference of the last snapshot
and the current data

(array) getSnapshot()

Parameter Summary
Gets the data of the last snapshot
<strong>returns</strong> returns the data in last snapshot

processDiff()

Parameter Summary
Processes the difference of the last snapshot and the current data
an example: Snapshot with the objects 1, 2 and 4 Current data with objects 2, 3 and 5 The
process would remove object 4

setData($data)

Parameter Summary
Set the data for the Doctrin_Collection instance

takeSnapshot()

Parameter Summary
Takes a snapshot from this collection

----------------- Brought to you by


Doctrine_Collection 147

snapshots are used for diff processing, for example when a fetched collection has three
elements, then two of those are being removed the diff would contain one element
Doctrine_Collection::save() attaches the diff with the help of last snapshot.

getReference()

Parameter Summary
Get reference to Doctrine_Record instance

(mixed) getLast()

Parameter Summary
Get the last record in the collection

getTable()

Parameter Summary
Get the table this collection belongs to

__construct((Doctrine_Table|string) $table, $keyColumn = null)

Parameter Summary
constructor

setReference(( ) $record, ( ) $relation)

Parameter Summary
Sets a reference pointer

search(( ) $record, $Doctrine_Record)

Parameter Summary
Search a Doctrine_Record instance

(array) getDeleteDiff()

Parameter Summary
Perform a delete diff between the last snapshot and the current data

(integer) count()

Parameter Summary

----------------- Brought to you by


Doctrine_Collection 148

Gets the number of records in this collection This class implements interface
countable

synchronizeFromArray($array)

Parameter Summary

(mixed) getFirst()

Parameter Summary
Get the first record in the collection

(mixed) end()

Parameter Summary
Get the last record in the collection

(object ArrayIterator) getIterator()

Parameter Summary
Get collection data iterator

set($key, (Doctrine_Record) $record)

Parameter Summary
Set a Doctrine_Record instance to the collection

(array) getData()

Parameter Summary
Get all the records as an array

setKeyColumn($column)

Parameter Summary
Sets the key column for this collection

free($deep = false)

Parameter Summary
Frees the resources used by the collection.

----------------- Brought to you by


Doctrine_Collection 149

WARNING: After invoking free() the collection is no longer considered to be in a useable


state. Subsequent usage may result in unexpected behavior.

(boolean) remove($key)

Parameter Summary
Removes a specified collection element

exportTo($type, $deep = false)

Parameter Summary
Export a Doctrine_Collection to one of the supported Doctrine_Parser formats

(array) getPrimaryKeys()

Parameter Summary
Get array of primary keys for all the records in the collection
<strong>returns</strong> an array containing all primary keys

fromArray($array, $deep = true)

Parameter Summary
Populate a Doctrine_Collection from an array of data

toArray($deep = false, $prefixKey = false)

Parameter Summary
Mimics the result of a $query->execute(array(), Doctrine::HYDRATE_ARRAY);

unserialize($serialized)

Parameter Summary
This method is automatically called everytime a Doctrine_Collection object is
unserialized

synchronizeWithArray($array)

Parameter Summary

$array representation of a Doctrine_Collection

synchronizes a Doctrine_Collection with data from an array

----------------- Brought to you by


Doctrine_Collection_Iterator 150

it expects an array representation of a Doctrine_Collection similar to the return value of the


toArray() method. It will create Dectrine_Records that don&apos;t exist on the collection,
update the ones that do and remove the ones missing in the $array

(array) getKeys()

Parameter Summary
Get all keys of the data in the collection

(array) getInsertDiff()

Parameter Summary
Perform a insert diff between the last snapshot and the current data

Doctrine_Collection_Iterator

Method Summary
Returns Name Description
integer key
rewind
current
__construct
next

Method Details
(integer) key()

Parameter Summary
returns the current key

----------------- Brought to you by


Doctrine_Collection_Iterator_Expandable 151

rewind()

Parameter Summary
rewinds the iterator

current()

Parameter Summary
returns the current record

__construct($collection)

Parameter Summary
constructor

next()

Parameter Summary
advances the internal pointer

Doctrine_Collection_Iterator_Expandable

Method Summary
Returns Name Description
valid

Method Details
valid()

Parameter Summary

----------------- Brought to you by


Doctrine_Collection_Iterator_Normal 152

Doctrine_Collection_Iterator_Normal

Method Summary
Returns Name Description
boolean valid

Method Details
(boolean) valid()

Parameter Summary
<strong>returns</strong> whether or not the iteration will continue

Doctrine_Collection_Iterator_Offset

Method Summary
Returns Name Description
valid

----------------- Brought to you by


Doctrine_Collection_Offset 153

Method Details
valid()

Parameter Summary

Doctrine_Collection_Offset

Method Summary
Returns Name Description
__construct
integer getLimit
getIterator

Method Details
__construct(( ) $table)

Parameter Summary

(integer) getLimit()

Parameter Summary

getIterator()

Parameter Summary

----------------- Brought to you by


Doctrine_Column 154

Doctrine_Column

Method Summary
Returns Name Description
boolean contains
mixed get
array getDefinition
__construct
integer count
mixed enumValue
mixed enumIndex
array getEnumValues
ArrayIterator getIterator
mixed set

Method Details
(boolean) contains($name)

Parameter Summary

(mixed) get($name)

Parameter Summary

(array) getDefinition()

Parameter Summary

__construct($definition = array())

Parameter Summary

----------------- Brought to you by


Doctrine_Compiler 155

(integer) count()

Parameter Summary

(mixed) enumValue($index, $field)

Parameter Summary

(mixed) enumIndex($field, $value)

Parameter Summary

(array) getEnumValues($field)

Parameter Summary

(ArrayIterator) getIterator()

Parameter Summary

(mixed) set($name, $value)

Parameter Summary

Doctrine_Compiler

Method Summary
Returns Name Description
$target compile

----------------- Brought to you by


Doctrine_Configurable 156

Method Details
($target) compile($target = null, $includedDrivers = array())

Parameter Summary
method for making a single file of most used doctrine runtime components including
the compiled file instead of multiple files (in worst cases dozens of files) can improve
performance by an order of magnitude
<strong>returns</strong> Path the compiled file was written to
<strong>throws</strong> Doctrine_Compiler_Exception if something went wrong during the
compile operation

Doctrine_Configurable

Method Summary
Returns Name Description
getAttributeValueFromString Will get the value for an attribute by the string
name Example: -
>getAttributeFromString('portability', 'all') will
return Doctrine::PORTABILITY_ALL
setListener
setParam
mixed addRecordListener
mixed getCharset
getParams
array getAttributes
string getImpl
hasImpl
getParam
getAttributeFromString Will accept the name of an attribute and return the
attribute value Example: -
>getAttributeFromString('portability') will be
converted to Doctrine::ATTR_PORTABILITY and
returned
getParent

----------------- Brought to you by


Doctrine_Configurable 157

setCharset
mixed getAttribute
mixed getCollate
setImpl this method is the base of Doctrine dependency
injection
setRecordListener
setParent
getRecordListener
getListener
setCollate
mixed addListener
getParamNamespaces
setAttribute
setAttribute(Doctrine::ATTR_PORTABILITY, Listing
0-5
Doctrine::PORTABILITY_ALL);

// or

$manager->setAttribute('portability',
Doctrine::PORTABILITY_ALL);

// or

$manager->setAttribute('portability',
'all');]]>

setEventListener

Method Details
getAttributeValueFromString($stringAttributeName,
$stringAttributeValueName)

Parameter Summary
Will get the value for an attribute by the string name Example:
-&gt;getAttributeFromString(&apos;portability&apos;, &apos;all&apos;) will return
Doctrine::PORTABILITY_ALL

setListener((Doctrine_EventListener_Interface|Doctrine_Overloadable)
$listener)

Parameter Summary
<strong>returns</strong> this object

----------------- Brought to you by


Doctrine_Configurable 158

setParam($name, $value, $namespace = null)

Parameter Summary

(mixed) addRecordListener((Doctrine_EventListener_Interface|Doctrine_Overloadable
$listener, $name = null)

Parameter Summary
<strong>returns</strong> this object

(mixed) getCharset()

Parameter Summary
Get the charset

getParams($namespace = null)

Parameter Summary

(array) getAttributes()

Parameter Summary
getAttributes returns all attributes as an array

(string) getImpl($template)

Parameter Summary
getImpl returns the implementation for given class
<strong>returns</strong> name of the concrete implementation

hasImpl($template)

Parameter Summary

getParam($name, $namespace = null)

Parameter Summary

getAttributeFromString($stringAttributeName)

Parameter Summary

----------------- Brought to you by


Doctrine_Configurable 159

Will accept the name of an attribute and return the attribute value Example:
-&gt;getAttributeFromString(&apos;portability&apos;) will be converted to
Doctrine::ATTR_PORTABILITY and returned

getParent()

Parameter Summary
getParent returns the parent of this component

setCharset($charset)

Parameter Summary
Set the charset

(mixed) getAttribute($attribute)

Parameter Summary
returns the value of an attribute

(mixed) getCollate()

Parameter Summary
Get the collate

setImpl($template, $class)

Parameter Summary

$template name of the class template

$class name of the class to be bound

setImpl binds given class to given template name


this method is the base of Doctrine dependency injection
<strong>returns</strong> this object

setRecordListener((Doctrine_EventListener_Interface|Doctrine_Overloadable)
$listener)

Parameter Summary
setListener
<strong>returns</strong> this object

----------------- Brought to you by


Doctrine_Configurable 160

setParent(( ) $component)

Parameter Summary
sets a parent for this configurable component the parent must be configurable
component itself

getRecordListener()

Parameter Summary
getListener

getListener()

Parameter Summary

setCollate($collate)

Parameter Summary
Set the collate

(mixed) addListener((Doctrine_EventListener_Interface|Doctrine_Overloadable)
$listener, $name = null)

Parameter Summary
<strong>returns</strong> this object

getParamNamespaces()

Parameter Summary

setAttribute($attribute, $value)

Parameter Summary

$attribute either a Doctrine::ATTR_* integer constant or a string corresponding to a


constant
$value the value of the attribute

setAttribute sets a given attribute


<pre><code> <![CDATA[ $manager->setAttribute(Doctrine::ATTR_PORTABILITY,
Doctrine::PORTABILITY_ALL);
// or
$manager->setAttribute('portability', Doctrine::PORTABILITY_ALL);

----------------- Brought to you by


Doctrine_Connection 161

// or
$manager->setAttribute('portability', 'all');]]> </code></pre>
<strong>throws</strong> Doctrine_Exception if the value is invalid

setEventListener((Doctrine_EventListener) $listener)

Parameter Summary

Doctrine_Connection

Method Summary
Returns Name Description
incrementQueryCount
array getTables
getDriverName Gets the name of the instance
driver
mixed update
array fetchArray
PDO getDbh
getOption Retrieves option
exec
string getName
string generateUniqueIndexName
getTmpConnection Create a temporary connection to
the database with the user
credentials. This is so the user can
make a connection to a db server.
Some dbms allow connections with
no database, but some do not. In
that case we have a table which is
always guaranteed to
beginInternalTransaction
getCacheDriver
clear

----------------- Brought to you by


Doctrine_Connection 162

array fetchColumn
boolean commit Listeners:
onPreTransactionCommit,
onTransactionCommit
createQuery
array fetchBoth
integer beginTransaction if trying to set a savepoint and
there is no active transaction a
new transaction is being started
Listeners: onPreTransactionBegin,
onTransactionBegin
integer delete
convertBooleans This method takes care of that
conversion
select
setName Sets the name of the connection
array errorInfo
getAvailableDrivers
getOptions Get array of all options
mixed dropDatabase Issue drop database command for
this instance of
Doctrine_Connection
boolean rollback Cancel any database changes done
during a transaction or since a
specific savepoint that is in
progress. This function may only
be called when auto-committing is
disabled, otherwise it will fail.
Therefore, a new transaction is
implicitly started after
string serialize
rethrowException
lastInsertId Returns the ID of the last inserted
row, or the last value from a
sequence object, depending on the
underlying driver. Note: This
method may not return a
meaningful or consistent result
across different drivers, because
the underlying database may not e
integer getTransactionLevel
string __toString
query
Listing
0-6

----------------- Brought to you by


Doctrine_Connection 163

query('SELECT u.* FROM User


u');

$users =
$conn->query('SELECT u.*
FROM User u WHERE u.name
LIKE ?',
array('someone'));]]>

array fetchRow
close
__get
boolean supports
driverName
integer errorCode
standaloneQuery
mixed quote
string modifyLimitSubquery
_generateUniqueName
mixed fetchOne
getManager
string quoteIdentifier 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 usi
getTable
__construct
mixed getAttribute
boolean addTable
setDateFormat
integer count
execute
mixed insert
boolean connect
string generateUniqueRelationForeignKeyName
string modifyLimitQuery Some dbms require specific
functionality for this. Check the
other connection adapters for
examples

----------------- Brought to you by


Doctrine_Connection 164

replace The REPLACE type of query does


not make part of the SQL
standards. Since practically only
MySQL and SQLIte implement it
natively, this type of query
isemulated through this method
for other DBMS using standard
types of queries inside a
transaction to a
string quoteMultipleIdentifier
setOption Set option value
ArrayIterator getIterator
Listing $table) {
0-7
print $table; // get
a string representation of
each table object
}]]>

prepare
getQueryCacheDriver
flush
array fetchAssoc
mixed createDatabase Issue create database command
for this instance of
Doctrine_Connection
queryOne <
pre> queryOne('SELECT u.* FROM
User u WHERE u.id = ?',
array(1)); $user = $conn-
>queryOne('SELECT u.* FROM User
u WHERE u.name LIKE ? AND
u.password = ?',
array('someone', 'password')
);]]>
getResultCacheDriver
array fetchAll
create create creates a record
unserialize
boolean hasTable
boolean setAttribute
evictTables

----------------- Brought to you by


Doctrine_Connection 165

Method Details
incrementQueryCount()

Parameter Summary

(array) getTables()

Parameter Summary
returns an array of all initialized tables

getDriverName()

Parameter Summary
Gets the name of the instance driver

(mixed) update(( ) $table, $fields, $identifier, $values)

Parameter Summary

$table The table to insert data into


$values An associateve array containing column-value pairs.

Updates table row(s) with specified data


<strong>returns</strong> boolean false if empty value array was given, otherwise returns
the number of affected rows
<strong>throws</strong> Doctrine_Connection_Exception if something went wrong at the
database level

(array) fetchArray($statement, $params = array())

Parameter Summary

$statement sql query to be executed

$params prepared statement params

(PDO) getDbh()

Parameter Summary
returns the database handler of which this connection uses
<strong>returns</strong> the database handler

----------------- Brought to you by


Doctrine_Connection 166

getOption($option)

Parameter Summary
Retrieves option

exec($query, $params = array())

Parameter Summary

$query sql query


$params query parameters

(string) getName()

Parameter Summary
getName returns the name of this driver
<strong>returns</strong> the name of this driver

(string) generateUniqueIndexName($tableName, $fields)

Parameter Summary

$tableName The name of the table the index exists

$fields The fields that makes up the index

Get/generate unique index name for a table name and set of fields
<strong>returns</strong> The name of the generated index

getTmpConnection($info)

Parameter Summary
Create a temporary connection to the database with the user credentials. This is so the user
can make a connection to a db server. Some dbms allow connections with no database, but
some do not. In that case we have a table which is always guaranteed to

beginInternalTransaction($savepoint = null)

Parameter Summary

getCacheDriver()

Parameter Summary

----------------- Brought to you by


Doctrine_Connection 167

clear()

Parameter Summary
clear clears all repositories

(array) fetchColumn($statement, $params = array(), $colnum)

Parameter Summary

$statement sql query to be executed

$params prepared statement params


$colnum 0-indexed column number to retrieve

(boolean) commit($savepoint = null)

Parameter Summary

$savepoint name of a savepoint to release

commit Commit the database changes done during a transaction that is in progress
or release a savepoint. This function may only be called when auto-committing is
disabled, otherwise it will fail.
Listeners: onPreTransactionCommit, onTransactionCommit
<strong>returns</strong> false if commit couldn&apos;t be performed, true otherwise
<strong>throws</strong> Doctrine_Validator_Exception if the transaction fails due to record
validations

createQuery()

Parameter Summary
Creates a new Doctrine_Query object that operates on this connection.

(array) fetchBoth($statement, $params = array())

Parameter Summary

$statement sql query to be executed

$params prepared statement params

----------------- Brought to you by


Doctrine_Connection 168

(integer) beginTransaction($savepoint = null)

Parameter Summary

$savepoint name of a savepoint to set

beginTransaction Start a transaction or set a savepoint.


if trying to set a savepoint and there is no active transaction a new transaction is being
started Listeners: onPreTransactionBegin, onTransactionBegin
<strong>returns</strong> current transaction nesting level
<strong>throws</strong> Doctrine_Transaction_Exception if the transaction fails at
database level

(integer) delete(( ) $table, $identifier)

Parameter Summary

$table The table to delete data from


$identifier An associateve array containing identifier column-value pairs.

deletes table row(s) matching the specified identifier


<strong>returns</strong> The number of affected rows
<strong>throws</strong> Doctrine_Connection_Exception if something went wrong at the
database level

convertBooleans($item)

Parameter Summary
convertBooleans some drivers need the boolean values to be converted into integers
when using DQL API
This method takes care of that conversion

select($query, $limit, $offset)

Parameter Summary
queries the database with limit and offset added to the query and returns a
Doctrine_Connection_Statement object

setName($name)

Parameter Summary
Sets the name of the connection

----------------- Brought to you by


Doctrine_Connection 169

(array) errorInfo()

Parameter Summary
errorInfo Fetch extended error information associated with the last operation on the
database handle

getAvailableDrivers()

Parameter Summary
returns an array of available PDO drivers

getOptions()

Parameter Summary
Get array of all options

(mixed) dropDatabase()

Parameter Summary
Issue drop database command for this instance of Doctrine_Connection
<strong>returns</strong> Returns Doctrine_Exception or success string

(boolean) rollback($savepoint = null)

Parameter Summary

$savepoint name of a savepoint to rollback to

Cancel any database changes done during a transaction or since a specific savepoint that is in
progress. This function may only be called when auto-committing is disabled, otherwise it will
fail. Therefore, a new transaction is implicitly started after
<strong>returns</strong> false if rollback couldn&apos;t be performed, true otherwise
<strong>throws</strong> Doctrine_Transaction_Exception if the rollback operation fails at
database level

(string) serialize()

Parameter Summary
Serialize. Remove database connection(pdo) since it cannot be serialized

rethrowException($e, $invoker)

Parameter Summary

----------------- Brought to you by


Doctrine_Connection 170

<strong>throws</strong> Doctrine_Connection_Exception

lastInsertId($table = null, $field = null)

Parameter Summary

$table name of the table into which a new row was inserted

$field name of the field into which a new row was inserted

Returns the ID of the last inserted row, or the last value from a sequence object, depending
on the underlying driver. Note: This method may not return a meaningful or consistent result
across different drivers, because the underlying database may not e

(integer) getTransactionLevel()

Parameter Summary
get the current transaction nesting level

(string) __toString()

Parameter Summary
returns a string representation of this object

query($query, $params = array(), $hydrationMode = null)

Parameter Summary

$query DQL query


$params query parameters
$hydrationMode Doctrine::HYDRATE_ARRAY or Doctrine::HYDRATE_RECORD

query queries the database using Doctrine Query Language returns a collection of
Doctrine_Record objects
<pre><code> <![CDATA[ $users = $conn->query('SELECT u.* FROM User u');
$users = $conn->query('SELECT u.* FROM User u WHERE u.name LIKE ?',
array('someone'));]]> </code></pre>
<strong>returns</strong> Collection of Doctrine_Record objects

(array) fetchRow($statement, $params = array())

Parameter Summary

$statement sql query to be executed

$params prepared statement params

----------------- Brought to you by


Doctrine_Connection 171

close()

Parameter Summary
close closes the connection

__get($name)

Parameter Summary

$name the name of the module to get

__get lazy loads given module and returns it


<strong>returns</strong> connection module
<strong>throws</strong> Doctrine_Connection_Exception if trying to get an unknown
module

(boolean) supports($feature)

Parameter Summary

$feature the name of the feature

<strong>returns</strong> whether or not this drivers supports given feature

driverName($name)

Parameter Summary
converts given driver name

(integer) errorCode()

Parameter Summary
errorCode Fetch the SQLSTATE associated with the last operation on the database
handle

standaloneQuery($query, $params = array())

Parameter Summary

$query sql query


$params query parameters

----------------- Brought to you by


Doctrine_Connection 172

(mixed) quote($input, $type = null)

Parameter Summary

$input parameter to be quoted

quote quotes given input parameter

(string) modifyLimitSubquery(( ) $rootTable, $query, $limit = false,


$offset = false, $isManip = false)

Parameter Summary
Creates dbms specific LIMIT/OFFSET SQL for the subqueries that are used in the
context of the limit-subquery algorithm.

_generateUniqueName($type, $parts, $key, $format = '%s', $maxLength


= 64)

Parameter Summary

(mixed) fetchOne($statement, $params = array(), $colnum)

Parameter Summary

$statement sql query to be executed

$params prepared statement params


$colnum 0-indexed column number to retrieve

getManager()

Parameter Summary
returns the manager that created this connection

(string) quoteIdentifier($str, $checkOption = true)

Parameter Summary

$str identifier name to be quoted


$checkOption check the &apos;quote_identifier&apos; option

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&apos;t mean you SHOULD use them. In general, they
end up causing way more problems than they solve. Portability is broken by usi

----------------- Brought to you by


Doctrine_Connection 173

<strong>returns</strong> quoted identifier string

getTable($name)

Parameter Summary

$name component name

returns a table object for given component name

__construct(( ) $manager, (PDO|Doctrine_Adapter_Interface) $adapter,


$user = null, $pass = null)

Parameter Summary

$manager the manager object

$adapter database driver

the constructor

(mixed) getAttribute($attribute)

Parameter Summary
getAttribute retrieves a database connection attribute

(boolean) addTable(( ) $table)

Parameter Summary

$table a Doctrine_Table object to be added into registry

addTable adds a Doctrine_Table object into connection registry

setDateFormat($format = null)

Parameter Summary

$format time format

Set the date/time format for the current connection

(integer) count()

Parameter Summary
returns the count of initialized table objects

----------------- Brought to you by


Doctrine_Connection 174

execute($query, $params = array())

Parameter Summary

$query sql query


$params query parameters

(mixed) insert(( ) $table, $fields, $values)

Parameter Summary

$table The table to insert data into.


$values An associateve array containing column-value pairs.

Inserts a table row with specified data.


<strong>returns</strong> boolean false if empty value array was given, otherwise returns
the number of affected rows

(boolean) connect()

Parameter Summary
connect connects into database

(string) generateUniqueRelationForeignKeyName(( ) $relation)

Parameter Summary

$relation Relation object to generate the foreign key name for

Get/generate a unique foreign key name for a relationship

(string) modifyLimitQuery($query, $limit = false, $offset = false,


$isManip = false)

Parameter Summary
Some dbms require specific functionality for this. Check the other connection adapters for
examples

replace(( ) $table, $fields, $keys)

Parameter Summary

$table name of the table on which the REPLACE query will be executed.

----------------- Brought to you by


Doctrine_Connection 175

$fields <p> an associative array that describes the fields and the values that will be
inserted or updated in the specified table. The indexes of the array are the names of
all the fields of the table. </p
$keys <p> an array containing all key fields (primary key fields or unique index fields) for
this table </p> <p> the uniqueness of a row will be determined according to the
provided key fields </p> <p>this method wi

Execute a SQL REPLACE query. A REPLACE query is identical to a INSERT query,


except that if there is already a row in the table with the same key field values, the
REPLACE query just updates its values instead of inserting a new row.
The REPLACE type of query does not make part of the SQL standards. Since practically only
MySQL and SQLIte implement it natively, this type of query isemulated through this method
for other DBMS using standard types of queries inside a transaction to a
<strong>throws</strong> Doctrine_Connection_Exception if this driver doesn&apos;t
support replace

(string) quoteMultipleIdentifier($arr, $checkOption = true)

Parameter Summary

$arr identifiers array to be quoted


$checkOption check the &apos;quote_identifier&apos; option

quoteMultipleIdentifier Quotes multiple identifier strings


<strong>returns</strong> quoted identifier string

setOption($option, $value)

Parameter Summary
Set option value

(ArrayIterator) getIterator()

Parameter Summary
returns an iterator that iterators through all initialized table objects
<pre><code> <![CDATA[ foreach ($conn as $index => $table) { print $table; // get a string
representation of each table object }]]> </code></pre>
<strong>returns</strong> SPL ArrayIterator object

prepare($statement)

Parameter Summary

----------------- Brought to you by


Doctrine_Connection 176

getQueryCacheDriver()

Parameter Summary

flush()

Parameter Summary
flush saves all the records from all tables this operation is isolated using a
transaction
<strong>throws</strong> PDOException if something went wrong at database level

(array) fetchAssoc($statement, $params = array())

Parameter Summary

$statement sql query to be executed

$params prepared statement params

(mixed) createDatabase()

Parameter Summary
Issue create database command for this instance of Doctrine_Connection
<strong>returns</strong> Returns Doctrine_Exception or success string

queryOne($query, $params = array())

Parameter Summary

$query DQL query


$params query parameters

query queries the database using Doctrine Query Language and returns the first
record found
<pre><code> <![CDATA[ $user = $conn->queryOne('SELECT u.* FROM User u WHERE
u.id = ?', array(1));
$user = $conn->queryOne('SELECT u.* FROM User u WHERE u.name LIKE ? AND
u.password = ?', array('someone', 'password') );]]> </code></p
<strong>returns</strong> Doctrine_Record object on success, boolean false on failure

getResultCacheDriver()

Parameter Summary

----------------- Brought to you by


Doctrine_Connection 177

(array) fetchAll($statement, $params = array())

Parameter Summary

$statement sql query to be executed

$params prepared statement params

create($name)

Parameter Summary

$name component name

create creates a record


create creates a record
<strong>returns</strong> Doctrine_Record object

unserialize($serialized)

Parameter Summary
Unserialize. Recreate connection from serialized content

(boolean) hasTable($name)

Parameter Summary
hasTable whether or not this connection has table $name initialized

(boolean) setAttribute($attribute, $value)

Parameter Summary
setAttribute sets an attribute

evictTables()

Parameter Summary
evictTables evicts all tables

----------------- Brought to you by


Doctrine_Connection_Common 178

Doctrine_Connection_Common

Method Summary
Returns Name Description
modifyLimitQuery

Method Details
modifyLimitQuery($query, $limit = false, $offset = false, $isManip =
false)

Parameter Summary
Adds an driver-specific LIMIT clause to the query

Doctrine_Connection_Db2

Method Summary
Returns Name Description
string modifyLimitQuery

----------------- Brought to you by


Doctrine_Connection_Exception 179

Method Details
(string) modifyLimitQuery($query, $limit = false, $offset = false,
$isManip = false)

Parameter Summary

$query query to modify

$limit limit the number of rows


$offset start reading from given offset

Adds an driver-specific LIMIT clause to the query


<strong>returns</strong> the modified query

Doctrine_Connection_Exception

Method Summary
Returns Name Description
boolean processErrorInfo
string errorMessage
integer getPortableCode
string getPortableMessage

Method Details
(boolean) processErrorInfo($errorInfo)

Parameter Summary

$errorInfo error info array

This method checks if native error code/message can be converted into a portable
code and then adds this portable error code to $portableCode field

----------------- Brought to you by


Doctrine_Connection_Firebird 180

<strong>returns</strong> whether or not the error info processing was successfull (the
process is successfull if portable error code was found)

(string) errorMessage((int|array) $value = null)

Parameter Summary

$value integer error code, null to get the current error code-message map, or an array with
a new error code-message map

Return a textual error message for a Doctrine error code


<strong>returns</strong> error message, or false if the error code was not recognized

(integer) getPortableCode()

Parameter Summary
getPortableCode returns portable error code
<strong>returns</strong> portable error code

(string) getPortableMessage()

Parameter Summary
getPortableMessage returns portable error message
<strong>returns</strong> portable error message

Doctrine_Connection_Firebird

Method Summary
Returns Name Description
setCharset
__construct
string modifyLimitQuery

----------------- Brought to you by


Doctrine_Connection_Firebird_Exception 181

Method Details
setCharset($charset)

Parameter Summary

$charset charset

Set the charset on the current connection

__construct(( ) $manager, $adapter, (PDO) $pdo)

Parameter Summary

$pdo database handle

the constructor

(string) modifyLimitQuery($query, $limit = false, $offset = false,


$isManip = false)

Parameter Summary

$query query to modify

$limit limit the number of rows


$offset start reading from given offset

Adds an driver-specific LIMIT clause to the query


<strong>returns</strong> modified query

Doctrine_Connection_Firebird_Exception

Method Summary
Returns Name Description
array processErrorInfo the portable error code is added at the end of array

----------------- Brought to you by


Doctrine_Connection_Informix 182

Method Details
(array) processErrorInfo($errorInfo)

Parameter Summary

$errorInfo error info array

This method checks if native error code/message can be converted into a portable
code and then adds this portable error code to errorInfo array and returns the
modified array
the portable error code is added at the end of array

Doctrine_Connection_Informix

Method Summary
Returns Name Description
quoteIdentifier
__construct

Method Details
quoteIdentifier($identifier, $checkOption = false)

Parameter Summary

__construct(( ) $manager, $adapter, (PDO) $pdo)

Parameter Summary

$pdo database handle

the constructor

----------------- Brought to you by


Doctrine_Connection_Mock 183

Doctrine_Connection_Mock

Method Summary
Returns Name Description
__construct

Method Details
__construct(( ) $manager, (PDO|Doctrine_Adapter) $adapter)

Parameter Summary

$adapter database handler

the constructor

Doctrine_Connection_Module

Method Summary
Returns Name Description
string getModuleName
__construct
getConnection

----------------- Brought to you by


Doctrine_Connection_Mssql 184

Method Details
(string) getModuleName()

Parameter Summary
getModuleName returns the name of this module
<strong>returns</strong> the name of this module

__construct((Doctrine_Connection) $conn = null)

Parameter Summary

$conn Doctrine_Connection object, every connection module holds an instance of


Doctrine_Connection

getConnection()

Parameter Summary
getConnection returns the connection object this module uses

Doctrine_Connection_Mssql

Method Summary
Returns Name Description
boolean checkSequence
mixed getServerVersion
string quoteIdentifier Quoting style depends on which database driver is being used.
__construct
string modifyLimitQuery [ borrowed from Zend Framework ]

----------------- Brought to you by


Doctrine_Connection_Mssql 185

Method Details
(boolean) checkSequence($seqName, $seq_name)

Parameter Summary

$seq_name The sequence name to verify.

Checks if there's a sequence that exists.


<strong>returns</strong> The value if the table exists or not

(mixed) getServerVersion($native = false)

Parameter Summary

$native determines if the raw version string should be returned

return version information about the server


<strong>returns</strong> array/string with version information or MDB2 error object

(string) quoteIdentifier($identifier, $checkOption = false)

Parameter Summary

$identifier identifier name to be quoted


$checkOption check the &apos;quote_identifier&apos; option

quoteIdentifier Quote a string so it can be safely used as a table / column name


Quoting style depends on which database driver is being used.
<strong>returns</strong> quoted identifier string

__construct(( ) $manager, $adapter, (PDO) $pdo)

Parameter Summary

$pdo database handle

the constructor

(string) modifyLimitQuery($query, $limit = false, $offset = false,


$isManip = false)

Parameter Summary
Adds an adapter-specific LIMIT clause to the SELECT statement.
[ borrowed from Zend Framework ]

----------------- Brought to you by


Doctrine_Connection_Mssql_Exception 186

Doctrine_Connection_Mssql_Exception

Method Summary
Returns Name Description
boolean processErrorInfo

Method Details
(boolean) processErrorInfo($errorInfo)

Parameter Summary

$errorInfo error info array

This method checks if native error code/message can be converted into a portable
code and then adds this portable error code to $portableCode field
<strong>returns</strong> whether or not the error info processing was successfull (the
process is successfull if portable error code was found)

Doctrine_Connection_Mysql

Method Summary
Returns Name Description
string getDatabaseName
setCharset

----------------- Brought to you by


Doctrine_Connection_Mysql 187

__construct
boolean connect
integer replace The REPLACE type of query does not make part of the SQL
standards. Since practically only MySQL implements it
natively, this type of query is emulated through this method
for other DBMS using standard types of queries inside a
transaction to assure the

Method Details
(string) getDatabaseName()

Parameter Summary
returns the name of the connected database

setCharset($charset)

Parameter Summary

$charset charset

Set the charset on the current connection

__construct(( ) $manager, (PDO|Doctrine_Adapter) $adapter)

Parameter Summary

$adapter database handler

the constructor

(boolean) connect()

Parameter Summary
Overrides connect Method, to add specific attributes PDO emulate prepares is
required to avoid bugs on mysql < 5.1 when trying to prepare DROP DATABASE or
CREATE DATABASE statements
<strong>returns</strong> connected

(integer) replace(( ) $table, $fields, $keys)

Parameter Summary

$table name of the table on which the REPLACE query will be executed.

----------------- Brought to you by


Doctrine_Connection_Mysql_Exception 188

$fields <p> associative array that describes the fields and the values that will be inserted
or updated in the specified table. The indexes of the array are the names of all the
fields of the table. The values of the array ar

Execute a SQL REPLACE query. A REPLACE query is identical to a INSERT query,


except that if there is already a row in the table with the same key field values, the
REPLACE query just updates its values instead of inserting a new row.
The REPLACE type of query does not make part of the SQL standards. Since practically only
MySQL implements it natively, this type of query is emulated through this method for other
DBMS using standard types of queries inside a transaction to assure the
<strong>returns</strong> the number of affected rows

Doctrine_Connection_Mysql_Exception

Method Summary
Returns Name Description
boolean processErrorInfo

Method Details
(boolean) processErrorInfo($errorInfo)

Parameter Summary

$errorInfo error info array

This method checks if native error code/message can be converted into a portable
code and then adds this portable error code to $portableCode field
<strong>returns</strong> whether or not the error info processing was successfull (the
process is successfull if portable error code was found)

----------------- Brought to you by


Doctrine_Connection_Oracle 189

Doctrine_Connection_Oracle

Method Summary
Returns Name Description
modifyLimitSubquery
__construct
setDateFormat
string modifyLimitQuery

Method Details
modifyLimitSubquery(( ) $rootTable, $query, $limit = false, $offset =
false, $isManip = false)

Parameter Summary
Creates the SQL for Oracle that can be used in the subquery for the limit-subquery
algorithm.

__construct(( ) $manager, $adapter)

Parameter Summary

setDateFormat($format = 'YYYY-MM-DD HH24:MI:SS')

Parameter Summary
Sets up the date/time format

(string) modifyLimitQuery($query, $limit = false, $offset = false,


$isManip = false)

Parameter Summary

$query query to modify

----------------- Brought to you by


Doctrine_Connection_Oracle_Exception 190

$limit limit the number of rows


$offset start reading from given offset

Adds an driver-specific LIMIT clause to the query


<strong>returns</strong> the modified query

Doctrine_Connection_Oracle_Exception

Method Summary
Returns Name Description
boolean processErrorInfo

Method Details
(boolean) processErrorInfo($errorInfo)

Parameter Summary

$errorInfo error info array

This method checks if native error code/message can be converted into a portable
code and then adds this portable error code to $portableCode field
<strong>returns</strong> whether or not the error info processing was successfull (the
process is successfull if portable error code was found)

----------------- Brought to you by


Doctrine_Connection_Pgsql 191

Doctrine_Connection_Pgsql

Method Summary
Returns Name Description
convertBooleans This method takes care of that conversion
array|string getServerVersion
setCharset
__construct
string modifyLimitQuery

Method Details
convertBooleans($item)

Parameter Summary
convertBoolean some drivers need the boolean values to be converted into integers
when using DQL API
This method takes care of that conversion

(array|string) getServerVersion($native = false)

Parameter Summary

$native determines if the raw version string should be returned

return version information about the server


<strong>returns</strong> an array or string with version information

setCharset($charset)

Parameter Summary

$charset charset

----------------- Brought to you by


Doctrine_Connection_Pgsql_Exception 192

Set the charset on the current connection

__construct(( ) $manager, $adapter, (PDO) $pdo)

Parameter Summary

$pdo database handle

the constructor

(string) modifyLimitQuery($query, $limit = false, $offset = false,


$isManip = false)

Parameter Summary

$query query to modify


$limit limit the number of rows
$offset start reading from given offset
$isManip if the query is a DML query

Changes a query string for various DBMS specific reasons


<strong>returns</strong> modified query

Doctrine_Connection_Pgsql_Exception

Method Summary
Returns Name Description
boolean processErrorInfo the portable error code is added at the end of array

----------------- Brought to you by


Doctrine_Connection_Profiler 193

Method Details
(boolean) processErrorInfo($errorInfo)

Parameter Summary

$errorInfo error info array

This method checks if native error code/message can be converted into a portable
code and then adds this portable error code to $portableCode field
the portable error code is added at the end of array
<strong>returns</strong> whether or not the error info processing was successfull (the
process is successfull if portable error code was found)

Doctrine_Connection_Profiler

Method Summary
Returns Name Description
pop
array getAll
boolean __call
get
__construct
lastEvent
integer count
ArrayIterator getIterator
boolean setFilterQueryType

Method Details
pop()

Parameter Summary
pop the last event from the event stack

----------------- Brought to you by


Doctrine_Connection_Profiler 194

(array) getAll()

Parameter Summary
getAll returns all profiled events as an array
<strong>returns</strong> all events in an array

(boolean) __call($m, $a)

Parameter Summary

$m the name of the method

$a method arguments

method overloader this method is used for invoking different listeners, for the full
list of availible listeners, see Doctrine_EventListener

get($key)

Parameter Summary

__construct()

Parameter Summary
constructor

lastEvent()

Parameter Summary
Get the Doctrine_Event object for the last query that was run, regardless if it has
ended or not. If the event has not ended, it's end time will be Null.

(integer) count()

Parameter Summary

(ArrayIterator) getIterator()

Parameter Summary
getIterator returns an iterator that iterates through the logged events

(boolean) setFilterQueryType($filter)

Parameter Summary

----------------- Brought to you by


Doctrine_Connection_Sqlite 195

Doctrine_Connection_Sqlite

Method Summary
Returns Name Description
dropDatabase
__construct
connect
createDatabase

Method Details
dropDatabase()

Parameter Summary

__construct(( ) $manager, $adapter, (PDO) $pdo)

Parameter Summary

$pdo database handle

the constructor

connect()

Parameter Summary
initializes database functions missing in sqlite

createDatabase()

Parameter Summary

----------------- Brought to you by


Doctrine_Connection_Sqlite_Exception 196

Doctrine_Connection_Sqlite_Exception

Method Summary
Returns Name Description
boolean processErrorInfo

Method Details
(boolean) processErrorInfo($errorInfo)

Parameter Summary

$errorInfo error info array

This method checks if native error code/message can be converted into a portable
code and then adds this portable error code to $portableCode field
<strong>returns</strong> whether or not the error info processing was successfull (the
process is successfull if portable error code was found)

Doctrine_Connection_Statement

Method Summary
Returns Name Description
integer rowCount If the last SQL statement executed by the associated Statement
object was a SELECT statement, some databases may return the
number of rows returned by that statement. However, this

----------------- Brought to you by


Doctrine_Connection_Statement 197

behaviour is not guaranteed for all databases and should not be


relied
boolean closeCursor
string fetchColumn
array errorInfo
mixed fetchObject Fetches the next row and returns it as an object. This function is
an alternative to Doctrine_Adapter_Statement_Interface->fetch()
with Doctrine::FETCH_CLASS or Doctrine::FETCH_OBJ style.
getStatement
boolean setFetchMode
string errorCode
mixed fetch
integer columnCount
boolean bindColumn
boolean bindParam Binds a PHP variable to a corresponding named or question
mark placeholder in the SQL statement that was use to prepare
the statement. Unlike Doctrine_Adapter_Statement_Interface-
>bindValue(), the variable is bound as a reference and will only
be eva
getQuery
__construct
mixed getAttribute
boolean execute If the prepared statement included parameter markers, you must
either: call PDOStatement->bindParam() to bind PHP variables
to the parameter markers: bound variables pass their value as
input and receive the output value, if any, of their associated
array getColumnMeta
getConnection
boolean bindValue
boolean nextRowset Some database servers support stored procedures that return
more than one rowset (also known as a result set). The
nextRowset() method enables you to access the second and
subsequent rowsets associated with a PDOStatement object.
Each rowset can have a
array fetchAll
boolean setAttribute

Method Details
(integer) rowCount()

Parameter Summary

----------------- Brought to you by


Doctrine_Connection_Statement 198

rowCount rowCount() returns the number of rows affected by the last DELETE,
INSERT, or UPDATE statement executed by the corresponding object.
If the last SQL statement executed by the associated Statement object was a SELECT
statement, some databases may return the number of rows returned by that statement.
However, this behaviour is not guaranteed for all databases and should not be relied
<strong>returns</strong> Returns the number of rows.

(boolean) closeCursor()

Parameter Summary
closeCursor Closes the cursor, enabling the statement to be executed again.
<strong>returns</strong> Returns TRUE on success or FALSE on failure.

(string) fetchColumn($columnIndex)

Parameter Summary

$columnIndex 0-indexed number of the column you wish to retrieve from the row. If no
value is supplied, Doctrine_Adapter_Statement_Interface-&gt;fetchColumn()
fetches the first column.

fetchColumn Returns a single column from the next row of a result set or FALSE if
there are no more rows.
<strong>returns</strong> returns a single column in the next row of a result set.

(array) errorInfo()

Parameter Summary
errorInfo Fetch extended error information associated with the last operation on the
statement handle
<strong>returns</strong> error info array

(mixed) fetchObject($className = 'stdClass', $args = array())

Parameter Summary

$className Name of the created class, defaults to stdClass.

$args Elements of this array are passed to the constructor.

fetchObject Fetches the next row and returns it as an object.


Fetches the next row and returns it as an object. This function is an alternative to
Doctrine_Adapter_Statement_Interface-&gt;fetch() with Doctrine::FETCH_CLASS or
Doctrine::FETCH_OBJ style.
<strong>returns</strong> an instance of the required class with property names that
correspond to the column names or FALSE in case of an error.

----------------- Brought to you by


Doctrine_Connection_Statement 199

getStatement()

Parameter Summary

(boolean) setFetchMode($mode, $arg1 = null, $arg2 = null)

Parameter Summary

$mode The fetch mode must be one of the Doctrine::FETCH_* constants.

setFetchMode Set the default fetch mode for this statement


<strong>returns</strong> Returns 1 on success or FALSE on failure.

(string) errorCode()

Parameter Summary
errorCode Fetch the SQLSTATE associated with the last operation on the statement
handle
<strong>returns</strong> error code string

(mixed) fetch($fetchMode = Doctrine::FETCH_BOTH, $cursorOrientation


= Doctrine::FETCH_ORI_NEXT, $cursorOffset = null, $fetchStyle)

Parameter Summary

$cursorOrientation For a PDOStatement object representing a scrollable cursor, this value


determines which row will be returned to the caller. This value must be
one of the Doctrine::FETCH_ORI_* constants, defaultin
$cursorOffset <p> For a Doctrine_Adapter_Statement_Interface object representing a
scrollable cursor for which the $cursorOrientation parameter is set to
Doctrine::FETCH_ORI_ABS, this value specifies
$fetchStyle Controls how the next row will be returned to the caller. This value
must be one of the Doctrine::FETCH_* constants, defaulting to
Doctrine::FETCH_BOTH

(integer) columnCount()

Parameter Summary
columnCount Returns the number of columns in the result set
<strong>returns</strong> Returns the number of columns in the result set represented by
the Doctrine_Adapter_Statement_Interface object. If there is no result set, this method should
return 0.

----------------- Brought to you by


Doctrine_Connection_Statement 200

(boolean) bindColumn($column, $param, $type = null)

Parameter Summary

$column Number of the column (1-indexed) or name of the column in the result set. If using
the column name, be aware that the name should match the case of the column, as
returned by the driver.
$param Name of the PHP variable to which the column will be bound.
$type Data type of the parameter, specified by the Doctrine::PARAM_* constants.

bindColumn Bind a column to a PHP variable


<strong>returns</strong> Returns TRUE on success or FALSE on failure

(boolean) bindParam($column, [[[amp]]]$variable, $type = null, $length


= null, $driverOptions = array(), $param, $variable)

Parameter Summary

$type Explicit data type for the parameter using the Doctrine::PARAM_* constants. To
return an INOUT parameter from a stored procedure, use the bitwise OR
operator to set the Doctrine::PARAM_INPUT_OUTPUT bits f
$length Length of the data type. To indicate that a parameter is an OUT parameter from a
stored procedure, you must explicitly set the length.
$param Parameter identifier. For a prepared statement using named placeholders, this
will be a parameter name of the form :name. For a prepared statement using
question mark placeholders, this will be the 1-inde
$variable Name of the PHP variable to bind to the SQL statement parameter.

Binds a PHP variable to a corresponding named or question mark placeholder in the SQL
statement that was use to prepare the statement. Unlike
Doctrine_Adapter_Statement_Interface-&gt;bindValue(), the variable is bound as a reference
and will only be eva
<strong>returns</strong> Returns TRUE on success or FALSE on failure.

getQuery()

Parameter Summary

__construct(( ) $conn, $stmt)

Parameter Summary

$conn Doctrine_Connection object, every connection statement holds an instance of


Doctrine_Connection

constructor

----------------- Brought to you by


Doctrine_Connection_Statement 201

(mixed) getAttribute($attribute)

Parameter Summary
getAttribute Retrieve a statement attribute
<strong>returns</strong> the attribute value

(boolean) execute($params = null)

Parameter Summary

$params An array of values with as many elements as there are bound parameters in the
SQL statement being executed.

execute Executes a prepared statement


If the prepared statement included parameter markers, you must either: call
PDOStatement-&gt;bindParam() to bind PHP variables to the parameter markers: bound
variables pass their value as input and receive the output value, if any, of their associated
<strong>returns</strong> Returns TRUE on success or FALSE on failure.

(array) getColumnMeta($column)

Parameter Summary

$column The 0-indexed column in the result set.

getColumnMeta Returns metadata for a column in a result set


<strong>returns</strong> <p>Associative meta data array with the following
structure:</p> <p>native_type The PHP native type used to represent the column value.
driver:decl_ type The SQL type used to represen

getConnection()

Parameter Summary
getConnection returns the connection object this statement uses

(boolean) bindValue($param, $value, $type = null)

Parameter Summary

$param Parameter identifier. For a prepared statement using named placeholders, this will
be a parameter name of the form :name. For a prepared statement using question
mark placeholders, this will be the 1-inde
$value The value to bind to the parameter.
$type Explicit data type for the parameter using the Doctrine::PARAM_* constants.

----------------- Brought to you by


Doctrine_Connection_Statement 202

bindValue Binds a value to a corresponding named or question mark placeholder in


the SQL statement that was use to prepare the statement.
<strong>returns</strong> Returns TRUE on success or FALSE on failure.

(boolean) nextRowset()

Parameter Summary
nextRowset Advances to the next rowset in a multi-rowset statement handle
Some database servers support stored procedures that return more than one rowset (also
known as a result set). The nextRowset() method enables you to access the second and
subsequent rowsets associated with a PDOStatement object. Each rowset can have a
<strong>returns</strong> Returns TRUE on success or FALSE on failure.

(array) fetchAll($fetchMode = Doctrine::FETCH_BOTH, $columnIndex =


null)

Parameter Summary

$fetchMode Controls how the next row will be returned to the caller. This value must be
one of the Doctrine::FETCH_* constants, defaulting to
Doctrine::FETCH_BOTH
$columnIndex Returns the indicated 0-indexed column when the value of $fetchStyle is
Doctrine::FETCH_COLUMN. Defaults to 0.

fetchAll Returns an array containing all of the result set rows

(boolean) setAttribute($attribute, $value)

Parameter Summary

$value the value of given attribute

setAttribute Set a statement attribute


<strong>returns</strong> Returns TRUE on success or FALSE on failure.

----------------- Brought to you by


Doctrine_Connection_UnitOfWork 203

Doctrine_Connection_UnitOfWork

Method Summary
Returns Name Description
boolean update
saveAll
processSingleInsert
saveAssociations this method takes a diff of one-to-many / many-to-many
original and current collections and applies the changes for
example if original many-to-many related collection has
records with primary keys 1,2 and 3 and the new collection
has records with prima
boolean delete this event can be listened by the onPreDelete and onDelete
listeners
saveGraph (The save() operation is always cascaded in 0.10/1.0).
save
_cascadeDelete This is an application-level cascade. Related objects that
participate in the cascade and are not yet loaded are fetched
from the database. Exception: many-valued relations are
always (re-)fetched from the database to make sure we have
all of them.
boolean insert
array buildFlushTree The returned array has all the initialized components in
'correct' order. Basically this means that the records of those
components can be saved safely in the order specified by the
returned array.
saveRelated

----------------- Brought to you by


Doctrine_Connection_UnitOfWork 204

Method Details
(boolean) update(( ) $record)

Parameter Summary

$record record to be updated

updates given record


<strong>returns</strong> whether or not the update was successful

saveAll()

Parameter Summary
saveAll persists all the pending records from all tables
<strong>throws</strong> PDOException if something went wrong at database level

processSingleInsert(( ) $record)

Parameter Summary

saveAssociations(( ) $record)

Parameter Summary
this method takes a diff of one-to-many / many-to-many original and current collections and
applies the changes for example if original many-to-many related collection has records with
primary keys 1,2 and 3 and the new collection has records with prima
<strong>throws</strong> Doctrine_Connection_Exception if something went wrong at
database level

(boolean) delete(( ) $record)

Parameter Summary
Deletes the given record and all the related records that participate in an
application-level delete cascade.
this event can be listened by the onPreDelete and onDelete listeners
<strong>returns</strong> true on success, false on failure

saveGraph(( ) $record)

Parameter Summary
Saves the given record and all associated records.
(The save() operation is always cascaded in 0.10/1.0).

----------------- Brought to you by


Doctrine_Connection_UnitOfWork 205

save(( ) $record)

Parameter Summary
saves the given record

_cascadeDelete(( ) $record, [[[amp]]]$deletions)

Parameter Summary

$record The record for which the delete operation will be cascaded.

Cascades an ongoing delete operation to related objects. Applies only on relations


that have 'delete' in their cascade options.
This is an application-level cascade. Related objects that participate in the cascade and are
not yet loaded are fetched from the database. Exception: many-valued relations are always
(re-)fetched from the database to make sure we have all of them.
<strong>throws</strong> PDOException If something went wrong at database level

(boolean) insert(( ) $record)

Parameter Summary

$record record to be inserted

inserts a record into database

(array) buildFlushTree($tables)

Parameter Summary

$tables an array of Doctrine_Table objects or component names

buildFlushTree builds a flush tree that is used in transactions


The returned array has all the initialized components in &apos;correct&apos; order. Basically
this means that the records of those components can be saved safely in the order specified by
the returned array.
<strong>returns</strong> an array of component names in flushing order

saveRelated(( ) $record)

Parameter Summary
saveRelated saves all related records to $record
<strong>throws</strong> PDOException if something went wrong at database level

----------------- Brought to you by


Doctrine_Data 206

Doctrine_Data

Method Summary
Returns Name Description
getFormats Get array of available formats
importData Interface for importing data from fixture files to Doctrine
models
isRelation Check if a fieldName on a Doctrine_Record is a relation, if it
is we return that relationData
getModels Get the array of specified models to work with
setModels Set the array of specified models to work with
getFormat Get the current format we are working with
setFormat Set the current format we are working with
exportData Interface for exporting data to fixtures files from Doctrine
models
getDirectory Get directory for dumping/loading data from and to
setDirectory Set the array/string of directories or yml file paths
purge Purge all data for loaded models or for the passed array of
Doctrine_Records
bool exportIndividualFiles Set/Get whether or not to export individual files

Method Details
getFormats()

Parameter Summary
Get array of available formats

----------------- Brought to you by


Doctrine_Data 207

importData($directory, $format = 'yml', $models = array(), $append =


false)

Parameter Summary
Interface for importing data from fixture files to Doctrine models

isRelation(( ) $record, $fieldName, $Doctrine_Record)

Parameter Summary
Check if a fieldName on a Doctrine_Record is a relation, if it is we return that relationData

getModels()

Parameter Summary
Get the array of specified models to work with

setModels($models)

Parameter Summary
Set the array of specified models to work with

getFormat()

Parameter Summary
Get the current format we are working with

setFormat($format)

Parameter Summary
Set the current format we are working with

exportData($directory, $format = 'yml', $models = array(),


$_exportIndividualFiles = false)

Parameter Summary
Interface for exporting data to fixtures files from Doctrine models

getDirectory()

Parameter Summary
Get directory for dumping/loading data from and to

----------------- Brought to you by


Doctrine_Data_Export 208

setDirectory($directory)

Parameter Summary
Set the array/string of directories or yml file paths

purge($models = null)

Parameter Summary
Purge all data for loaded models or for the passed array of Doctrine_Records

(bool) exportIndividualFiles($bool = null)

Parameter Summary
_exportIndividualFiles
Set/Get whether or not to export individual files

Doctrine_Data_Export

Method Summary
Returns Name Description
dumpData Dump the prepared data to the fixtures files
__construct
array prepareData Prepare the raw data to be exported with the parser

doExport FIXME: This function has ugly hacks in it for temporarily disabling
INDEXBY query parts of tables to export. Update from jwage: I am
not sure if their is any other better solution for this. It may be the
correct solution to disable the indexBy settings

Method Details
dumpData($data, $array)

Parameter Summary

----------------- Brought to you by


Doctrine_Data_Import 209

Dump the prepared data to the fixtures files

__construct($directory)

Parameter Summary
constructor

(array) prepareData($data)

Parameter Summary
Prepare the raw data to be exported with the parser

doExport()

Parameter Summary
FIXME: This function has ugly hacks in it for temporarily disabling INDEXBY query parts of
tables to export. Update from jwage: I am not sure if their is any other better solution for this.
It may be the correct solution to disable the indexBy settings

Doctrine_Data_Import

Method Summary
Returns Name Description
_loadData
doImport
_getImportedObject
_buildRows
__construct
_processRow
_loadNestedSetData
_buildNestedSetRows
array doParsing

----------------- Brought to you by


Doctrine_Data_Import 210

Method Details
_loadData($array)

Parameter Summary
Perform the loading of the data from the passed array

doImport($append = false)

Parameter Summary
Do the importing of the data parsed from the fixtures

_getImportedObject($rowKey, ( ) $record, $relationName,


$referringRowKey)

Parameter Summary
Get the unsaved object for a specified row key and validate that it is the valid object
class for the passed record and relation name
<strong>throws</strong> Doctrine_Data_Exception

_buildRows($className, $data)

Parameter Summary
Recursively loop over all data fixtures and build the array of className rows

__construct($directory = null)

Parameter Summary
Optionally pass the directory/path to the yaml for importing

_processRow($rowKey, $row)

Parameter Summary
Process a row and make all the appropriate relations between the imported data

_loadNestedSetData($model, $nestedSetData, $parent = null)

Parameter Summary
Load nested set data for models with nested set enabled

----------------- Brought to you by


Doctrine_DataDict 211

_buildNestedSetRows($className, $data)

Parameter Summary
Build the rows for nested set models

(array) doParsing()

Parameter Summary
Do the parsing of the yaml files and return the final parsed array

Doctrine_DataDict

Method Summary
Returns Name Description
array compareDefinition
string parseBoolean

Method Details
(array) compareDefinition($current, $previous)

Parameter Summary

$current new definition


$previous old definition

Obtain an array of changes that may need to applied


<strong>returns</strong> containing all changes that will need to be applied

----------------- Brought to you by


Doctrine_DataDict_Firebird 212

(string) parseBoolean($value)

Parameter Summary

$value boolean value to be parsed

parseBoolean parses a literal boolean value and returns proper sql equivalent
<strong>returns</strong> parsed boolean value

Doctrine_DataDict_Firebird

Method Summary
Returns Name Description
string getCharsetFieldDeclaration
string getCollationFieldDeclaration
string getNativeDeclaration
array getPortableDeclaration

Method Details
(string) getCharsetFieldDeclaration($charset)

Parameter Summary

$charset name of the charset

Obtain DBMS specific SQL code portion needed to set the CHARACTER SET of a field
declaration to be used in statements like CREATE TABLE.
<strong>returns</strong> DBMS specific SQL code portion needed to set the CHARACTER
SET of a field declaration.

(string) getCollationFieldDeclaration($collation)

Parameter Summary

$collation name of the collation

----------------- Brought to you by


Doctrine_DataDict_Informix 213

Obtain DBMS specific SQL code portion needed to set the COLLATION of a field
declaration to be used in statements like CREATE TABLE.
<strong>returns</strong> DBMS specific SQL code portion needed to set the COLLATION
of a field declaration.

(string) getNativeDeclaration($field)

Parameter Summary

$field <p> associative array with the name of the properties of the field being declared as
array indexes. Currently, the types of supported field properties are as follows: </p>
<p> length Integer val

Obtain DBMS specific SQL code portion needed to declare an text type field to be
used in statements like CREATE TABLE.
<strong>returns</strong> DBMS specific SQL code portion that should be used to declare
the specified field.

(array) getPortableDeclaration($field)

Parameter Summary

$field native field description

Maps a native array description of a field to a Doctrine datatype and length


<strong>returns</strong> containing the various possible types, length, sign, fixed

Doctrine_DataDict_Informix

Method Summary
Returns Name Description
string getNativeDeclaration

----------------- Brought to you by


Doctrine_DataDict_Mssql 214

Method Details
(string) getNativeDeclaration($field)

Parameter Summary

$field <p> associative array with the name of the properties of the field being declared as
array indexes. Currently, the types of supported field properties are as follows: </p>
<p> length Integer val

Obtain DBMS specific SQL code portion needed to declare an text type field to be
used in statements like CREATE TABLE.
<strong>returns</strong> DBMS specific SQL code portion that should be used to declare
the specified field.

Doctrine_DataDict_Mssql

Method Summary
Returns Name Description
string getNativeDeclaration
array getPortableDeclaration

Method Details
(string) getNativeDeclaration($field)

Parameter Summary

$field <p> associative array with the name of the properties of the field being declared as
array indexes. Currently, the types of supported field properties are as follows: </p>
<p> length Integer val

Obtain DBMS specific SQL code portion needed to declare an text type field to be
used in statements like CREATE TABLE.
<strong>returns</strong> DBMS specific SQL code portion that should be used to declare
the specified field.

----------------- Brought to you by


Doctrine_DataDict_Mysql 215

(array) getPortableDeclaration($field)

Parameter Summary

$field native field description

Maps a native array description of a field to a MDB2 datatype and length


<strong>returns</strong> containing the various possible types, length, sign, fixed

Doctrine_DataDict_Mysql

Method Summary
Returns Name Description
string getIntegerDeclaration
string getCharsetFieldDeclaration
string getCollationFieldDeclaration
string getNativeDeclaration
array getPortableDeclaration

Method Details
(string) getIntegerDeclaration($name, $field)

Parameter Summary

$name name the field to be declared.

$field <p> associative array with the name of the properties of the field being declared as
array indexes. Currently, the types of supported field properties are as follows: </p>
<p> unsigned

Obtain DBMS specific SQL code portion needed to declare an integer type field to be
used in statements like CREATE TABLE.
<strong>returns</strong> DBMS specific SQL code portion that should be used to declare
the specified field.

----------------- Brought to you by


Doctrine_DataDict_Mysql 216

(string) getCharsetFieldDeclaration($charset)

Parameter Summary

$charset name of the charset

Obtain DBMS specific SQL code portion needed to set the CHARACTER SET of a field
declaration to be used in statements like CREATE TABLE.
<strong>returns</strong> DBMS specific SQL code portion needed to set the CHARACTER
SET of a field declaration.

(string) getCollationFieldDeclaration($collation)

Parameter Summary

$collation name of the collation

Obtain DBMS specific SQL code portion needed to set the COLLATION of a field
declaration to be used in statements like CREATE TABLE.
<strong>returns</strong> DBMS specific SQL code portion needed to set the COLLATION
of a field declaration.

(string) getNativeDeclaration($field)

Parameter Summary

$field <p> associative array with the name of the properties of the field being declared as
array indexes. Currently, the types of supported field properties are as follows: </p>
<p> length Integer val

Obtain DBMS specific SQL code portion needed to declare an text type field to be
used in statements like CREATE TABLE.
<strong>returns</strong> DBMS specific SQL code portion that should be used to declare
the specified field.

(array) getPortableDeclaration($field)

Parameter Summary

$field native field description

Maps a native array description of a field to a MDB2 datatype and length


<strong>returns</strong> containing the various possible types, length, sign, fixed

----------------- Brought to you by


Doctrine_DataDict_Oracle 217

Doctrine_DataDict_Oracle

Method Summary
Returns Name Description
string getNativeDeclaration
array getPortableDeclaration

Method Details
(string) getNativeDeclaration($field)

Parameter Summary

$field <p> associative array with the name of the properties of the field being declared as
array indexes. Currently, the types of supported field properties are as follows: </p>
<p> length Integer val

Obtain DBMS specific SQL code portion needed to declare an text type field to be
used in statements like CREATE TABLE.
<strong>returns</strong> DBMS specific SQL code portion that should be used to declare
the specified field.

(array) getPortableDeclaration($field)

Parameter Summary

$field native field description

Maps a native array description of a field to a doctrine datatype and length


<strong>returns</strong> containing the various possible types, length, sign, fixed
<strong>throws</strong> Doctrine_DataDict_Oracle_Exception

----------------- Brought to you by


Doctrine_DataDict_Pgsql 218

Doctrine_DataDict_Pgsql

Method Summary
Returns Name Description
string getIntegerDeclaration
string getNativeDeclaration
array getPortableDeclaration
string parseBoolean

Method Details
(string) getIntegerDeclaration($name, $field)

Parameter Summary

$name name the field to be declared.

$field <p> associative array with the name of the properties of the field being declared as
array indexes. Currently, the types of supported field properties are as follows: </p>
<p> unsigned Boolea

Obtain DBMS specific SQL code portion needed to declare an integer type field to be
used in statements like CREATE TABLE.
<strong>returns</strong> DBMS specific SQL code portion that should be used to declare
the specified field.

(string) getNativeDeclaration($field)

Parameter Summary

$field <p> associative array with the name of the properties of the field being declared as
array indexes. Currently, the types of supported field properties are as follows: </p>
<p> length Integer val

Obtain DBMS specific SQL code portion needed to declare an text type field to be
used in statements like CREATE TABLE.

----------------- Brought to you by


Doctrine_DataDict_Sqlite 219

<strong>returns</strong> DBMS specific SQL code portion that should be used to declare
the specified field.

(array) getPortableDeclaration($field)

Parameter Summary

$field native field description

Maps a native array description of a field to a portable Doctrine datatype and length
<strong>returns</strong> containing the various possible types, length, sign, fixed

(string) parseBoolean($value)

Parameter Summary

$value boolean value to be parsed

parseBoolean parses a literal boolean value and returns proper sql equivalent
<strong>returns</strong> parsed boolean value

Doctrine_DataDict_Sqlite

Method Summary
Returns Name Description
string getIntegerDeclaration
string getNativeDeclaration
array getPortableDeclaration

Method Details
(string) getIntegerDeclaration($name, $field)

Parameter Summary

$name name the field to be declared.

----------------- Brought to you by


Doctrine_DataType 220

$field <p> associative array with the name of the properties of the field being declared as
array indexes. Currently, the types of supported field properties are as follows: </p>
<p> unsigned

Obtain DBMS specific SQL code portion needed to declare an integer type field to be
used in statements like CREATE TABLE.
<strong>returns</strong> DBMS specific SQL code portion that should be used to declare
the specified field.

(string) getNativeDeclaration($field)

Parameter Summary

$field <p> associative array with the name of the properties of the field being declared as
array indexes. Currently, the types of supported field properties are as follows: </p>
<p> length Integer val

Obtain DBMS specific SQL code portion needed to declare an text type field to be
used in statements like CREATE TABLE.
<strong>returns</strong> DBMS specific SQL code portion that should be used to declare
the specified field.

(array) getPortableDeclaration($field)

Parameter Summary

$field native field description

Maps a native array description of a field to Doctrine datatype and length


<strong>returns</strong> containing the various possible types, length, sign, fixed

Doctrine_DataType

Method Summary
Returns Name Description
getName
getDefaultLength
__construct

----------------- Brought to you by


Doctrine_Event 221

Method Details
getName()

Parameter Summary

getDefaultLength()

Parameter Summary

__construct()

Parameter Summary

Doctrine_Event

Method Summary
Returns Name Description
string getName
integer getCode
array getParams
start
mixed __get
getQuery
__construct
getInvoker
end
set
boolean hasEnded
mixed getElapsedSecs
__set
setInvoker
skipOperation

----------------- Brought to you by


Doctrine_Event 222

Method Details
(string) getName()

Parameter Summary
getName returns the name of this event
<strong>returns</strong> the name of this event

(integer) getCode()

Parameter Summary
<strong>returns</strong> returns the code associated with this event

(array) getParams()

Parameter Summary
getParams returns the parameters of the query
<strong>returns</strong> parameters of the query

start()

Parameter Summary
start starts the internal timer of this event
<strong>returns</strong> this object

(mixed) __get($option)

Parameter Summary

$option the name of the option

getOption returns the value of an option

getQuery()

Parameter Summary
<strong>returns</strong> returns the query associated with this event (if any)

----------------- Brought to you by


Doctrine_Event 223

__construct((Doctrine_Connection|Doctrine_Connection_Statement|)
$invoker, $code, $query = null, $params = array())

Parameter Summary

$code the event code


$query the sql query associated with this event (if any)

constructor

getInvoker()

Parameter Summary
getInvoker returns the handler that invoked this event
<strong>returns</strong> Doctrine_Connection_UnitOfWork|Doctrine_Transaction the
handler that invoked this event

end()

Parameter Summary
end ends the internal timer of this event
<strong>returns</strong> this object

set($option, [[[amp]]]$value, $value)

Parameter Summary

$option the name of the option

$value the value of the given option

setOption sets the value of an option by reference


<strong>returns</strong> this object

(boolean) hasEnded()

Parameter Summary
hasEnded whether or not this event has ended

(mixed) getElapsedSecs()

Parameter Summary
Get the elapsed time (in microseconds) that the event ran. If the event has not yet
ended, return false.

----------------- Brought to you by


Doctrine_EventListener 224

__set($option, $value)

Parameter Summary

$option the name of the option

$value the value of the given option

setOption sets the value of an option


<strong>returns</strong> this object

setInvoker($invoker)

Parameter Summary
setInvoker Defines new invoker (used in Hydrator)

skipOperation()

Parameter Summary
skipOperation skips the next operation an alias for __set('skipOperation', true)
<strong>returns</strong> this object

Doctrine_EventListener

Method Summary
Returns Name Description
postSavepointRollback
postTransactionRollback
postClose
postSavepointCommit
preTransactionBegin
preSavepointRollback
preFetch
postExec
preConnect

----------------- Brought to you by


Doctrine_EventListener 225

preSavepointCreate
preTransactionCommit
preError
preStmtExecute
onCollectionDelete
prePrepare
postSavepointCreate
preFetchAll
preClose
preSavepointCommit
preQuery
postTransactionBegin
postStmtExecute
preTransactionRollback
postError
postConnect
postFetchAll
postFetch
onOpen
postPrepare
onPreCollectionDelete
postTransactionCommit
preExec
postQuery

Method Details
postSavepointRollback(( ) $event)

Parameter Summary

postTransactionRollback(( ) $event)

Parameter Summary

postClose(( ) $event)

Parameter Summary

----------------- Brought to you by


Doctrine_EventListener 226

postSavepointCommit(( ) $event)

Parameter Summary

preTransactionBegin(( ) $event)

Parameter Summary

preSavepointRollback(( ) $event)

Parameter Summary

preFetch(( ) $event)

Parameter Summary

postExec(( ) $event)

Parameter Summary

preConnect(( ) $event)

Parameter Summary

preSavepointCreate(( ) $event)

Parameter Summary

preTransactionCommit(( ) $event)

Parameter Summary

preError(( ) $event)

Parameter Summary

preStmtExecute(( ) $event)

Parameter Summary

onCollectionDelete(( ) $collection)

Parameter Summary

----------------- Brought to you by


Doctrine_EventListener 227

prePrepare(( ) $event)

Parameter Summary

postSavepointCreate(( ) $event)

Parameter Summary

preFetchAll(( ) $event)

Parameter Summary

preClose(( ) $event)

Parameter Summary

preSavepointCommit(( ) $event)

Parameter Summary

preQuery(( ) $event)

Parameter Summary

postTransactionBegin(( ) $event)

Parameter Summary

postStmtExecute(( ) $event)

Parameter Summary

preTransactionRollback(( ) $event)

Parameter Summary

postError(( ) $event)

Parameter Summary

postConnect(( ) $event)

Parameter Summary

----------------- Brought to you by


Doctrine_EventListener 228

postFetchAll(( ) $event)

Parameter Summary

postFetch(( ) $event)

Parameter Summary

onOpen(( ) $connection)

Parameter Summary

postPrepare(( ) $event)

Parameter Summary

onPreCollectionDelete(( ) $collection)

Parameter Summary

postTransactionCommit(( ) $event)

Parameter Summary

preExec(( ) $event)

Parameter Summary

postQuery(( ) $event)

Parameter Summary

----------------- Brought to you by


Doctrine_EventListener_Chain 229

Doctrine_EventListener_Chain

Method Summary
Returns Name Description
add
onSleep
postTransactionRollback
postClose
preTransactionBegin
preFetch
postExec
preConnect
mixed get
preTransactionCommit
onPreLoad
preError
preStmtExecute
onCollectionDelete
prePrepare
onLoad
preFetchAll
preClose
preQuery
postTransactionBegin
postStmtExecute
preTransactionRollback
postError
set
onWakeUp
postConnect
postFetchAll
postFetch

----------------- Brought to you by


Doctrine_EventListener_Chain 230

onOpen
postPrepare
onPreCollectionDelete
postTransactionCommit
preExec
postQuery

Method Details
add($listener, $name = null)

Parameter Summary
add adds a listener to the chain of listeners

onSleep(( ) $record)

Parameter Summary
onSleep an event invoked when Doctrine_Record is serialized

postTransactionRollback(( ) $event)

Parameter Summary
onTransactionRollback an event invoked after a Doctrine_Connection transaction is
being rolled back

postClose(( ) $event)

Parameter Summary
postClose an event invoked after Doctrine_Connection is closed

preTransactionBegin(( ) $event)

Parameter Summary
onTransactionBegin an event invoked before a Doctrine_Connection transaction is
being started

preFetch(( ) $event)

Parameter Summary

----------------- Brought to you by


Doctrine_EventListener_Chain 231

postExec(( ) $event)

Parameter Summary

preConnect(( ) $event)

Parameter Summary

(mixed) get($key)

Parameter Summary
returns a Doctrine_EventListener on success and null on failure

preTransactionCommit(( ) $event)

Parameter Summary
onPreTransactionCommit an event invoked before a Doctrine_Connection
transaction is committed

onPreLoad(( ) $record)

Parameter Summary
onPreLoad an event invoked when Doctrine_Record is being loaded from database
but not yet initialized

preError(( ) $event)

Parameter Summary

preStmtExecute(( ) $event)

Parameter Summary

onCollectionDelete(( ) $collection)

Parameter Summary
onCollectionDelete an event invoked after a Doctrine_Collection is being deleted

prePrepare(( ) $event)

Parameter Summary

----------------- Brought to you by


Doctrine_EventListener_Chain 232

onLoad(( ) $record)

Parameter Summary
onLoad an event invoked when Doctrine_Record is being loaded from database

preFetchAll(( ) $event)

Parameter Summary

preClose(( ) $event)

Parameter Summary
preClose an event invoked before Doctrine_Connection is closed

preQuery(( ) $event)

Parameter Summary

postTransactionBegin(( ) $event)

Parameter Summary
onTransactionBegin an event invoked after a Doctrine_Connection transaction has
been started

postStmtExecute(( ) $event)

Parameter Summary

preTransactionRollback(( ) $event)

Parameter Summary
onPreTransactionRollback an event invoked before a Doctrine_Connection
transaction is being rolled back

postError(( ) $event)

Parameter Summary

set($key, (Doctrine_EventListener) $listener)

Parameter Summary

----------------- Brought to you by


Doctrine_EventListener_Chain 233

onWakeUp(( ) $record)

Parameter Summary
onWakeUp an event invoked when Doctrine_Record is unserialized

postConnect(( ) $event)

Parameter Summary

postFetchAll(( ) $event)

Parameter Summary

postFetch(( ) $event)

Parameter Summary

onOpen(( ) $connection)

Parameter Summary
onOpen an event invoked after Doctrine_Connection is opened

postPrepare(( ) $event)

Parameter Summary

onPreCollectionDelete(( ) $collection)

Parameter Summary
onCollectionDelete an event invoked after a Doctrine_Collection is being deleted

postTransactionCommit(( ) $event)

Parameter Summary
onTransactionCommit an event invoked after a Doctrine_Connection transaction is
committed

preExec(( ) $event)

Parameter Summary

----------------- Brought to you by


Doctrine_EventListener_Interface 234

postQuery(( ) $event)

Parameter Summary

Doctrine_EventListener_Interface

Method Summary
Returns Name Description
postTransactionRollback
preTransactionBegin
preFetch
postExec
preConnect
preTransactionCommit
preError
preStmtExecute
prePrepare
preFetchAll
preQuery
postTransactionBegin
postStmtExecute
preTransactionRollback
postError
postConnect
postFetchAll
postFetch
postPrepare
postTransactionCommit
preExec
postQuery

----------------- Brought to you by


Doctrine_EventListener_Interface 235

Method Details
postTransactionRollback(( ) $event)

Parameter Summary

preTransactionBegin(( ) $event)

Parameter Summary

preFetch(( ) $event)

Parameter Summary

postExec(( ) $event)

Parameter Summary

preConnect(( ) $event)

Parameter Summary

preTransactionCommit(( ) $event)

Parameter Summary

preError(( ) $event)

Parameter Summary

preStmtExecute(( ) $event)

Parameter Summary

prePrepare(( ) $event)

Parameter Summary

preFetchAll(( ) $event)

Parameter Summary

preQuery(( ) $event)

Parameter Summary

----------------- Brought to you by


Doctrine_EventListener_Interface 236

postTransactionBegin(( ) $event)

Parameter Summary

postStmtExecute(( ) $event)

Parameter Summary

preTransactionRollback(( ) $event)

Parameter Summary

postError(( ) $event)

Parameter Summary

postConnect(( ) $event)

Parameter Summary

postFetchAll(( ) $event)

Parameter Summary

postFetch(( ) $event)

Parameter Summary

postPrepare(( ) $event)

Parameter Summary

postTransactionCommit(( ) $event)

Parameter Summary

preExec(( ) $event)

Parameter Summary

postQuery(( ) $event)

Parameter Summary

----------------- Brought to you by


Doctrine_Exception 237

Doctrine_Exception

Method Summary
Returns Name Description
string errorMessage

Method Details
(string) errorMessage((int|array) $value = null)

Parameter Summary

$value integer error code, null to get the current error code-message map, or an array with
a new error code-message map

Return a textual error message for a Doctrine error code


<strong>returns</strong> error message

Doctrine_Export

Method Summary
Returns Name Description
exportSchema if the directory parameter is given this method
first iterates recursively trhough the given
directory in order to find any model classes Then
it iterates through all declared classes and

----------------- Brought to you by


Doctrine_Export 238

creates tables for the ones that extend


Doctrine_Record and are n
dropDatabaseSql
array exportGeneratorsSql
createConstraintSql
dropSequence
string createIndexSql
string getDeclaration
string createTableSql
string getDefaultFieldDeclaration
string getNotNullFieldDeclaration
string getAdvancedForeignKeyOptions
dropDatabase
exportSortedClassesSql
exportClassesSql
string getCharsetFieldDeclaration
string getCollationFieldDeclaration
dropIndex
dropSequenceSql
createConstraint
string alterTableSql
boolean exportTable
string getForeignKeyBaseDeclaration
string createForeignKeySql
string getCheckDeclaration
exportClasses FIXME: This function has ugly hacks in it to
make sure sql is inserted in the correct order.
dropTable
exportSql if the directory parameter is given this method
first iterates recursively trhough the given
directory in order to find any model classes Then
it iterates through all declared classes and
creates tables for the ones that extend
Doctrine_Record and are n
getForeignKeyReferentialAction returns given referential action in uppercase if
valid, otherwise throws an exception
alterTable
string dropIndexSql
string dropTableSql
dropConstraint
createSequence

----------------- Brought to you by


Doctrine_Export 239

createIndex
string getUniqueFieldDeclaration
string getForeignKeyDeclaration
string getTemporaryTableQuery Should be overridden in driver classes to return
the correct string for the specific database type.
The default is to return the string "TEMPORARY"
- this will result in a SQL error for any database
that does not support temporary tables, or t
dropForeignKey
string createSequenceSql
string getIndexDeclaration
array getAllGenerators
createDatabase
string createForeignKey
string getFieldDeclarationList
createTable
string createDatabaseSql
string getIndexFieldDeclarationList

Method Details
exportSchema($directory = null)

Parameter Summary

$directory optional directory parameter

exportSchema method for exporting Doctrine_Record classes to a schema


if the directory parameter is given this method first iterates recursively trhough the given
directory in order to find any model classes Then it iterates through all declared classes and
creates tables for the ones that extend Doctrine_Record and are n
<strong>throws</strong> Doctrine_Connection_Exception if some error other than
Doctrine::ERR_ALREADY_EXISTS occurred during the create table operation

dropDatabaseSql($database, $name)

Parameter Summary

$name name of the database that should be dropped

drop an existing database (this method is implemented by the drivers)

----------------- Brought to you by


Doctrine_Export 240

(array) exportGeneratorsSql(( ) $table)

Parameter Summary

$table the table in which the generators belong to

exportGeneratorsSql exports plugin tables for given table


<strong>returns</strong> an array of sql strings

createConstraintSql($table, $name, $definition)

Parameter Summary

$table name of the table on which the constraint is to be created


$name name of the constraint to be created
$definition <p> associative array that defines properties of the constraint to be created.
Currently, only one property named FIELDS is supported. This property is also
an associative with the names of

create a constraint on a table

dropSequence($sequenceName)

Parameter Summary

$sequenceName name of the sequence to be dropped

dropSequenceSql drop existing sequence (this method is implemented by the


drivers)
<strong>throws</strong> Doctrine_Connection_Exception if something fails at database
level

(string) createIndexSql($table, $name, $definition)

Parameter Summary

$table name of the table on which the index is to be created


$name name of the index to be created
$definition associative array that defines properties of the index to be created.

Get the stucture of a field into an array

----------------- Brought to you by


Doctrine_Export 241

(string) getDeclaration($name, $field)

Parameter Summary

$name name the field to be declared.

$field <p> associative array with the name of the properties of the field being declared as
array indexes. Currently, the types of supported field properties are as follows: </p>
<p> length Integer val

Obtain DBMS specific SQL code portion needed to declare a generic type field to be
used in statements like CREATE TABLE.
<strong>returns</strong> DBMS specific SQL code portion that should be used to declare
the specified field.

(string) createTableSql($name, $fields, $options = array())

Parameter Summary

$name Name of the database that should be created


$fields Associative array that contains the definition of each field of the new table The
indexes of the array entries are the names of the fields of the table an the array
entry values are associ
$options An associative array of table options:

create a new table

(string) getDefaultFieldDeclaration($field)

Parameter Summary

$field field definition array

getDefaultDeclaration Obtain DBMS specific SQL code portion needed to set a


default value declaration to be used in statements like CREATE TABLE.
<strong>returns</strong> DBMS specific SQL code portion needed to set a default value

(string) getNotNullFieldDeclaration($definition, $field)

Parameter Summary

$field field definition array

getNotNullFieldDeclaration Obtain DBMS specific SQL code portion needed to set a


NOT NULL declaration to be used in statements like CREATE TABLE.
<strong>returns</strong> DBMS specific SQL code portion needed to set a default value

----------------- Brought to you by


Doctrine_Export 242

(string) getAdvancedForeignKeyOptions($definition)

Parameter Summary

$definition foreign key definition

getAdvancedForeignKeyOptions Return the FOREIGN KEY query section dealing


with non-standard options as MATCH, INITIALLY DEFERRED, ON UPDATE, ...

dropDatabase($database, $name)

Parameter Summary

$name name of the database that should be dropped

drop an existing database (this method is implemented by the drivers)

exportSortedClassesSql($classes, $groupByConnection = true)

Parameter Summary

exportClassesSql($classes)

Parameter Summary
exportClassesSql method for exporting Doctrine_Record classes to a schema
<strong>throws</strong> Doctrine_Connection_Exception if some error other than
Doctrine::ERR_ALREADY_EXISTS occurred during the create table operation

(string) getCharsetFieldDeclaration($charset)

Parameter Summary

$charset name of the charset

Obtain DBMS specific SQL code portion needed to set the CHARACTER SET of a field
declaration to be used in statements like CREATE TABLE.
<strong>returns</strong> DBMS specific SQL code portion needed to set the CHARACTER
SET of a field declaration.

(string) getCollationFieldDeclaration($collation)

Parameter Summary

$collation name of the collation

Obtain DBMS specific SQL code portion needed to set the COLLATION of a field
declaration to be used in statements like CREATE TABLE.

----------------- Brought to you by


Doctrine_Export 243

<strong>returns</strong> DBMS specific SQL code portion needed to set the COLLATION
of a field declaration.

dropIndex($table, $name)

Parameter Summary

$table name of table that should be used in method

$name name of the index to be dropped

drop existing index

dropSequenceSql($sequenceName)

Parameter Summary

$sequenceName name of the sequence to be dropped

dropSequenceSql drop existing sequence


<strong>throws</strong> Doctrine_Connection_Exception if something fails at database
level

createConstraint($table, $name, $definition)

Parameter Summary

$table name of the table on which the constraint is to be created


$name name of the constraint to be created
$definition <p> associative array that defines properties of the constraint to be created.
Currently, only one property named FIELDS is supported. This property is also
an associative with the names of

create a constraint on a table

(string) alterTableSql($name, $changes, $check = false)

Parameter Summary

$name name of the table that is intended to be changed.


$changes associative array that contains the details of each type *

$check indicates whether the function should just check if the DBMS driver can perform
the requested table alterations if the value is true or actually perform them
otherwise.

generates the sql for altering an existing table (this method is implemented by the
drivers)

----------------- Brought to you by


Doctrine_Export 244

(boolean) exportTable(( ) $table)

Parameter Summary
exportTable exports given table into database based on column and option
definitions
<strong>returns</strong> whether or not the export operation was successful false if table
already existed in the database
<strong>throws</strong> Doctrine_Connection_Exception if some error other than
Doctrine::ERR_ALREADY_EXISTS occurred during the create table operation

(string) getForeignKeyBaseDeclaration($definition)

Parameter Summary
getForeignKeyBaseDeclaration Obtain DBMS specific SQL code portion needed to
set the FOREIGN KEY constraint of a field declaration to be used in statements like
CREATE TABLE.

(string) createForeignKeySql($table, $definition)

Parameter Summary

$table name of the table on which the foreign key is to be created


$definition associative array that defines properties of the foreign key to be created.

(string) getCheckDeclaration($definition)

Parameter Summary

$definition check definition

Obtain DBMS specific SQL code portion needed to set a CHECK constraint
declaration to be used in statements like CREATE TABLE.
<strong>returns</strong> DBMS specific SQL code portion needed to set a CHECK
constraint

exportClasses($classes)

Parameter Summary
exportClasses method for exporting Doctrine_Record classes to a schema
FIXME: This function has ugly hacks in it to make sure sql is inserted in the correct order.
<strong>throws</strong> Doctrine_Connection_Exception if some error other than
Doctrine::ERR_ALREADY_EXISTS occurred during the create table operation

----------------- Brought to you by


Doctrine_Export 245

dropTable($table)

Parameter Summary

$table name of table that should be dropped from the database

dropTable drop an existing table

exportSql($directory = null)

Parameter Summary

$directory optional directory parameter

exportSql returns the sql for exporting Doctrine_Record classes to a schema


if the directory parameter is given this method first iterates recursively trhough the given
directory in order to find any model classes Then it iterates through all declared classes and
creates tables for the ones that extend Doctrine_Record and are n
<strong>throws</strong> Doctrine_Connection_Exception if some error other than
Doctrine::ERR_ALREADY_EXISTS occurred during the create table operation

getForeignKeyReferentialAction($action, 1)

Parameter Summary

$action foreign key referential action

1 foreign key referential action in uppercase

returns given referential action in uppercase if valid, otherwise throws an exception


<strong>throws</strong> Doctrine_Exception_Exception if unknown referential action given

alterTable($name, $changes, $check = false)

Parameter Summary

$name name of the table that is intended to be changed.


$changes <p> associative array that contains the details of each type of change that is
intended to be performed. The types of changes that are currently supported are
defined as follows: </p> <p>name</p> <p>New name f
$check indicates whether the function should just check if the DBMS driver can perform
the requested table alterations if the value is true or actually perform them
otherwise.

alter an existing table (this method is implemented by the drivers)

----------------- Brought to you by


Doctrine_Export 246

(string) dropIndexSql($table, $name)

Parameter Summary

$table name of table that should be used in method

$name name of the index to be dropped

<strong>returns</strong> SQL that is used for dropping an index

(string) dropTableSql($table)

Parameter Summary

$table name of table that should be dropped from the database

dropTableSql drop an existing table

dropConstraint($table, $name, $primary = false)

Parameter Summary

$table name of table that should be used in method


$name name of the constraint to be dropped
$primary hint if the constraint is primary

drop existing constraint

createSequence($seqName, $start = 1, $options = array())

Parameter Summary

$seqName name of the sequence to be created

$start start value of the sequence; default is 1


$options An associative array of table options: array( &apos;comment&apos; =&gt;
&apos;Foo&apos;, &apos;charset&apos; =&gt; &apos;utf8&apos;,
&apos;collate&apos; =&gt; &apos;utf8_unicode_ci&apos;, );

create sequence
<strong>throws</strong> Doctrine_Connection_Exception if something fails at database
level

----------------- Brought to you by


Doctrine_Export 247

createIndex($table, $name, $definition)

Parameter Summary

$table name of the table on which the index is to be created


$name name of the index to be created
$definition <p> associative array that defines properties of the index to be created.
Currently, only one property named FIELDS is supported. This property is also
an associative with the names of the i

Get the stucture of a field into an array

(string) getUniqueFieldDeclaration()

Parameter Summary
Obtain DBMS specific SQL code portion needed to set the UNIQUE constraint of a
field declaration to be used in statements like CREATE TABLE.
<strong>returns</strong> DBMS specific SQL code portion needed to set the UNIQUE
constraint of a field declaration.

(string) getForeignKeyDeclaration($definition)

Parameter Summary

$definition <p> an associative array with the following structure: name optional constraint
name </p> <p>local the local field(s)</p> <p>foreign the foreign reference
field(s)</p> <p>for

getForeignKeyDeclaration Obtain DBMS specific SQL code portion needed to set the
FOREIGN KEY constraint of a field declaration to be used in statements like CREATE
TABLE.
<strong>returns</strong> DBMS specific SQL code portion needed to set the FOREIGN KEY
constraint of a field declaration.

(string) getTemporaryTableQuery()

Parameter Summary
A method to return the required SQL string that fits between CREATE ... TABLE to
create the table as a temporary table.
Should be overridden in driver classes to return the correct string for the specific database
type. The default is to return the string &quot;TEMPORARY&quot; - this will result in a SQL
error for any database that does not support temporary tables, or t
<strong>returns</strong> The string required to be placed between &quot;CREATE&quot;
and &quot;TABLE&quot; to generate a temporary table, if possible.

----------------- Brought to you by


Doctrine_Export 248

dropForeignKey($table, $name)

Parameter Summary

$table name of table that should be used in method

$name name of the foreign key to be dropped

drop existing foreign key

(string) createSequenceSql($seqName, $start = 1, $options = array())

Parameter Summary

$seqName name of the sequence to be created

$start start value of the sequence; default is 1


$options An associative array of table options: array( &apos;comment&apos; =&gt;
&apos;Foo&apos;, &apos;charset&apos; =&gt; &apos;utf8&apos;,
&apos;collate&apos; =&gt; &apos;utf8_unicode_ci&apos;, );

return RDBMS specific create sequence statement (this method is implemented by


the drivers)
<strong>throws</strong> Doctrine_Connection_Exception if something fails at database
level

(string) getIndexDeclaration($name, $definition)

Parameter Summary

$name name of the index


$definition index definition

Obtain DBMS specific SQL code portion needed to set an index declaration to be
used in statements like CREATE TABLE.
<strong>returns</strong> DBMS specific SQL code portion needed to set an index

(array) getAllGenerators(( ) $table)

Parameter Summary

$table table object to retrieve the generators from

fetches all generators recursively for given table


<strong>returns</strong> an array of Doctrine_Record_Generator objects

----------------- Brought to you by


Doctrine_Export 249

createDatabase($database, $name)

Parameter Summary

$name name of the database that should be created

create a new database (this method is implemented by the drivers)

(string) createForeignKey($table, $definition)

Parameter Summary

$table name of the table on which the foreign key is to be created


$definition associative array that defines properties of the foreign key to be created.

(string) getFieldDeclarationList($fields)

Parameter Summary

$fields <p> a multidimensional associative array. The first dimension determines the field
name, while the second dimension is keyed with the name of the properties of the
field being declared as array indexes. Cu

Get declaration of a number of field in bulk

createTable($name, $fields, $options = array())

Parameter Summary

$name Name of the database that should be created


$fields Associative array that contains the definition of each field of the new table
$options An associative array of table options:

create a new table

(string) createDatabaseSql($database, $name)

Parameter Summary

$name name of the database that should be created

create a new database (this method is implemented by the drivers)

(string) getIndexFieldDeclarationList($fields)

Parameter Summary

----------------- Brought to you by


Doctrine_Export_Firebird 250

getIndexFieldDeclarationList Obtain DBMS specific SQL code portion needed to set


an index declaration to be used in statements like CREATE TABLE.

Doctrine_Export_Firebird

Method Summary
Returns Name Description
_dropAutoincrement
createIndexSql
checkSupportedChanges
dropDatabase
dropSequenceSql
createConstraint
mixed dropTable
alterTable
boolean createSequence
string getTemporaryTableQuery
createDatabase
createTable
_makeAutoincrement

Method Details
_dropAutoincrement($table)

Parameter Summary

$table name of the table

drop an existing autoincrement sequence + trigger

----------------- Brought to you by


Doctrine_Export_Firebird 251

createIndexSql($table, $name, $definition)

Parameter Summary

$table name of the table on which the index is to be created


$name name of the index to be created
$definition <p> associative array that defines properties of the index to be created.
Currently, only one property named FIELDS is supported. This property is also
an associative with the names of the i

Get the stucture of a field into an array

checkSupportedChanges([[[amp]]]$changes, $name)

Parameter Summary

$name name of the database that should be dropped

Check if planned changes are supported

dropDatabase($name)

Parameter Summary

$name name of the database that should be dropped

drop an existing database

dropSequenceSql($seqName)

Parameter Summary

$seqName name of the sequence to be dropped

drop existing sequence

createConstraint($table, $name, $definition)

Parameter Summary

$table name of the table on which the constraint is to be created


$name name of the constraint to be created
$definition <p> associative array that defines properties of the constraint to be created.
Currently, only one property named FIELDS is supported. This property is also
an ass

----------------- Brought to you by


Doctrine_Export_Firebird 252

create a constraint on a table

(mixed) dropTable($name)

Parameter Summary

$name name of the table that should be dropped

drop an existing table


<strong>returns</strong> MDB2_OK on success, a MDB2 error on failure

alterTable($name, $changes, $check = false)

Parameter Summary

$name name of the table that is intended to be changed.


$changes <p> associative array that contains the details of each type of change that is
intended to be performed. The types of changes that are currently supported are
defined as follows: </p> <p>name</p> <p>New name f
$check indicates whether the function should just check if the DBMS driver can perform
the requested table alterations if the value is true or actually perform them
otherwise.

alter an existing table

(boolean) createSequence($seqName, $start = 1, $options = array())

Parameter Summary

$seqName name of the sequence to be created

$start start value of the sequence; default is 1


$options An associative array of table options: array( &apos;comment&apos; =&gt;
&apos;Foo&apos;, &apos;charset&apos; =&gt; &apos;utf8&apos;,
&apos;collate&apos; =&gt; &apos;utf8_unicode_ci&apos;, );

create sequence

(string) getTemporaryTableQuery()

Parameter Summary
A method to return the required SQL string that fits between CREATE ... TABLE to
create the table as a temporary table.
<strong>returns</strong> The string required to be placed between &quot;CREATE&quot;
and &quot;TABLE&quot; to generate a temporary table, if possible.

----------------- Brought to you by


Doctrine_Export_Frontbase 253

createDatabase($name)

Parameter Summary

$name name of the database that should be created

create a new database

createTable($name, $fields, $options = array())

Parameter Summary

$name Name of the database that should be created


$fields <p> Associative array that contains the definition of each field of the new table
The indexes of the array entries are the names of the fields of the table an the
array entry
$options An associative array of table options:

create a new table

_makeAutoincrement($name, $table, $start = null)

Parameter Summary

$name name of the PK field

$table name of the table

$start start value for the sequence

add an autoincrement sequence + trigger

Doctrine_Export_Frontbase

Method Summary
Returns Name Description
string dropDatabaseSql
string dropSequenceSql

----------------- Brought to you by


Doctrine_Export_Frontbase 254

boolean alterTable
boolean dropIndexSql
string dropTableSql
createSequence
string createDatabaseSql

Method Details
(string) dropDatabaseSql($name)

Parameter Summary

$name name of the database that should be dropped

drop an existing database

(string) dropSequenceSql($seqName)

Parameter Summary

$seqName name of the sequence to be dropped

drop existing sequence

(boolean) alterTable($name, $changes, $check = false)

Parameter Summary

$name name of the table that is intended to be changed.


$changes <p> associative array that contains the details of each type of change that is
intended to be performed. The types of changes that are currently supported are
defined as follows: </p> <p>name</p> <p>New name f
$check indicates whether the function should just check if the DBMS driver can perform
the requested table alterations if the value is true or actually perform them
otherwise.

alter an existing table

(boolean) dropIndexSql($table, $name)

Parameter Summary

$table name of table that should be used in method

$name name of the index to be dropped

----------------- Brought to you by


Doctrine_Export_Mssql 255

drop existing index

(string) dropTableSql($name, $this->conns)

Parameter Summary

$name name of the table that should be dropped


$this->conns database object that is extended by this class

drop an existing table

createSequence($sequenceName, $start = 1, $options = array(),


$seqName)

Parameter Summary

$start start value of the sequence; default is 1


$options An associative array of table options: array( &apos;comment&apos; =&gt;
&apos;Foo&apos;, &apos;charset&apos; =&gt; &apos;utf8&apos;,
&apos;collate&apos; =&gt; &apos;utf8_unicode_ci&apos;, );
$seqName name of the sequence to be created

create sequence

(string) createDatabaseSql($name)

Parameter Summary

$name name of the database that should be created

create a new database

Doctrine_Export_Mssql

Method Summary
Returns Name Description

----------------- Brought to you by


Doctrine_Export_Mssql 256

string getNotNullFieldDeclaration
dropDatabase
dropSequenceSql
alterTable
string createSequence
string getTemporaryTableQuery
string getIndexDeclaration
createDatabase

Method Details
(string) getNotNullFieldDeclaration($definition, $field)

Parameter Summary

$field field definition array

getNotNullFieldDeclaration Obtain DBMS specific SQL code portion needed to set a


NOT NULL declaration to be used in statements like CREATE TABLE.
<strong>returns</strong> DBMS specific SQL code portion needed to set a default value

dropDatabase($name)

Parameter Summary

$name name of the database that should be dropped

drop an existing database

dropSequenceSql($seqName)

Parameter Summary

$seqName name of the sequence to be dropped

This function drops an existing sequence

alterTable($name, $changes, $check = false)

Parameter Summary

$name name of the table that is intended to be changed.

----------------- Brought to you by


Doctrine_Export_Mssql 257

$changes <p> associative array that contains the details of each type of change that is
intended to be performed. The types of changes that are currently supported are
defined as follows: </p> <p>name</p> <p>New name f
$check indicates whether the function should just check if the DBMS driver can perform
the requested table alterations if the value is true or actually perform them
otherwise.

alter an existing table

(string) createSequence($seqName, $start = 1, $options = array())

Parameter Summary

$seqName name of the sequence to be created

$start start value of the sequence; default is 1


$options An associative array of table options: array( &apos;comment&apos; =&gt;
&apos;Foo&apos;, &apos;charset&apos; =&gt; &apos;utf8&apos;,
&apos;collate&apos; =&gt; &apos;utf8_unicode_ci&apos;, );

create sequence

(string) getTemporaryTableQuery()

Parameter Summary
Override the parent method.
<strong>returns</strong> The string required to be placed between &quot;CREATE&quot;
and &quot;TABLE&quot; to generate a temporary table, if possible.

(string) getIndexDeclaration($name, $definition)

Parameter Summary

$name name of the index


$definition index definition

Obtain DBMS specific SQL code portion needed to set an index declaration to be
used in statements like CREATE TABLE.
<strong>returns</strong> DBMS specific SQL code portion needed to set an index

createDatabase($name)

Parameter Summary

$name name of the database that should be created

create a new database

----------------- Brought to you by


Doctrine_Export_Mysql 258

Doctrine_Export_Mysql

Method Summary
Returns Name Description
string dropDatabaseSql
createIndexSql
string getDeclaration
createTableSql
string getDefaultFieldDeclaration
string getAdvancedForeignKeyOptions
boolean alterTableSql
dropIndexSql
dropTableSql
boolean createSequence
dropForeignKey
string getIndexDeclaration
createDatabaseSql
string getIndexFieldDeclarationList

Method Details
(string) dropDatabaseSql($name)

Parameter Summary

$name name of the database that should be dropped

drop an existing database

----------------- Brought to you by


Doctrine_Export_Mysql 259

createIndexSql($table, $name, $definition)

Parameter Summary

$table name of the table on which the index is to be created


$name name of the index to be created
$definition <p> associative array that defines properties of the index to be created.
Currently, only one property named FIELDS is supported. This property is also
an associative with the names of the i

Get the stucture of a field into an array


<strong>throws</strong> PDOException

(string) getDeclaration($name, $field)

Parameter Summary

$name name the field to be declared.

$field <p> associative array with the name of the properties of the field being declared as
array indexes. Currently, the types of supported field properties are as follows: </p>
<p> length Integer val

Obtain DBMS specific SQL code portion needed to declare a generic type field to be
used in statements like CREATE TABLE.
<strong>returns</strong> DBMS specific SQL code portion that should be used to declare
the specified field.

createTableSql($name, $fields, $options = array())

Parameter Summary

$name Name of the database that should be created


$fields Associative array that contains the definition of each field of the new table The
indexes of the array entries are the names of the fields of the table an the array
entry values are associ
$options An associative array of table options: array( &apos;comment&apos; =&gt;
&apos;Foo&apos;, &apos;charset&apos; =&gt; &apos;utf8&apos;,
&apos;collate&apos; =&gt; &apos;utf8_unicode_ci&apos;, &apos;type&ap

create a new table

(string) getDefaultFieldDeclaration($field)

Parameter Summary

$field field definition array

----------------- Brought to you by


Doctrine_Export_Mysql 260

getDefaultDeclaration Obtain DBMS specific SQL code portion needed to set a


default value declaration to be used in statements like CREATE TABLE.
<strong>returns</strong> DBMS specific SQL code portion needed to set a default value

(string) getAdvancedForeignKeyOptions($definition)

Parameter Summary
getAdvancedForeignKeyOptions Return the FOREIGN KEY query section dealing
with non-standard options as MATCH, INITIALLY DEFERRED, ON UPDATE, ...

(boolean) alterTableSql($name, $changes, $check = false)

Parameter Summary

$name name of the table that is intended to be changed.


$changes <p> associative array that contains the details of each type of change that is
intended to be performed. The types of changes that are currently supported are
defined as follows: </p> <p>name</p> <p>New name f
$check indicates whether the function should just check if the DBMS driver can perform
the requested table alterations if the value is true or actually perform them
otherwise.

alter an existing table

dropIndexSql($table, $name)

Parameter Summary

$table name of table that should be used in method

$name name of the index to be dropped

drop existing index

dropTableSql($table)

Parameter Summary

$table name of table that should be dropped from the database

dropTable
<strong>throws</strong> PDOException

----------------- Brought to you by


Doctrine_Export_Mysql 261

(boolean) createSequence($sequenceName, $start = 1, $options =


array())

Parameter Summary

$sequenceName name of the sequence to be created

$start start value of the sequence; default is 1


$options An associative array of table options: array( &apos;comment&apos; =&gt;
&apos;Foo&apos;, &apos;charset&apos; =&gt; &apos;utf8&apos;,
&apos;collate&apos; =&gt; &apos;utf8_unicode_ci&apos;, &apos;type&ap

create sequence

dropForeignKey($table, $name)

Parameter Summary

$table name of table that should be used in method

$name name of the foreign key to be dropped

drop existing foreign key

(string) getIndexDeclaration($name, $definition, $charset)

Parameter Summary

$definition index definition

$charset name of the index

Obtain DBMS specific SQL code portion needed to set an index declaration to be
used in statements like CREATE TABLE.
<strong>returns</strong> DBMS specific SQL code portion needed to set an index

createDatabaseSql($name)

Parameter Summary

(string) getIndexFieldDeclarationList($fields)

Parameter Summary
getIndexFieldDeclarationList Obtain DBMS specific SQL code portion needed to set
an index declaration to be used in statements like CREATE TABLE.

----------------- Brought to you by


Doctrine_Export_Oracle 262

Doctrine_Export_Oracle

Method Summary
Returns Name Description
createTableSql
string getAdvancedForeignKeyOptions
mixed dropDatabase
string dropSequenceSql
dropAutoincrement
dropTable
alterTable
string getTemporaryTableQuery
string createSequenceSql
string getIndexDeclaration
mixed createDatabase
createTable
mixed _makeAutoincrement

Method Details
createTableSql($name, $fields, $options = array())

Parameter Summary

$name Name of the database that should be created


$fields <p> Associative array that contains the definition of each field of the new table
The indexes of the array entries are the names of the fields of the table an the
array entry
$options An associative array of table options:

create a new table

----------------- Brought to you by


Doctrine_Export_Oracle 263

(string) getAdvancedForeignKeyOptions($definition)

Parameter Summary

$definition foreign key definition

getAdvancedForeignKeyOptions Return the FOREIGN KEY query section dealing


with non-standard options as MATCH, INITIALLY DEFERRED, ON UPDATE, ...

(mixed) dropDatabase($name, $this->conn)

Parameter Summary

$name name of the database that should be dropped


$this->conn database object that is extended by this class

drop an existing database


<strong>returns</strong> MDB2_OK on success, a MDB2 error on failure

(string) dropSequenceSql($seqName, $this->conn)

Parameter Summary

$seqName name of the sequence to be dropped


$this->conn database object that is extended by this class

drop existing sequence

dropAutoincrement($table)

Parameter Summary

$table name of the table

drop an existing autoincrement sequence + trigger

dropTable($name)

Parameter Summary

$name name of the table that should be dropped

drop an existing table

----------------- Brought to you by


Doctrine_Export_Oracle 264

alterTable($name, $changes, $check = false)

Parameter Summary

$name name of the table that is intended to be changed.


$changes <p> associative array that contains the details of each type of change that is
intended to be performed. The types of changes that are currently supported are
defined as follows: </p> <p>name</p> <p>New name f
$check indicates whether the function should just check if the DBMS driver can perform
the requested table alterations if the value is true or actually perform them
otherwise.

alter an existing table

(string) getTemporaryTableQuery()

Parameter Summary
A method to return the required SQL string that fits between CREATE ... TABLE to
create the table as a temporary table.
<strong>returns</strong> The string required to be placed between &quot;CREATE&quot;
and &quot;TABLE&quot; to generate a temporary table, if possible.

(string) createSequenceSql($seqName, $start = 1, $options = array())

Parameter Summary

$seqName name of the sequence to be created

$start start value of the sequence; default is 1


$options An associative array of table options: array( &apos;comment&apos; =&gt;
&apos;Foo&apos;, &apos;charset&apos; =&gt; &apos;utf8&apos;,
&apos;collate&apos; =&gt; &apos;utf8_unicode_ci&apos;, );

create sequence

(string) getIndexDeclaration($name, $definition)

Parameter Summary

$name name of the index


$definition index definition

return Oracle's SQL code portion needed to set an index declaration to be unsed in
statements like CREATE TABLE.
<strong>returns</strong> Oracle&apos;s SQL code portion needed to set an index

----------------- Brought to you by


Doctrine_Export_Oracle 265

(mixed) createDatabase($name, $db)

Parameter Summary

$name name of the database that should be created

$db database object that is extended by this class

create a new database


<strong>returns</strong> MDB2_OK on success, a MDB2 error on failure

createTable($name, $fields, $options = array())

Parameter Summary

$name Name of the database that should be created


$fields <p> Associative array that contains the definition of each field of the new table
The indexes of the array entries are the names of the fields of the table an the
array entry
$options An associative array of table options:

create a new table

(mixed) _makeAutoincrement($name, $table, $start = 1)

Parameter Summary

$name name of the PK field

$table name of the table

$start start value for the sequence

add an autoincrement sequence + trigger


<strong>returns</strong> MDB2_OK on success, a MDB2 error on failure

----------------- Brought to you by


Doctrine_Export_Pgsql 266

Doctrine_Export_Pgsql

Method Summary
Returns Name Description
dropDatabaseSql
unknown createTableSql
string getAdvancedForeignKeyOptions
dropSequenceSql
array alterTableSql
boolean alterTable
string createSequenceSql
createDatabaseSql

Method Details
dropDatabaseSql($name)

Parameter Summary

$name name of the database that should be dropped

drop an existing database


<strong>throws</strong> PDOException

(unknown) createTableSql((unknown_type) $name, $fields, $options =


array())

Parameter Summary
Creates a table.

----------------- Brought to you by


Doctrine_Export_Pgsql 267

(string) getAdvancedForeignKeyOptions($definition)

Parameter Summary

$definition foreign key definition

getAdvancedForeignKeyOptions Return the FOREIGN KEY query section dealing


with non-standard options as MATCH, INITIALLY DEFERRED, ON UPDATE, ...

dropSequenceSql($sequenceName)

Parameter Summary

$sequenceName name of the sequence to be dropped

drop existing sequence

(array) alterTableSql($name, $changes, $check = false)

Parameter Summary

$name name of the table that is intended to be changed.


$changes associative array that contains the details of each type *

$check indicates whether the function should just check if the DBMS driver can perform
the requested table alterations if the value is true or actually perform them
otherwise.

generates the sql for altering an existing table on postgresql

(boolean) alterTable($name, $changes, $check = false)

Parameter Summary

$name name of the table that is intended to be changed.


$changes <p> associative array that contains the details of each type of change that is
intended to be performed. The types of changes that are currently supported are
defined as follows: </p> <p>name</p> <p>New name f
$check indicates whether the function should just check if the DBMS driver can perform
the requested table alterations if the value is true or actually perform them
otherwise.

alter an existing table


<strong>throws</strong> Doctrine_Connection_Exception

----------------- Brought to you by


Doctrine_Export_Reporter 268

(string) createSequenceSql($sequenceName, $start = 1, $options =


array(), $seqName)

Parameter Summary

$start start value of the sequence; default is 1


$options An associative array of table options: array( &apos;comment&apos; =&gt;
&apos;Foo&apos;, &apos;charset&apos; =&gt; &apos;utf8&apos;,
&apos;collate&apos; =&gt; &apos;utf8_unicode_ci&apos;, );
$seqName name of the sequence to be created

return RDBMS specific create sequence statement


<strong>throws</strong> Doctrine_Connection_Exception if something fails at database
level

createDatabaseSql($name)

Parameter Summary

Doctrine_Export_Reporter

Method Summary
Returns Name Description
pop
add
getIterator

Method Details
pop()

Parameter Summary

----------------- Brought to you by


Doctrine_Export_Schema 269

add($code, $message)

Parameter Summary

getIterator()

Parameter Summary

Doctrine_Export_Schema

Method Summary
Returns Name Description
string exportSchema
buildSchema Build schema array that can be dumped to file

Method Details
(string) exportSchema($schema, $format = 'yml', $directory = null,
$models = array())

Parameter Summary
<strong>returns</strong> of data in the specified format

buildSchema($directory = null, $models = array())

Parameter Summary
Build schema array that can be dumped to file

----------------- Brought to you by


Doctrine_Export_Sqlite 270

Doctrine_Export_Sqlite

Method Summary
Returns Name Description
createIndexSql
createTableSql
string getAdvancedForeignKeyOptions
dropDatabase drop an existing database
string dropSequenceSql
alterTableSql
boolean createSequence
createDatabase Create sqlite database file
string createForeignKey Sqlite does not support foreign keys so we are
not even going to do anything if this function is
called to avoid any sql errors if a user tries to
use this on sqlite
string getIndexFieldDeclarationList

Method Details
createIndexSql($table, $name, $definition)

Parameter Summary

$table name of the table on which the index is to be created


$name name of the index to be created
$definition <p> associative array that defines properties of the index to be created.
Currently, only one property named FIELDS is supported. This property is also
an associative with the names of the i

Get the stucture of a field into an array


<strong>throws</strong> PDOException

----------------- Brought to you by


Doctrine_Export_Sqlite 271

createTableSql($name, $fields, $options = array())

Parameter Summary

$name Name of the database that should be created


$fields Associative array that contains the definition of each field of the new table The
indexes of the array entries are the names of the fields of the table an the array
entry values are associ
$options An associative array of table options:

create a new table

(string) getAdvancedForeignKeyOptions($definition)

Parameter Summary

$definition foreign key definition

getAdvancedForeignKeyOptions Return the FOREIGN KEY query section dealing


with non-standard options as MATCH, INITIALLY DEFERRED, ON UPDATE, ...

dropDatabase($databaseFile)

Parameter Summary

$databaseFile Path of the database that should be dropped

drop an existing database


<strong>throws</strong> Doctrine_Export_Exception if something failed during the removal
of the database file

(string) dropSequenceSql($sequenceName)

Parameter Summary

$sequenceName name of the sequence to be dropped

drop existing sequence

alterTableSql($name, $changes, $check = false)

Parameter Summary

----------------- Brought to you by


Doctrine_Export_Sqlite 272

(boolean) createSequence($seqName, $start = 1, $options = array())

Parameter Summary

$seqName name of the sequence to be created

$start start value of the sequence; default is 1


$options An associative array of table options: array( &apos;comment&apos; =&gt;
&apos;Foo&apos;, &apos;charset&apos; =&gt; &apos;utf8&apos;,
&apos;collate&apos; =&gt; &apos;utf8_unicode_ci&apos;, );

create sequence

createDatabase($databaseFile)

Parameter Summary

$databaseFile Path of the database that should be dropped

Create sqlite database file

(string) createForeignKey($table, $definition)

Parameter Summary

$table name of the table on which the foreign key is to be created


$definition associative array that defines properties of the foreign key to be created.

Sqlite does not support foreign keys so we are not even going to do anything if this function is
called to avoid any sql errors if a user tries to use this on sqlite

(string) getIndexFieldDeclarationList($fields)

Parameter Summary
getIndexFieldDeclarationList Obtain DBMS specific SQL code portion needed to set
an index declaration to be used in statements like CREATE TABLE.

----------------- Brought to you by


Doctrine_Expression 273

Doctrine_Expression

Method Summary
Returns Name Description
parseExpression
setExpression
__toString
string parseClause
__construct
string getSql
getConnection

Method Details
parseExpression($expr)

Parameter Summary

$expr The expression to parse

setExpression($clause)

Parameter Summary

$clause The expression to set

__toString()

Parameter Summary

----------------- Brought to you by


Doctrine_Expression_Driver 274

(string) parseClause($clause)

Parameter Summary

$clause The clause

<strong>returns</strong> The parse clause

__construct($expr, (Doctrine_Connection) $conn = null)

Parameter Summary

$expr The expression

$conn The connection (optional)

Create an expression

(string) getSql()

Parameter Summary
<strong>returns</strong> The expression

getConnection()

Parameter Summary
<strong>returns</strong> The connection

Doctrine_Expression_Driver

Method Summary
Returns Name Description
pi
string upper
string avg
string md5 Note: Not SQL92, but common functionality

----------------- Brought to you by


Doctrine_Expression_Driver 275

string add add() accepts an arbitrary number of parameters. Each parameter


must contain a value or an expression or an array with values or
expressions. Example:
<
pre> expr;
$q->select('u.*') ->from('Use
string between The parameter $expression is checked if it is between $value1 and
$value2. Note: There is a slight difference in the way BETWEEN
works on some databases. http://www.w3schools.com/sql/
sql_between.asp. If you want complete database independence you
should
string length
string ltrim
__call for all native RDBMS functions the function name itself is returned
string trim
cos
string regexp
string not Example:

expr; Listing
0-8
$q->select('*')->from('table')
->where($e->eq('id', $e->not('null'));]]>

string mul multiply() accepts an arbitrary number of parameters. Each


parameter must contain a value or an expression or an array with
values or expressions. Example:
<
pre> expr;
$q->select('u.*') ->from
string substring Note: Not SQL92, but common functionality. SQLite only supports
the 2 parameter variant of this function
string rtrim
string coalesce
string neq Example:

select('u.*') Listing
0-9
->from('User u')
->where($q->expr->neq('id', 1));]]>

string in in() accepts an arbitrary number of parameters. The first parameter


must always specify the value that should be matched against.
Successive must contain a logical expression or an array with
logical expressions. These expressions will be matched again

----------------- Brought to you by


Doctrine_Expression_Driver 276

string mod
string now
string sum
string isNull Example:

Listing select('u.*')
0-10
->from('User u')
->where($q->expr->isNull('id'));]]>

string sub subtract() accepts an arbitrary number of parameters. Each


parameter must contain a value or an expression or an array with
values or expressions. Example:
<
pre> expr;
$q->select('u.*') ->from
string lte Example:

Listing select('u.*')
0-11
->from('User u')
->where($q->expr->lte('id', 1));]]>

sin
string gte Example:

Listing select('u.*')
0-12
->from('User u')
->where($q->expr->gte('id', 1));]]>

string count If a '*' is used instead of a column the number of selected rows is
returned.
getIdentifiers
string guid
string max
string eq Example:

Listing select('u.*')
0-13
->from('User u')
->where($q->expr->eq('id', 1));]]>

getIdentifier
string round
string lt Example:

----------------- Brought to you by


Doctrine_Expression_Driver 277

select('u.*') Listing
0-14
->from('User u')
->where($q->expr->lt('id', 1));]]>

string gt Example:

select('u.*') Listing
0-15
->from('User u')
->where($q->expr->gt('id', 1));]]>

string div divide() accepts an arbitrary number of parameters. Each


parameter must contain a value or an expression or an array with
values or expressions. Example:
<
pre> expr;
$q->select('u.*') ->from('
string lower
string isNotNull Example:

select('u.*') Listing
0-16
->from('User u')
->where($q->expr->isNotNull('id'));]]>

string soundex The string "?000" is returned if the argument is NULL.


concat concat() accepts an arbitrary number of parameters. Each
parameter must contain an expression or an array with
expressions.
string acos
integer locate
string min

Method Details
pi()

Parameter Summary

(string) upper($str)

Parameter Summary

$str literal string or column name

----------------- Brought to you by


Doctrine_Expression_Driver 278

upper Returns the string $str with all characters changed to uppercase according to
the current character set mapping.

(string) avg($column)

Parameter Summary

$column the column to use

Returns the average value of a column


<strong>returns</strong> generated sql including an AVG aggregate function

(string) md5($column)

Parameter Summary
Returns the md5 sum of a field.
Note: Not SQL92, but common functionality

(string) add($args)

Parameter Summary
Returns the SQL to add values or expressions together.
add() accepts an arbitrary number of parameters. Each parameter must contain a value or an
expression or an array with values or expressions. Example: <pre><code> <![CDATA[ $q =
new Doctrine_Query(); $e = $q->expr;
$q->select('u.*') ->from('Use
<strong>returns</strong> an expression

(string) between($expression, $value1, $value2)

Parameter Summary

$expression the value to compare to

$value1 the lower value to compare with


$value2 the higher value to compare with

Returns SQL that checks if an expression evaluates to a value between two values.
The parameter $expression is checked if it is between $value1 and $value2. Note: There is a
slight difference in the way BETWEEN works on some databases. http://www.w3schools.com/
sql/sql_between.asp. If you want complete database independence you should
<strong>returns</strong> logical expression

----------------- Brought to you by


Doctrine_Expression_Driver 279

(string) length($column, $expression1, $expression2)

Parameter Summary
Returns the length of a text field.

(string) ltrim($str)

Parameter Summary

$str literal string or column name

ltrim returns the string $str with leading space characters removed

__call($m, $a)

Parameter Summary
for all native RDBMS functions the function name itself is returned

(string) trim($str)

Parameter Summary

$str literal string or column name

trim returns the string $str with leading and proceeding space characters removed

cos($value)

Parameter Summary

(string) regexp()

Parameter Summary
regexp returns the regular expression operator

(string) not($expression)

Parameter Summary
Returns the SQL for a logical not.
Example: <pre><code> <![CDATA[ $q = new Doctrine_Query(); $e = $q->expr; $q-
>select('*')->from('table') ->where($e->eq('id', $e->not('null'));]]> </code></pre>
<strong>returns</strong> a logical expression

----------------- Brought to you by


Doctrine_Expression_Driver 280

(string) mul($args)

Parameter Summary
Returns the SQL to multiply values or expressions by eachother.
multiply() accepts an arbitrary number of parameters. Each parameter must contain a value
or an expression or an array with values or expressions. Example: <pre><code> <![CDATA[
$q = new Doctrine_Query(); $e = $q->expr;
$q->select('u.*') ->from
<strong>returns</strong> an expression

(string) substring($value, $from, $len = null, $position, $length)

Parameter Summary

$value an sql string literal or column name/alias


$position where to start the substring portion

$length the substring portion length

return string to call a function to get a substring inside an SQL statement


Note: Not SQL92, but common functionality. SQLite only supports the 2 parameter variant of
this function
<strong>returns</strong> SQL substring function with given parameters

(string) rtrim($str)

Parameter Summary

$str literal string or column name

rtrim returns the string $str with proceeding space characters removed

(string) coalesce()

Parameter Summary

(string) neq($value1, $value2)

Parameter Summary

$value1 logical expression to compare

$value2 logical expression to compare with

Returns the SQL to check if two values are unequal.


Example: <pre><code> <![CDATA[ $q = new Doctrine_Query(); $q->select('u.*') -
>from('User u') ->where($q->expr->neq('id', 1));]]> </code></pre>

----------------- Brought to you by


Doctrine_Expression_Driver 281

<strong>returns</strong> logical expression

(string) in($column, (string|array(string)) $values)

Parameter Summary

$column the value that should be matched against

$values values that will be matched against $column

Returns the SQL to check if a value is one in a set of given values..


in() accepts an arbitrary number of parameters. The first parameter must always specify the
value that should be matched against. Successive must contain a logical expression or an
array with logical expressions. These expressions will be matched again
<strong>returns</strong> logical expression

(string) mod($expression1, $expression2)

Parameter Summary
Returns the remainder of the division operation $expression1 / $expression2.

(string) now()

Parameter Summary
Returns the current system date.

(string) sum($column)

Parameter Summary

$column the column to use

Returns the total sum of a column

(string) isNull($expression)

Parameter Summary

$expression the expression that should be compared to null

Returns SQL that checks if a expression is null.


Example: <pre><code> <![CDATA[ $q = new Doctrine_Query(); $q->select('u.*') -
>from('User u') ->where($q->expr->isNull('id'));]]> </code></pre>
<strong>returns</strong> logical expression

----------------- Brought to you by


Doctrine_Expression_Driver 282

(string) sub($args)

Parameter Summary
Returns the SQL to subtract values or expressions from eachother.
subtract() accepts an arbitrary number of parameters. Each parameter must contain a value
or an expression or an array with values or expressions. Example: <pre><code> <![CDATA[
$q = new Doctrine_Query(); $e = $q->expr;
$q->select('u.*') ->from
<strong>returns</strong> an expression

(string) lte($value1, $value2)

Parameter Summary

$value1 logical expression to compare

$value2 logical expression to compare with

Returns the SQL to check if one value is less than or equal to another value.
Example: <pre><code> <![CDATA[ $q = new Doctrine_Query(); $q->select('u.*') -
>from('User u') ->where($q->expr->lte('id', 1));]]> </code></pre>
<strong>returns</strong> logical expression

sin($value)

Parameter Summary

(string) gte($value1, $value2)

Parameter Summary

$value1 logical expression to compare

$value2 logical expression to compare with

Returns the SQL to check if one value is greater than or equal to another value.
Example: <pre><code> <![CDATA[ $q = new Doctrine_Query(); $q->select('u.*') -
>from('User u') ->where($q->expr->gte('id', 1));]]> </code></pre>
<strong>returns</strong> logical expression

(string) count((string|integer) $column)

Parameter Summary

$column the column to use

Returns the number of rows (without a NULL value) of a column

----------------- Brought to you by


Doctrine_Expression_Driver 283

If a &apos;*&apos; is used instead of a column the number of selected rows is returned.


<strong>returns</strong> generated sql including a COUNT aggregate function

getIdentifiers($columns)

Parameter Summary

(string) guid()

Parameter Summary
Returns global unique identifier
<strong>returns</strong> to get global unique identifier

(string) max($column)

Parameter Summary

$column the column to use

Returns the highest value of a column


<strong>returns</strong> generated sql including a MAX aggregate function

(string) eq($value1, $value2)

Parameter Summary

$value1 logical expression to compare

$value2 logical expression to compare with

Returns the SQL to check if two values are equal.


Example: <pre><code> <![CDATA[ $q = new Doctrine_Query(); $q->select('u.*') -
>from('User u') ->where($q->expr->eq('id', 1));]]> </code></pre>
<strong>returns</strong> logical expression

getIdentifier($column)

Parameter Summary

(string) round($column, $decimals, $expression1, $expression2)

Parameter Summary
Rounds a numeric field to the number of decimals specified.

----------------- Brought to you by


Doctrine_Expression_Driver 284

(string) lt($value1, $value2)

Parameter Summary

$value1 logical expression to compare

$value2 logical expression to compare with

Returns the SQL to check if one value is less than another value.
Example: <pre><code> <![CDATA[ $q = new Doctrine_Query(); $q->select('u.*') -
>from('User u') ->where($q->expr->lt('id', 1));]]> </code></pre>
<strong>returns</strong> logical expression

(string) gt($value1, $value2)

Parameter Summary

$value1 logical expression to compare

$value2 logical expression to compare with

Returns the SQL to check if one value is greater than another value.
Example: <pre><code> <![CDATA[ $q = new Doctrine_Query(); $q->select('u.*') -
>from('User u') ->where($q->expr->gt('id', 1));]]> </code></pre>
<strong>returns</strong> logical expression

(string) div($args)

Parameter Summary
Returns the SQL to divide values or expressions by eachother.
divide() accepts an arbitrary number of parameters. Each parameter must contain a value or
an expression or an array with values or expressions. Example: <pre><code> <![CDATA[ $q
= new Doctrine_Query(); $e = $q->expr;
$q->select('u.*') ->from('
<strong>returns</strong> an expression

(string) lower($str)

Parameter Summary

$str literal string or column name

lower Returns the string $str with all characters changed to lowercase according to
the current character set mapping.

----------------- Brought to you by


Doctrine_Expression_Driver 285

(string) isNotNull($expression)

Parameter Summary

$expression the expression that should be compared to null

Returns SQL that checks if a expression is not null.


Example: <pre><code> <![CDATA[ $q = new Doctrine_Query(); $q->select('u.*') -
>from('User u') ->where($q->expr->isNotNull('id'));]]> </code></pre>
<strong>returns</strong> logical expression

(string) soundex($value)

Parameter Summary
soundex Returns a string to call a function to compute the soundex encoding of a
string
The string &quot;?000&quot; is returned if the argument is NULL.
<strong>returns</strong> SQL soundex function with given parameter

concat((string|array(string)) 0)

Parameter Summary

0 strings that will be concatinated.

Returns a series of strings concatinated


concat() accepts an arbitrary number of parameters. Each parameter must contain an
expression or an array with expressions.

(string) acos($value)

Parameter Summary
returns arcus cosine SQL string

(integer) locate($str, $substr)

Parameter Summary

$str literal string


$substr literal string to find

locate returns the position of the first occurrence of substring $substr in string $str

----------------- Brought to you by


Doctrine_Expression_Firebird 286

(string) min($column)

Parameter Summary

$column the column to use

Returns the lowest value of a column

Doctrine_Expression_Firebird

Method Summary
Returns Name Description
string patternEscapeString
string functionTable

Method Details
(string) patternEscapeString()

Parameter Summary
build string to define escape pattern string
<strong>returns</strong> define escape pattern

(string) functionTable()

Parameter Summary
return string for internal table used when calling only a function
<strong>returns</strong> for internal table used when calling only a function

----------------- Brought to you by


Doctrine_Expression_Mssql 287

Doctrine_Expression_Mssql

Method Summary
Returns Name Description
string substring
string now There are three special variables for current date and time:
<
ul>
• CURRENT_TIMESTAMP (date and time, TIMESTAMP type)

</li> Listing
0-17
<li>
<p>CURRENT_DATE (date, DATE type)</p>
</li>
<li>
<p>CURRENT_TIME (time, TIME t

string guid
string concat

Method Details
(string) substring($value, $position, $length = null)

Parameter Summary
return string to call a function to get a substring inside an SQL statement
<strong>returns</strong> to call a function to get a substring

(string) now($type = 'timestamp')

Parameter Summary
Return string to call a variable with the current timestamp inside an SQL statement

----------------- Brought to you by


Doctrine_Expression_Mysql 288

There are three special variables for current date and time: <ul> <li>
<p>CURRENT_TIMESTAMP (date and time, TIMESTAMP type)</p> </li> <li>
<p>CURRENT_DATE (date, DATE type)</p> </li> <li> <p>CURRENT_TIME (time, TIME t
<strong>returns</strong> to call a variable with the current timestamp

(string) guid()

Parameter Summary
Returns global unique identifier
<strong>returns</strong> to get global unique identifier

(string) concat($arg1, $arg2, $values...)

Parameter Summary
Returns string to concatenate two or more string parameters
<strong>returns</strong> to concatenate two strings

Doctrine_Expression_Mysql

Method Summary
Returns Name Description
string month
string matchPattern EXPERIMENTAL WARNING: this function is experimental and may
change signature at any time until labelled as non-experimental
string regexp
string random
string day
string guid
string year

----------------- Brought to you by


Doctrine_Expression_Mysql 289

Method Details
(string) month($column)

Parameter Summary
Returns the month from dbms
<strong>returns</strong> to get month from dbms

(string) matchPattern($pattern, $operator = null, $field = null)

Parameter Summary

$pattern even keys are strings, odd are patterns (% and _)


$operator optional pattern operator (LIKE, ILIKE and maybe others in the future)

$field optional field name that is being matched against (might be required when
emulating ILIKE)

build a pattern matching string


EXPERIMENTAL WARNING: this function is experimental and may change signature at any
time until labelled as non-experimental
<strong>returns</strong> SQL pattern

(string) regexp()

Parameter Summary
returns the regular expression operator

(string) random()

Parameter Summary
return string to call a function to get random value inside an SQL statement
<strong>returns</strong> to generate float between 0 and 1

(string) day($column)

Parameter Summary
Returns day from dbms
<strong>returns</strong> to get day from dbms

(string) guid()

Parameter Summary

----------------- Brought to you by


Doctrine_Expression_Oracle 290

Returns global unique identifier


<strong>returns</strong> to get global unique identifier

(string) year($column)

Parameter Summary
Returns the year from dbms
<strong>returns</strong> to get year from dbms

Doctrine_Expression_Oracle

Method Summary
Returns Name Description
string random
string substring Note: Not SQL92, but common functionality.

string now There are three special variables for current date and time:
<
ul>
• CURRENT_TIMESTAMP (date and time, TIMESTAMP type)

Listing </li>
0-18
<li>
<p>CURRENT_DATE (date, DATE type)</p>
</li>
<li>
<p>CURRENT_TIME (time, TIME t

string guid
string concat concat() accepts an arbitrary number of parameters. Each parameter
must contain an expression

----------------- Brought to you by


Doctrine_Expression_Oracle 291

Method Details
(string) random()

Parameter Summary
<strong>returns</strong> an oracle SQL string that generates a float between 0 and 1

(string) substring($value, $position, $length = null)

Parameter Summary

$value an sql string literal or column name/alias


$position where to start the substring portion

$length the substring portion length

return string to call a function to get a substring inside an SQL statement


Note: Not SQL92, but common functionality.
<strong>returns</strong> SQL substring function with given parameters

(string) now($type = 'timestamp')

Parameter Summary
Return string to call a variable with the current timestamp inside an SQL statement
There are three special variables for current date and time: <ul> <li>
<p>CURRENT_TIMESTAMP (date and time, TIMESTAMP type)</p> </li> <li>
<p>CURRENT_DATE (date, DATE type)</p> </li> <li> <p>CURRENT_TIME (time, TIME t
<strong>returns</strong> to call a variable with the current timestamp

(string) guid()

Parameter Summary
Returns global unique identifier
<strong>returns</strong> to get global unique identifier

(string) concat($arg1,)

Parameter Summary

$arg1, $arg2 ... $argN strings that will be concatinated.

Returns a series of strings concatinated


concat() accepts an arbitrary number of parameters. Each parameter must contain an
expression

----------------- Brought to you by


Doctrine_Expression_Pgsql 292

Doctrine_Expression_Pgsql

Method Summary
Returns Name Description
string md5 Note: Not SQL92, but common functionality md5() works with the
default PostgreSQL 8 versions. If you are using PostgreSQL 7.x or
older you need to make sure that the digest procedure is installed.
If you use RPMS (Redhat and Mandrake) install the postgr
string matchPattern EXPERIMENTAL WARNING: this function is experimental and may
change signature at any time until labelled as non-experimental
string regexp
return random
string date_part
string substring Note: Not SQL92, but common functionality.
string now
string age
string to_char
string translate
string concat

Method Details
(string) md5($column)

Parameter Summary
Returns the md5 sum of a field.
Note: Not SQL92, but common functionality md5() works with the default PostgreSQL 8
versions. If you are using PostgreSQL 7.x or older you need to make sure that the digest
procedure is installed. If you use RPMS (Redhat and Mandrake) install the postgr

----------------- Brought to you by


Doctrine_Expression_Pgsql 293

(string) matchPattern($pattern, $operator = null, $field = null)

Parameter Summary

$pattern even keys are strings, odd are patterns (% and _)


$operator optional pattern operator (LIKE, ILIKE and maybe others in the future)

$field optional field name that is being matched against (might be required when
emulating ILIKE)

build a pattern matching string


EXPERIMENTAL WARNING: this function is experimental and may change signature at any
time until labelled as non-experimental
<strong>returns</strong> SQL pattern

(string) regexp()

Parameter Summary
<strong>returns</strong> the regular expression operator

(return) random()

Parameter Summary
return string to call a function to get random value inside an SQL statement
<strong>returns</strong> string to generate float between 0 and 1

(string) date_part($text, $time)

Parameter Summary

$text what to extract

$time timestamp or interval to extract from

PostgreSQLs DATE_PART( <text>, <time> ) function.

(string) substring($value, $from, $len = null)

Parameter Summary

$value the target $value the string or the string column.

$from extract from this characeter.

$len extract this amount of characters.

Returns part of a string.

----------------- Brought to you by


Doctrine_Expression_Pgsql 294

Note: Not SQL92, but common functionality.


<strong>returns</strong> sql that extracts part of a string.

(string) now()

Parameter Summary
Returns the SQL string to return the current system date and time.

(string) age($timestamp1, $timestamp2 = null)

Parameter Summary

$timestamp1 timestamp to subtract from NOW()

$timestamp2 optional; if given: subtract arguments

PostgreSQLs AGE(<timestamp1> [, <timestamp2>]) function.

(string) to_char($time, $text)

Parameter Summary

$time timestamp or interval

$text how to the format the output

PostgreSQLs TO_CHAR( <time>, <text> ) function.

(string) translate($string, $from, $to)

Parameter Summary
return syntax for pgsql TRANSLATE() dbms function

(string) concat((an) 0)

Parameter Summary

0 array of values

PostgreSQLs CONCAT() function

----------------- Brought to you by


Doctrine_Expression_Sqlite 295

Doctrine_Expression_Sqlite

Method Summary
Returns Name Description
rtrimImpl
string modImpl
string md5Impl
string locateImpl
sha1Impl
string regexp
string random
string substring Note: Not SQL92, but common functionality. SQLite only supports the
2 parameter variant of this function
string now
trimImpl
ltrimImpl
string soundex The string "?000" is returned if the argument is NULL.
string concatImpl

Method Details
rtrimImpl($str)

Parameter Summary

(string) modImpl($dividend, $divisor)

Parameter Summary
Returns the modules of the data that SQLite's mod() function receives.

----------------- Brought to you by


Doctrine_Expression_Sqlite 296

(string) md5Impl($data)

Parameter Summary
Returns the md5 sum of the data that SQLite's md5() function receives.

(string) locateImpl($substr, $str)

Parameter Summary

$substr literal string to find

$str literal string

locate returns the position of the first occurrence of substring $substr in string $str
that SQLite's locate() function receives

sha1Impl($str)

Parameter Summary

(string) regexp()

Parameter Summary
returns the regular expression operator

(string) random()

Parameter Summary
return string to call a function to get random value inside an SQL statement
<strong>returns</strong> to generate float between 0 and 1

(string) substring($value, $position, $length = null)

Parameter Summary

$value an sql string literal or column name/alias


$position where to start the substring portion

$length the substring portion length

return string to call a function to get a substring inside an SQL statement


Note: Not SQL92, but common functionality. SQLite only supports the 2 parameter variant of
this function
<strong>returns</strong> SQL substring function with given parameters

----------------- Brought to you by


Doctrine_File 297

(string) now($type = 'timestamp')

Parameter Summary
Return string to call a variable with the current timestamp inside an SQL statement
There are three special variables for current date and time.
<strong>returns</strong> sqlite function as string

trimImpl($str)

Parameter Summary

ltrimImpl($str)

Parameter Summary

(string) soundex($value)

Parameter Summary
soundex Returns a string to call a function to compute the soundex encoding of a
string
The string &quot;?000&quot; is returned if the argument is NULL.
<strong>returns</strong> SQL soundex function with given parameter

(string) concatImpl()

Parameter Summary
Returns a concatenation of the data that SQLite's concat() function receives.

Doctrine_File

Method Summary
Returns Name Description
setTableDefinition
get

----------------- Brought to you by


Doctrine_File_Index 298

setUp

Method Details
setTableDefinition()

Parameter Summary

get($name, $load = true)

Parameter Summary

setUp()

Parameter Summary

Doctrine_File_Index

Method Summary
Returns Name Description
setTableDefinition
setUp

Method Details
setTableDefinition()

Parameter Summary

setUp()

Parameter Summary

----------------- Brought to you by


Doctrine_Formatter 299

Doctrine_Formatter

Method Summary
Returns Name Description
string getIndexName
string fixIndexName
convertBooleans This method takes care of that conversion
string getSequenceName
string getTableName
string escapePattern EXPERIMENTAL WARNING: this function is experimental
and may change signature at any time until labelled as
non-experimental
mixed quote
string quoteIdentifier 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 usi
string quoteMultipleIdentifier
string fixSequenceName

Method Details
(string) getIndexName($idx)

Parameter Summary

$idx name of the index

adds index name formatting to a index name


<strong>returns</strong> formatted index name

----------------- Brought to you by


Doctrine_Formatter 300

(string) fixIndexName($idx)

Parameter Summary

$idx string that containts name of anl index

Removes any formatting in an index name using the 'idxname_format' option


<strong>returns</strong> name of the index with possible formatting removed

convertBooleans($item)

Parameter Summary
convertBooleans some drivers need the boolean values to be converted into integers
when using DQL API
This method takes care of that conversion

(string) getSequenceName($sqn)

Parameter Summary

$sqn name of the sequence

adds sequence name formatting to a sequence name


<strong>returns</strong> formatted sequence name

(string) getTableName($table)

Parameter Summary

$table name of the table

adds table name formatting to a table name


<strong>returns</strong> formatted table name

(string) escapePattern($text)

Parameter Summary

$text the input string to quote

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
<strong>returns</strong> quoted string

----------------- Brought to you by


Doctrine_Formatter 301

(mixed) quote($input, $type = null)

Parameter Summary

$input parameter to be quoted

quote quotes given input parameter

(string) quoteIdentifier($str, $checkOption = true)

Parameter Summary

$str identifier name to be quoted


$checkOption check the &apos;quote_identifier&apos; option

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&apos;t mean you SHOULD use them. In general, they
end up causing way more problems than they solve. Portability is broken by usi
<strong>returns</strong> quoted identifier string

(string) quoteMultipleIdentifier($arr, $checkOption = true)

Parameter Summary

$arr identifiers array to be quoted


$checkOption check the &apos;quote_identifier&apos; option

quoteMultipleIdentifier Quotes multiple identifier strings


<strong>returns</strong> quoted identifier string

(string) fixSequenceName($sqn)

Parameter Summary

$sqn string that containts name of a potential sequence

Removes any formatting in an sequence name using the 'seqname_format' option


<strong>returns</strong> name of the sequence with possible formatting removed

----------------- Brought to you by


Doctrine_Hook 302

Doctrine_Hook

Method Summary
Returns Name Description
setFieldParser
boolean hookWhere
hookLimit
boolean hookOrderby
getQuery
__construct
hookOffset
setTypeParser

Method Details
setFieldParser($field, (string|object) $parser)

Parameter Summary

$field field name


$parser parser name or custom parser object

(boolean) hookWhere($params)

Parameter Summary

$params an associative array containing field names and their values

hookWhere builds DQL query where part from given parameter array
<strong>returns</strong> whether or not the hooking was

----------------- Brought to you by


Doctrine_Hook 303

hookLimit($limit)

Parameter Summary
set the hook limit

(boolean) hookOrderby($params)

Parameter Summary

$params an array containing all fields which the built query should be ordered by

hookOrderBy builds DQL query orderby part from given parameter array
<strong>returns</strong> whether or not the hooking was successful

getQuery()

Parameter Summary
<strong>returns</strong> returns the query object associated with this hook

__construct((Doctrine_Query) $query)

Parameter Summary

$query the base query

hookOffset($offset)

Parameter Summary
set the hook offset

setTypeParser($type, (string|object) $parser)

Parameter Summary

$type type name


$parser parser name or custom parser object

----------------- Brought to you by


Doctrine_Hook_Equal 304

Doctrine_Hook_Equal

Method Summary
Returns Name Description
parse Parses given field and field value to DQL condition and parameters. This
method should always return prepared statement conditions (conditions
that use placeholders instead of literal values).

Method Details
parse($alias, $field, $value)

Parameter Summary

$alias component alias

$field the field name


$value the value of the field

Parses given field and field value to DQL condition and parameters. This method should
always return prepared statement conditions (conditions that use placeholders instead of
literal values).

----------------- Brought to you by


Doctrine_Hook_Integer 305

Doctrine_Hook_Integer

Method Summary
Returns Name Description
parseSingle Parses given field and field value to DQL condition and parameters.
This method should always return prepared statement conditions
(conditions that use placeholders instead of literal values).

Method Details
parseSingle($alias, $field, $value)

Parameter Summary

$alias component alias

$field the field name


$value the value of the field

parse
Parses given field and field value to DQL condition and parameters. This method should
always return prepared statement conditions (conditions that use placeholders instead of
literal values).

----------------- Brought to you by


Doctrine_Hook_Parser 306

Doctrine_Hook_Parser

Method Summary
Returns Name Description
array getParams
parse Parses given field and field value to DQL condition and parameters.
This method should always return prepared statement conditions
(conditions that use placeholders instead of literal values).
getCondition

Method Details
(array) getParams()

Parameter Summary
getParams returns the parameters associated with this parser

parse($alias, $field, $value)

Parameter Summary

$alias component alias

$field the field name


$value the value of the field

Parses given field and field value to DQL condition and parameters. This method should
always return prepared statement conditions (conditions that use placeholders instead of
literal values).

getCondition()

Parameter Summary

----------------- Brought to you by


Doctrine_Hook_Parser_Complex 307

Doctrine_Hook_Parser_Complex

Method Summary
Returns Name Description
parseSingle
parse Parses given field and field value to DQL condition and parameters.
This method should always return prepared statement conditions
(conditions that use placeholders instead of literal values).
parseClause
__construct

Method Details
parseSingle($alias, $field, $value)

Parameter Summary

$alias component alias

$field the field name


$value the value of the field

parse($alias, $field, $value)

Parameter Summary

$alias component alias

$field the field name


$value the value of the field

Parses given field and field value to DQL condition and parameters. This method should
always return prepared statement conditions (conditions that use placeholders instead of
literal values).

----------------- Brought to you by


Doctrine_Hook_WordLike 308

parseClause($alias, $field, $value)

Parameter Summary

$alias component alias

$field the field name


$value the value of the field

__construct()

Parameter Summary
Constructor.

Doctrine_Hook_WordLike

Method Summary
Returns Name Description
parseSingle Parses given field and field value to DQL condition and parameters.
This method should always return prepared statement conditions
(conditions that use placeholders instead of literal values).

Method Details
parseSingle($alias, $field, $value)

Parameter Summary

$alias component alias

$field the field name


$value the value of the field

parse

----------------- Brought to you by


Doctrine_Hydrator 309

Parses given field and field value to DQL condition and parameters. This method should
always return prepared statement conditions (conditions that use placeholders instead of
literal values).

Doctrine_Hydrator

Method Summary
Returns Name Description
array hydrateResultSet This is method defines the core of Doctrine's object population
algorithm hence this method strives to be as fast as possible
The key idea is the loop over the rowset only once doing all the
needed operations within this massive loop.
array _gatherRowData

Method Details
(array) hydrateResultSet($stmt, $tableAliases, $aliasMap)

Parameter Summary

$tableAliases Array that maps table aliases (SQL alias =&gt; DQL alias)

$aliasMap Array that maps DQL aliases to their components (DQL alias =&gt; array(
&apos;table&apos; =&gt; Table object, &apos;parent&apos; =&gt; Parent
DQL alias (if any), &apos

hydrateResultSet parses the data returned by statement object


This is method defines the core of Doctrine&apos;s object population algorithm hence this
method strives to be as fast as possible The key idea is the loop over the rowset only once
doing all the needed operations within this massive loop.

(array) _gatherRowData([[[amp]]]$data, [[[amp]]]$cache, [[[amp]]]$id,


[[[amp]]]$nonemptyComponents)

Parameter Summary

----------------- Brought to you by


Doctrine_Hydrator_Abstract 310

Puts the fields of a data row into a new array, grouped by the component they belong
to. The column names in the result set are mapped to their field names during this
procedure.
<strong>returns</strong> An array with all the fields (name =&gt; value) of the data row,
grouped by their component (alias).

Doctrine_Hydrator_Abstract

Method Summary
Returns Name Description
integer getHydrationMode
array hydrateResultSet This is method defines the core of Doctrine object
population algorithm hence this method strives to
be as fast as possible The key idea is the loop over
the rowset only once doing all the needed
operations within this massive loop.
setHydrationMode
__construct
Doctrine_Hydrate setQueryComponents
array getQueryComponents

Method Details
(integer) getHydrationMode()

Parameter Summary
Get the fetchmode
<strong>returns</strong> One of the Doctrine::HYDRATE_* constants

(array) hydrateResultSet($stmt, $tableAliases)

Parameter Summary
parseData parses the data returned by statement object

----------------- Brought to you by


Doctrine_Hydrator_ArrayDriver 311

This is method defines the core of Doctrine object population algorithm hence this method
strives to be as fast as possible The key idea is the loop over the rowset only once doing all
the needed operations within this massive loop.

setHydrationMode($hydrationMode, $fetchmode)

Parameter Summary

$fetchmode One of the Doctrine::HYDRATE_* constants.

Sets the fetchmode.

__construct((Doctrine_Connection|null) $connection)

Parameter Summary
constructor

(Doctrine_Hydrate) setQueryComponents($queryComponents, $map)

Parameter Summary

$map alias map

setAliasMap sets the whole component alias map


<strong>returns</strong> this object

(array) getQueryComponents()

Parameter Summary
getAliasMap returns the component alias map
<strong>returns</strong> component alias map

Doctrine_Hydrator_ArrayDriver

Method Summary
Returns Name Description

----------------- Brought to you by


Doctrine_Hydrator_ArrayDriver 312

setLastElement
initRelated
getNullPointer
getLastKey
getElementCollection
registerCollection
flush
getElement

Method Details
setLastElement([[[amp]]]$prev, [[[amp]]]$coll, (boolean|integer) $index,
$dqlAlias, $oneToOne)

Parameter Summary
sets the last element of given data array / collection as previous element

initRelated([[[amp]]]$data, $name)

Parameter Summary

getNullPointer()

Parameter Summary

getLastKey([[[amp]]]$data)

Parameter Summary

getElementCollection($component)

Parameter Summary

registerCollection($coll)

Parameter Summary

flush()

Parameter Summary

----------------- Brought to you by


Doctrine_Hydrator_RecordDriver 313

getElement($data, $component)

Parameter Summary

Doctrine_Hydrator_RecordDriver

Method Summary
Returns Name Description
setLastElement
initRelated
getNullPointer
getLastKey
getElementCollection
registerCollection
flush
string _getClassnameToReturn Check the subclasses option and the inheritanceMap for
each subclass to see if all the maps in a subclass is met.
If this is the case return that subclass name. If no
subclasses match or if there are no subclasses defined
return the name of the class f
getElement

Method Details
setLastElement([[[amp]]]$prev, [[[amp]]]$coll, (boolean|integer) $index,
$dqlAlias, $oneToOne)

Parameter Summary
sets the last element of given data array / collection as previous element

initRelated(( ) $record, $name)

Parameter Summary

----------------- Brought to you by


Doctrine_Hydrator_RecordDriver 314

getNullPointer()

Parameter Summary

getLastKey($coll)

Parameter Summary

getElementCollection($component)

Parameter Summary

registerCollection(( ) $coll)

Parameter Summary

flush()

Parameter Summary

(string) _getClassnameToReturn([[[amp]]]$data, $component)

Parameter Summary
Get the classname to return. Most often this is just the options&[apos;name']
Check the subclasses option and the inheritanceMap for each subclass to see if all the maps
in a subclass is met. If this is the case return that subclass name. If no subclasses match or if
there are no subclasses defined return the name of the class f
<strong>returns</strong> The name of the class to create

getElement($data, $component)

Parameter Summary

----------------- Brought to you by


Doctrine_I18n 315

Doctrine_I18n

Method Summary
Returns Name Description
setTableDefinition
__construct
buildRelation

Method Details
setTableDefinition($Doctrine_Table)

Parameter Summary
buildDefinition

__construct($options)

Parameter Summary

buildRelation()

Parameter Summary

----------------- Brought to you by


Doctrine_Import 316

Doctrine_Import

Method Summary
Returns Name Description
boolean userExists
boolean viewExists
array listTableViews
boolean databaseExists
array listTableIndexes
array listTableColumns
boolean tableExists
array listViews
array listDatabases
boolean tableIndexExists
boolean tableViewExists
boolean functionExists
array listUsers
array listTables
boolean tableTriggerExists
array importSchema method for importing existing schema to Doctrine_Record
classes
boolean tableConstraintExists
array listFunctions
array listTableConstraints
array listTriggers
boolean triggerExists
boolean tableColumnExists
array listTableRelations Expects an array of this format to be returned with all the
relationships in it where the key is the name of the foreign
table, and the value is an array containing the local and
foreign column name Array ( [groups] => Array ( [local
array listSequences

----------------- Brought to you by


Doctrine_Import 317

boolean sequenceExists
array listTableTriggers

Method Details
(boolean) userExists($user)

Parameter Summary
checks if a user exists

(boolean) viewExists($view, (string|null) $database = null)

Parameter Summary
checks if a view exists

(array) listTableViews($table)

Parameter Summary

$table database table name

lists table views

(boolean) databaseExists($database)

Parameter Summary
checks if a database exists

(array) listTableIndexes($table)

Parameter Summary

$table database table name

lists table constraints

(array) listTableColumns($table)

Parameter Summary

$table database table name

lists table constraints

----------------- Brought to you by


Doctrine_Import 318

(boolean) tableExists($table, (string|null) $database = null)

Parameter Summary
checks if a table exists

(array) listViews((string|null) $database = null)

Parameter Summary
lists database views

(array) listDatabases()

Parameter Summary
lists all databases

(boolean) tableIndexExists($index, $table)

Parameter Summary

$table database table name

checks if a table index exists

(boolean) tableViewExists($view, $table)

Parameter Summary

$table database table name

checks if a table view exists

(boolean) functionExists($function)

Parameter Summary
checks if a function exists

(array) listUsers()

Parameter Summary
lists database users

----------------- Brought to you by


Doctrine_Import 319

(array) listTables((string|null) $database = null)

Parameter Summary
lists tables

(boolean) tableTriggerExists($trigger, $table)

Parameter Summary

$table database table name

checks if a table trigger exists

(array) importSchema($directory, $databases = array(), $options =


array())

Parameter Summary
method for importing existing schema to Doctrine_Record classes
<strong>returns</strong> the names of the imported classes

(boolean) tableConstraintExists($constraint, $table)

Parameter Summary

$table database table name

checks if a table constraint exists

(array) listFunctions()

Parameter Summary
lists all availible database functions

(array) listTableConstraints($table)

Parameter Summary

$table database table name

lists table constraints

(array) listTriggers((string|null) $database = null)

Parameter Summary

----------------- Brought to you by


Doctrine_Import 320

lists all database triggers

(boolean) triggerExists($trigger, (string|null) $database = null)

Parameter Summary
checks if a trigger exists

(boolean) tableColumnExists($column, $table)

Parameter Summary

$table database table name

checks if a table column exists

(array) listTableRelations($table)

Parameter Summary

$table database table name

lists table relations


Expects an array of this format to be returned with all the relationships in it where the key is
the name of the foreign table, and the value is an array containing the local and foreign
column name Array ( [groups] =&gt; Array ( [local

(array) listSequences((string|null) $database = null)

Parameter Summary
lists all database sequences

(boolean) sequenceExists($sequence, (string|null) $database = null)

Parameter Summary
checks if a sequence exists

(array) listTableTriggers($table)

Parameter Summary

$table database table name

lists table triggers

----------------- Brought to you by


Doctrine_Import_Builder 321

Doctrine_Import_Builder

Method Summary
Returns Name Description
setSuffix
buildAttributes
string buildDefinition
buildActAs
setTargetPath
setBaseClassPrefix
setPackagesPrefix
setBaseClassesDirectory
setOptions
writeDefinition
buildIndexes
setBaseClassName
writeTableDefinition
string buildChecks
loadTemplate Loads the class template used for generating classes
string buildSetUp
buildAccessors
__construct
string getTargetPath
buildTableDefinition
buildColumns
setPackagesPath
setOption
string buildListeners
buildRecord
buildPhpDocs
getBaseClassPrefix
buildOptions

----------------- Brought to you by


Doctrine_Import_Builder 322

boolean generateTableClasses Specify whether or not to generate children table


classes
boolean generateBaseClasses Specify whether or not to generate classes which extend
from generated base classes

Method Details
setSuffix($suffix)

Parameter Summary

buildAttributes($attributes, $array)

Parameter Summary

(string) buildDefinition($definition)

Parameter Summary

buildActAs($actAs)

Parameter Summary

$actAs array of plugin definitions and options

buildActAs: builds a complete actAs code. It supports hierarchy of plugins

setTargetPath($path)

Parameter Summary

$path path the path where imported files are being generated

setBaseClassPrefix($prefix)

Parameter Summary

setPackagesPrefix($packagesPrefix)

Parameter Summary
setPackagePath

----------------- Brought to you by


Doctrine_Import_Builder 323

setBaseClassesDirectory($baseClassesDirectory)

Parameter Summary

setOptions($options)

Parameter Summary

writeDefinition($definition, $options, $columns, $relations, $indexes,


$attributes, $templates, $actAs)

Parameter Summary

buildIndexes($indexes, $array)

Parameter Summary

setBaseClassName($className)

Parameter Summary

writeTableDefinition($className, $path, $options = array())

Parameter Summary

(string) buildChecks($checks)

Parameter Summary
Build php code for record checks

loadTemplate()

Parameter Summary
Loads the class template used for generating classes

(string) buildSetUp($definition, $options, $columns, $relations)

Parameter Summary

buildAccessors($definition)

Parameter Summary

----------------- Brought to you by


Doctrine_Import_Builder 324

__construct()

Parameter Summary

(string) getTargetPath()

Parameter Summary
<strong>returns</strong> the path where imported files are being generated

buildTableDefinition($definition)

Parameter Summary

buildColumns($columns, $array)

Parameter Summary

setPackagesPath($packagesPath)

Parameter Summary

setOption($key, $value)

Parameter Summary

(string) buildListeners($listeners)

Parameter Summary
Build php code for adding record listeners

buildRecord($definition, $options, $columns, $relations, $indexes,


$attributes, $templates, $actAs)

Parameter Summary

buildPhpDocs($definition)

Parameter Summary

getBaseClassPrefix()

Parameter Summary

----------------- Brought to you by


Doctrine_Import_Firebird 325

buildOptions($options, $array)

Parameter Summary
buildTableOptions

(boolean) generateTableClasses($bool = null)

Parameter Summary
Specify whether or not to generate children table classes

(boolean) generateBaseClasses($bool = null)

Parameter Summary
Specify whether or not to generate classes which extend from generated base classes

Doctrine_Import_Firebird

Method Summary
Returns Name Description
array listTableViews
mixed listTableColumns
array listViews
array listUsers
array listTables
array listFunctions
array listTableTriggers

----------------- Brought to you by


Doctrine_Import_Firebird 326

Method Details
(array) listTableViews($table)

Parameter Summary

$table table for which all references views should be found

list the views in the database that reference a given table


<strong>returns</strong> data array containing all views for given table

(mixed) listTableColumns($table)

Parameter Summary

$table name of table that should be used in method

list all fields in a tables in the current database


<strong>returns</strong> data array on success, a MDB2 error on failure

(array) listViews($database = null)

Parameter Summary
list the views in the database
<strong>returns</strong> data array containing all database views

(array) listUsers()

Parameter Summary
list all users
<strong>returns</strong> data array containing all database users

(array) listTables($database = null)

Parameter Summary
list all tables in the current database
<strong>returns</strong> data array

(array) listFunctions()

Parameter Summary
list all functions in the current database
<strong>returns</strong> data array containing all availible functions

----------------- Brought to you by


Doctrine_Import_Mssql 327

(array) listTableTriggers($table)

Parameter Summary

$table The name of the table from the previous database to query against.

This function will be called to get all triggers of the current database ($this->conn-
>getDatabase())
<strong>returns</strong> data array containing all triggers for given table

Doctrine_Import_Mssql

Method Summary
Returns Name Description
array listTableViews
array listTableIndexes
array listTableColumns
array listViews
array listTables
array listTriggers
array listTableRelations Expects an array of this format to be returned with all the
relationships in it where the key is the name of the foreign
table, and the value is an array containing the local and foreign
column name Array ( [groups] => Array ( [local
array listSequences
array listTableTriggers

Method Details
(array) listTableViews($table)

Parameter Summary

$table database table name

----------------- Brought to you by


Doctrine_Import_Mssql 328

lists table views

(array) listTableIndexes($table)

Parameter Summary

$table database table name

lists table constraints

(array) listTableColumns($table)

Parameter Summary

$table database table name

lists table constraints

(array) listViews((string|null) $database = null)

Parameter Summary
lists database views

(array) listTables((string|null) $database = null)

Parameter Summary
lists tables

(array) listTriggers($database = null)

Parameter Summary
lists all triggers

(array) listTableRelations($tableName, $table)

Parameter Summary

$table database table name

lists table relations


Expects an array of this format to be returned with all the relationships in it where the key is
the name of the foreign table, and the value is an array containing the local and foreign
column name Array ( [groups] =&gt; Array ( [local

----------------- Brought to you by


Doctrine_Import_Mysql 329

(array) listSequences((string|null) $database = null)

Parameter Summary
lists all database sequences

(array) listTableTriggers($table)

Parameter Summary

$table database table name

lists table triggers

Doctrine_Import_Mysql

Method Summary
Returns Name Description
array listTableIndexes
array listTableColumns
array listViews
array listTables
array listTableConstraints
array listTableRelations Expects an array of this format to be returned with all the
relationships in it where the key is the name of the foreign
table, and the value is an array containing the local and
foreign column name Array ( [groups] => Array ( [local
array listSequences

----------------- Brought to you by


Doctrine_Import_Mysql 330

Method Details
(array) listTableIndexes($table)

Parameter Summary

$table database table name

lists table constraints

(array) listTableColumns($table)

Parameter Summary

$table database table name

lists table constraints

(array) listViews((string|null) $database = null)

Parameter Summary
lists database views

(array) listTables((string|null) $database = null)

Parameter Summary
lists tables

(array) listTableConstraints($table)

Parameter Summary

$table database table name

lists table constraints

(array) listTableRelations($tableName, $table)

Parameter Summary

$table database table name

lists table relations

----------------- Brought to you by


Doctrine_Import_Oracle 331

Expects an array of this format to be returned with all the relationships in it where the key is
the name of the foreign table, and the value is an array containing the local and foreign
column name Array ( [groups] =&gt; Array ( [local

(array) listSequences((string|null) $database = null)

Parameter Summary
lists all database sequences

Doctrine_Import_Oracle

Method Summary
Returns Name Description
array listTableViews
array listTableIndexes
array listTableColumns
array listViews
array listDatabases
array listUsers
array listTables
array listFunctions
array listTableConstraints
array listTriggers
listTableRelations
array listSequences
array listTableTriggers

----------------- Brought to you by


Doctrine_Import_Oracle 332

Method Details
(array) listTableViews($table)

Parameter Summary

$table database table name

lists table views

(array) listTableIndexes($table)

Parameter Summary

$table database table name

lists table constraints

(array) listTableColumns($table)

Parameter Summary

$table database table name

lists table constraints

(array) listViews((string|null) $database = null)

Parameter Summary
lists database views

(array) listDatabases()

Parameter Summary
lists all databases

(array) listUsers()

Parameter Summary
lists database users

(array) listTables((string|null) $database = null)

Parameter Summary

----------------- Brought to you by


Doctrine_Import_Oracle 333

lists tables

(array) listFunctions()

Parameter Summary
lists all availible database functions

(array) listTableConstraints($table)

Parameter Summary

$table database table name

lists table constraints

(array) listTriggers((string|null) $database = null)

Parameter Summary
lists all database triggers

listTableRelations($table)

Parameter Summary
list table relations

(array) listSequences((string|null) $database = null)

Parameter Summary
lists all database sequences

(array) listTableTriggers($table)

Parameter Summary

$table database table name

lists table triggers

----------------- Brought to you by


Doctrine_Import_Pgsql 334

Doctrine_Import_Pgsql

Method Summary
Returns Name Description
array listTableViews
array listTableIndexes
array listTableColumns
array listTables
array listTableConstraints
array listTriggers
listTableRelations
array listTableTriggers

Method Details
(array) listTableViews($table)

Parameter Summary

$table database table name

list the views in the database that reference a given table

(array) listTableIndexes($table)

Parameter Summary

$table database table name

list all indexes in a table

----------------- Brought to you by


Doctrine_Import_Pgsql 335

(array) listTableColumns($table)

Parameter Summary

$table database table name

lists table constraints

(array) listTables((string|null) $database = null)

Parameter Summary
lists tables

(array) listTableConstraints($table)

Parameter Summary

$table database table name

lists table constraints

(array) listTriggers((string|null) $database = null)

Parameter Summary
lists all database triggers

listTableRelations($table)

Parameter Summary

(array) listTableTriggers($table)

Parameter Summary

$table database table name

lists table triggers

----------------- Brought to you by


Doctrine_Import_Schema 336

Doctrine_Import_Schema

Method Summary
Returns Name Description
getOption
getOptions
_processInheritance Perform some processing on inheritance. Sets
the default type and sets some default values
for certain types
setOptions
importSchema A method to import a Schema and translate it
into a Doctrine_Record object
array buildSchema Loop throug directories of schema files and
parse them all in to one complete array of
schema information
_fixDuplicateRelations Ensure the relations for each class are unique
and that no duplicated relations exist from the
auto generated relations and the user
explicitely defining the opposite end
setOption
_autoCompleteOppositeRelations Loop through all relationships building the
opposite ends of each relationship and make
sure no duplicate relations exist
_validateSchemaElement
_buildRelationships Loop through an array of schema information
and build all the necessary relationship
information Will attempt to auto complete
relationships and simplify the amount of
information required for defining a relationship
array parseSchema A method to parse a Schema and translate it
into a property array. The function returns that
property array.
_buildUniqueRelationKey Build a unique key to identify a relationship by
Md5 hash of all the relationship parameters

----------------- Brought to you by


Doctrine_Import_Schema 337

string _findBaseSuperClass

Method Details
getOption($name)

Parameter Summary

getOptions()

Parameter Summary

_processInheritance($array)

Parameter Summary
Perform some processing on inheritance. Sets the default type and sets some default values
for certain types

setOptions($options)

Parameter Summary

importSchema($schema, $format = 'yml', $directory = null, $models =


array())

Parameter Summary

$schema The file containing the XML schema


$format Format of the schema file
$directory The directory where the Doctrine_Record class will be written

$models Optional array of models to import

A method to import a Schema and translate it into a Doctrine_Record object

(array) buildSchema($schema, $format)

Parameter Summary

$schema Array of schema files or single schema file. Array of directories with schema files
or single directory
$format Format of the files we are parsing and building from

----------------- Brought to you by


Doctrine_Import_Schema 338

Loop throug directories of schema files and parse them all in to one complete array of schema
information

_fixDuplicateRelations()

Parameter Summary
Ensure the relations for each class are unique and that no duplicated relations exist from the
auto generated relations and the user explicitely defining the opposite end

setOption($name, $value)

Parameter Summary

_autoCompleteOppositeRelations()

Parameter Summary
fixRelationships
Loop through all relationships building the opposite ends of each relationship and make sure
no duplicate relations exist

_validateSchemaElement($name, $element, $path, $value)

Parameter Summary

_buildRelationships($array)

Parameter Summary
buildRelationships
Loop through an array of schema information and build all the necessary relationship
information Will attempt to auto complete relationships and simplify the amount of
information required for defining a relationship

(array) parseSchema($schema, $type)

Parameter Summary

$schema Path to the file containing the schema

$type Format type of the schema we are parsing

A method to parse a Schema and translate it into a property array. The function returns that
property array.
<strong>returns</strong> Built array of schema information

----------------- Brought to you by


Doctrine_Import_Sqlite 339

_buildUniqueRelationKey($relation)

Parameter Summary
Build a unique key to identify a relationship by Md5 hash of all the relationship parameters

(string) _findBaseSuperClass($array, $class)

Parameter Summary

$array Array of schema information

Find the base super class for this inheritance child. We need to move all levels of
children to the top most parent.
<strong>returns</strong> Class to get find the parent for

Doctrine_Import_Sqlite

Method Summary
Returns Name Description
array listTableViews
array listTableIndexes
array listTableColumns
array listViews
array listDatabases
array listUsers
array listTables
array listFunctions
array listTableConstraints
array listTriggers
array listSequences
array listTableTriggers

----------------- Brought to you by


Doctrine_Import_Sqlite 340

Method Details
(array) listTableViews($table)

Parameter Summary

$table database table name

lists table views

(array) listTableIndexes($table)

Parameter Summary

$table database table name

lists table constraints

(array) listTableColumns($table)

Parameter Summary

$table database table name

lists table constraints

(array) listViews((string|null) $database = null)

Parameter Summary
lists database views

(array) listDatabases()

Parameter Summary
lists all databases

(array) listUsers()

Parameter Summary
lists database users

(array) listTables((string|null) $database = null)

Parameter Summary

----------------- Brought to you by


Doctrine_Import_Sqlite 341

lists tables

(array) listFunctions()

Parameter Summary
lists all availible database functions

(array) listTableConstraints($table)

Parameter Summary

$table database table name

lists table constraints

(array) listTriggers((string|null) $database = null)

Parameter Summary
lists all database triggers

(array) listSequences((string|null) $database = null)

Parameter Summary
lists all database sequences

(array) listTableTriggers($table)

Parameter Summary

$table database table name

lists table triggers

----------------- Brought to you by


Doctrine_Inflector 342

Doctrine_Inflector

Method Summary
Returns Name Description
string classify
boolean seemsUtf8 By bmorel at ssi dot fr
string urlize
string classifyCallback
string unaccent
string tableize

Method Details
(string) classify($word)

Parameter Summary

$word Word to classify

Convert a word in to the format for a Doctrine class name. Converts 'table_name' to
'TableName'
<strong>returns</strong> Classified word

(boolean) seemsUtf8($string)

Parameter Summary
Check if a string has utf7 characters in it
By bmorel at ssi dot fr

----------------- Brought to you by


Doctrine_Inflector 343

(string) urlize($text)

Parameter Summary

$text Text to urlize

Convert any passed string to a url friendly string. Converts 'My first blog post' to
'my-first-blog-post'
<strong>returns</strong> Urlized text

(string) classifyCallback($matches)

Parameter Summary

$matches An array of matches from a pcre_replace call

Callback function to classify a classname properly.


<strong>returns</strong> A string with matches 1 and mathces 3 in upper case.

(string) unaccent($string)

Parameter Summary

$string String to unaccent

Remove any illegal characters, accents, etc.


<strong>returns</strong> Unaccented string

(string) tableize($word)

Parameter Summary

$word Word to tableize

Convert word in to the format for a Doctrine table name. Converts 'ModelName' to
'model_name'
<strong>returns</strong> Tableized word

----------------- Brought to you by


Doctrine_IntegrityMapper 344

Doctrine_IntegrityMapper

Method Summary
Returns Name Description
buildIntegrityRelations
processDeleteIntegrity
invokeIntegrityActions
array buildIntegrityRelationQuery

Method Details
buildIntegrityRelations(( ) $table, [[[amp]]]$aliases, [[[amp]]]$fields,
[[[amp]]]$indexes, [[[amp]]]$components, $aliases, $fields, $indexes,
$components)

Parameter Summary

processDeleteIntegrity(( ) $record)

Parameter Summary

invokeIntegrityActions(( ) $record)

Parameter Summary

(array) buildIntegrityRelationQuery(( ) $record)

Parameter Summary
<strong>returns</strong> The result

----------------- Brought to you by


Doctrine_Lib 345

Doctrine_Lib

Method Summary
Returns Name Description
string getTableAsString returns a string representation of Doctrine_Table
object
makeDirectories Makes the directories for a path recursively
string getCollectionAsString returns a string representation of
Doctrine_Collection object
string getConnectionAsString returns a string representation of
Doctrine_Connection object
copyDirectory
string formatSql
boolean isValidClassName checks for valid class name (uses camel case and
underscores)
string getRecordStateAsString
getConnectionStateAsString returns a given connection state as string

removeDirectories
arrayDeepMerge
string getRecordAsString returns a string representation of Doctrine_Record
object

Method Details
(string) getTableAsString(( ) $table)

Parameter Summary
returns a string representation of Doctrine_Table object

----------------- Brought to you by


Doctrine_Lib 346

makeDirectories($path, $mode = 0777)

Parameter Summary
Makes the directories for a path recursively

(string) getCollectionAsString(( ) $collection)

Parameter Summary
returns a string representation of Doctrine_Collection object

(string) getConnectionAsString(( ) $connection)

Parameter Summary
returns a string representation of Doctrine_Connection object

copyDirectory($source, $dest)

Parameter Summary

(string) formatSql($sql)

Parameter Summary
<strong>returns</strong> the formated sql

(boolean) isValidClassName($className, $classname)

Parameter Summary
checks for valid class name (uses camel case and underscores)

(string) getRecordStateAsString($state)

Parameter Summary

$state the state of record

<strong>returns</strong> string representation of given state

getConnectionStateAsString($state)

Parameter Summary

$state State of the connection as a string

----------------- Brought to you by


Doctrine_Locking_Manager_Pessimistic 347

returns a given connection state as string

removeDirectories($folderPath)

Parameter Summary

arrayDeepMerge()

Parameter Summary

(string) getRecordAsString(( ) $record)

Parameter Summary
returns a string representation of Doctrine_Record object

Doctrine_Locking_Manager_Pessimistic

Method Summary
Returns Name Description
__construct When the CREATE_TABLES attribute of the connection on
which the manager is supposed to work on is set to true, the
locking table is created.
integer releaseAgedLocks When called without parameters all locks older than 15
minutes are released.
mixed getLockOwner
boolean releaseLock
boolean getLock

----------------- Brought to you by


Doctrine_Locking_Manager_Pessimistic 348

Method Details
__construct(( ) $conn)

Parameter Summary

$conn The database connection to use

Constructs a new locking manager object


When the CREATE_TABLES attribute of the connection on which the manager is supposed to
work on is set to true, the locking table is created.

(integer) releaseAgedLocks($age = 900, $objectType = null, $userIdent


= null)

Parameter Summary

$age The maximum valid age of locks in seconds


$objectType The type of the object (component name)

$userIdent The unique identifier of the locking user

Releases locks older than a defined amount of seconds


When called without parameters all locks older than 15 minutes are released.
<strong>returns</strong> The number of locks that have been released
<strong>throws</strong> Doctrine_Locking_Exception If the release process failed due to
database errors

(mixed) getLockOwner((Doctrine_Record) $lockedRecord)

Parameter Summary

$lockedRecord The record.

Gets the identifier that identifies the owner of the lock on the given record.
<strong>returns</strong> The unique user identifier that identifies the owner of the lock.

(boolean) releaseLock(( ) $record, $userIdent)

Parameter Summary

$record The record for which the lock has to be released


$userIdent The unique identifier of the locking user

Releases a lock on a
<strong>returns</strong> TRUE if a lock was released, FALSE if no lock was released

----------------- Brought to you by


Doctrine_Manager 349

<strong>throws</strong> Doctrine_Locking_Exception If the release procedure failed due to


database errors

(boolean) getLock(( ) $record, $userIdent)

Parameter Summary

$record The record that has to be locked


$userIdent A unique identifier of the locking user

Obtains a lock on a
<strong>returns</strong> TRUE if the locking was successful, FALSE if another user holds
a lock on this record
<strong>throws</strong> Doctrine_Locking_Exception If the locking failed due to database
errors

Doctrine_Manager

Method Summary
Returns Name Description
connection if the adapter paramater is not set this method
acts as a short cut for
Doctrine_Manager::getInstance()-
>getCurrentConnection()
getConnectionForComponent
boolean bindComponent
boolean hasConnectionForComponent
array _buildDsnPartsArray
getInstance
createDatabases
string __toString
boolean contains
getCurrentConnection
setQueryRegistry
openConnection

----------------- Brought to you by


Doctrine_Manager 350

registerValidators
integer count
array getConnections
dropDatabases
boolean setDefaultAttributes
string getConnectionName
ArrayIterator getIterator
getConnection
array getValidators
setCurrentConnection
getQueryRegistry
array parsePdoDsn
closeConnection
array parseDsn

Method Details
connection((PDO|Doctrine_Adapter_Interface) $adapter = null, $name =
null)

Parameter Summary

$adapter database driver

$name name of the connection, if empty numeric key is used

Open a new connection. If the adapter parameter is set this method acts as a short
cut for Doctrine_Manager::getInstance()->openConnection($adapter, $name);
if the adapter paramater is not set this method acts as a short cut for
Doctrine_Manager::getInstance()-&gt;getCurrentConnection()
<strong>throws</strong> Doctrine_Manager_Exception if trying to bind a connection with
an existing name

getConnectionForComponent($componentName)

Parameter Summary
Get the connection instance for the specified component

(boolean) bindComponent($componentName, $connectionName)

Parameter Summary

----------------- Brought to you by


Doctrine_Manager 351

Binds given component to given connection this means that when ever the given
component uses a connection it will be using the bound connection instead of the
current connection

(boolean) hasConnectionForComponent($componentName = null)

Parameter Summary
Check if a component is bound to a connection

(array) _buildDsnPartsArray($dsn)

Parameter Summary
Build the blank dsn parts array used with parseDsn()

getInstance()

Parameter Summary
Returns an instance of this class (this class uses the singleton pattern)

createDatabases($specifiedConnections = array())

Parameter Summary

$specifiedConnections Array of connections you wish to create the database for

Creates databases for all existing connections

(string) __toString()

Parameter Summary
Returns a string representation of this object

(boolean) contains($key)

Parameter Summary

$key the connection key

Whether or not the manager contains specified connection

getCurrentConnection()

Parameter Summary
Get the current connection instance

----------------- Brought to you by


Doctrine_Manager 352

<strong>throws</strong> Doctrine_Connection_Exception if there are no open connections

setQueryRegistry(( ) $registry)

Parameter Summary
Sets the query registry
<strong>returns</strong> this object

openConnection((PDO|Doctrine_Adapter_Interface) $adapter, $name =


null, $setCurrent = true)

Parameter Summary

$adapter database driver

$name name of the connection, if empty numeric key is used

Opens a new connection and saves it to Doctrine_Manager->connections


<strong>throws</strong> Doctrine_Manager_Exception if trying to open connection for
unknown driver

registerValidators($validators)

Parameter Summary

$validators ?Name of validator or array of validators

Register validators so that Doctrine is aware of them

(integer) count()

Parameter Summary
Returns the number of opened connections

(array) getConnections()

Parameter Summary
Returns all opened connections

dropDatabases($specifiedConnections = array())

Parameter Summary

$specifiedConnections Array of connections you wish to drop the database for

----------------- Brought to you by


Doctrine_Manager 353

Drops databases for all existing connections

(boolean) setDefaultAttributes()

Parameter Summary
setDefaultAttributes sets default attributes

(string) getConnectionName(( ) $conn)

Parameter Summary

$conn connection object to be searched for

Get the name of the passed connection instance


<strong>returns</strong> the name of the connection

(ArrayIterator) getIterator()

Parameter Summary
Returns an ArrayIterator that iterates through all connections

getConnection($name)

Parameter Summary

$name name of the connection, if empty numeric key is used

Get the connection instance for the passed name


<strong>throws</strong> Doctrine_Manager_Exception if trying to get a non-existent
connection

(array) getValidators()

Parameter Summary
Get available doctrine validators

setCurrentConnection($key)

Parameter Summary

$key the connection key

Sets the current connection to $key


<strong>throws</strong> InvalidKeyException

----------------- Brought to you by


Doctrine_Migration 354

getQueryRegistry()

Parameter Summary
Lazy-initializes the query registry object and returns it

(array) parsePdoDsn($dsn)

Parameter Summary

$dsn An array of dsn information

Parse a pdo style dsn in to an array of parts


<strong>returns</strong> The array parsed

closeConnection(( ) $connection)

Parameter Summary
Closes the specified connection

(array) parseDsn($dsn)

Parameter Summary
Parse a Doctrine style dsn string in to an array of parts
<strong>returns</strong> Parsed contents of DSN

Doctrine_Migration

Method Summary
Returns Name Description
_transaction
integer getNextVersion
boolean _createMigrationTable
getMigrationClass
string getMigrationClassesDirectory

----------------- Brought to you by


Doctrine_Migration 355

integer getNextMigrationClassVersion
setTableName
string getTableName
boolean migrateDryRun
array getMigrationClasses
array getErrors
boolean hasMigrated
__construct The classes will be loaded and the migration
table will be created if it does not already
exist
integer getCurrentVersion
integer getLatestVersion
boolean hasErrors
integer getNumErrors
setCurrentVersion
_doMigrateStep
integer _doMigrate
loadMigrationClassesFromDirectory
_throwErrorsException
integer migrate
addError
loadMigrationClass

Method Details
_transaction($funcName)

Parameter Summary
Wrapper for performing transaction functions on all available connections

(integer) getNextVersion()

Parameter Summary
Get the next incremented version number based on the latest version number using
getLatestVersion()

(boolean) _createMigrationTable()

Parameter Summary
Create the migration table and return true. If it already exists it will silence the
exception and return false

----------------- Brought to you by


Doctrine_Migration 356

<strong>returns</strong> Whether or not the table was created. Exceptions are silenced
when table already exists

getMigrationClass($num)

Parameter Summary
Get instance of migration class for number/version specified
<strong>throws</strong> Doctrine_Migration_Exception $e

(string) getMigrationClassesDirectory()

Parameter Summary
Get the migration classes directory

(integer) getNextMigrationClassVersion()

Parameter Summary
Get the next incremented class version based on the loaded migration classes

setTableName($tableName)

Parameter Summary
Set the table name for storing the version number for this migration instance

(string) getTableName()

Parameter Summary
Get the table name for storing the version number for this migration instance

(boolean) migrateDryRun($to = null)

Parameter Summary
Run the migration process but rollback at the very end. Returns true or false for
whether or not the migration can be ran

(array) getMigrationClasses()

Parameter Summary
Get all the loaded migration classes. Array where key is the number/version and the
value is the class name.

----------------- Brought to you by


Doctrine_Migration 357

(array) getErrors()

Parameter Summary
Get all the error exceptions

(boolean) hasMigrated()

Parameter Summary
hReturns true/false for whether or not this database has been migrated in the past

__construct($directory = null)

Parameter Summary
Specify the path to the directory with the migration classes.
The classes will be loaded and the migration table will be created if it does not already exist

(integer) getCurrentVersion()

Parameter Summary
Get the current version of the database

(integer) getLatestVersion()

Parameter Summary
Gets the latest possible version from the loaded migration classes

(boolean) hasErrors()

Parameter Summary
Whether or not the migration instance has errors

(integer) getNumErrors()

Parameter Summary
Get the number of errors

setCurrentVersion($number)

Parameter Summary
Set the current version of the database

----------------- Brought to you by


Doctrine_Migration 358

_doMigrateStep($direction, $num)

Parameter Summary

$direction Direction to go, &apos;up&apos; or &apos;down&apos;

Perform a single migration step. Executes a single migration class and processes the
changes

(integer) _doMigrate($to)

Parameter Summary
Do the actual migration process
<strong>throws</strong> Doctrine_Exception

loadMigrationClassesFromDirectory($directory = null)

Parameter Summary

$directory Directory to load migration classes from

Load migration classes from the passed directory. Any file found with a .php
extension will be passed to the loadMigrationClass()

_throwErrorsException()

Parameter Summary
Throw an exception with all the errors trigged during the migration
<strong>throws</strong> Doctrine_Migration_Exception $e

(integer) migrate($to = null, $dryRun = false)

Parameter Summary

$to Version to migrate to


$dryRun Whether or not to run the migrate process as a dry run

Perform a migration process by specifying the migration number/version to migrate


to. It will automatically know whether you are migrating up or down based on the
current version of the database.
<strong>returns</strong> Version number migrated to
<strong>throws</strong> Doctrine_Exception

----------------- Brought to you by


Doctrine_Migration_Base 359

addError($e)

Parameter Summary
Add an error to the stack. Excepts some type of Exception

loadMigrationClass($name, $path = null)

Parameter Summary
Load the specified migration class name in to this migration instances queue of
migration classes to execute. It must be a child of Doctrine_Migration in order to be
loaded.

Doctrine_Migration_Base

Method Summary
Returns Name Description
removeColumn
renameTable
createConstraint
_addChange
table
renameColumn
foreignKey
dropTable
column
postUp
dropConstraint
preUp
constraint
preDown
addColumn
postDown
dropForeignKey

----------------- Brought to you by


Doctrine_Migration_Base 360

removeIndex
array getChanges
changeColumn
createForeignKey
getNumChanges
addIndex
createTable
index

Method Details
removeColumn($tableName, $columnName)

Parameter Summary

$tableName Name of the table


$columnName Name of the column

Add a remove column change.

renameTable($oldTableName, $newTableName)

Parameter Summary

$oldTableName Name of the table to change


$newTableName Name to change the table to

Add a rename table change

createConstraint($tableName, $constraintName, $definition,


$constraintname)

Parameter Summary

$tableName Name of the table.


$definition Array for the constraint definition.
$constraintname Name of the constraint.

Add a create constraint change.

----------------- Brought to you by


Doctrine_Migration_Base 361

_addChange($type, $change = array())

Parameter Summary

$type The type of change


$change The array of information for the change

Add a change to the stack of changes to execute

table($upDown, $tableName, $fields = array(), $options = array())

Parameter Summary

$upDown Whether to add the up(create) or down(drop) table change.


$tableName Name of the table

$fields Array of fields for table


$options Array of options for the table

Add a create or drop table change.

renameColumn($tableName, $oldColumnName, $newColumnName)

Parameter Summary

$tableName Name of the table to rename the column on


$oldColumnName The old column name
$newColumnName The new column name

Add a rename column change

foreignKey($upDown, $tableName, $name, $definition = array())

Parameter Summary

$upDown Whether to add the up(create) or down(drop) foreign key change.


$tableName Name of the table.

$name Name of the foreign key.


$definition Array for the foreign key definition

Add a create or drop foreign key change.

----------------- Brought to you by


Doctrine_Migration_Base 362

dropTable($tableName)

Parameter Summary

$tableName Name of the table

Add a drop table change.

column($upDown, $tableName, $columnName, $type = null, $length =


null, $options = array())

Parameter Summary

$upDown Whether to add the up(add) or down(remove) column change.


$tableName Name of the table
$columnName Name of the column

$type Type of the column


$length Length of the column
$options Array of options for the column

Add a add or remove column change.

postUp()

Parameter Summary

dropConstraint($tableName, $constraintName, $constraintname)

Parameter Summary

$tableName Name of the table.


$constraintname Name of the constraint.

Add a drop constraint change.

preUp()

Parameter Summary

constraint($upDown, $tableName, $constraintname, $definition)

Parameter Summary

$upDown Whether to add the up(create) or down(drop) create change.

----------------- Brought to you by


Doctrine_Migration_Base 363

$tableName Name of the table.


$constraintname Name of the constraint.

$definition Array for the constraint definition.

Add a create or drop constraint change.

preDown()

Parameter Summary

addColumn($tableName, $columnName, $type, $length = null, $options


= array())

Parameter Summary

$tableName Name of the table


$columnName Name of the column

$type Type of the column


$length Length of the column
$options Array of options for the column

Add a add column change.

postDown()

Parameter Summary

dropForeignKey($tableName, $name)

Parameter Summary

$tableName Name of the table.

$name Name of the foreign key.

Add a drop foreign key change.

removeIndex($tableName, $indexName)

Parameter Summary

$tableName Name of the table

$indexName Name of the index

----------------- Brought to you by


Doctrine_Migration_Base 364

Add a remove index change.

(array) getChanges()

Parameter Summary
Get the changes that have been added on this migration class instance

changeColumn($tableName, $columnName, $length = null, $type = null,


$options = array())

Parameter Summary

$tableName Name of the table to change the column on


$columnName Name of the column to change

$type New type of column


$options New options for the column

Add a change column change

createForeignKey($tableName, $name, $definition)

Parameter Summary

$tableName Name of the table.

$name Name of the foreign key.


$definition Array for the foreign key definition

Add a create foreign key change.

getNumChanges()

Parameter Summary

addIndex($tableName, $indexName, $definition)

Parameter Summary

$tableName Name of the table

$indexName Name of the index

$definition Array for the index definition

Add a add index change.

----------------- Brought to you by


Doctrine_Migration_Builder 365

createTable($tableName, $fields = array(), $options = array())

Parameter Summary

$tableName Name of the table

$fields Array of fields for table


$options Array of options for the table

Add a create table change.

index($upDown, $tableName, $indexName, $definition = array())

Parameter Summary

$upDown Whether to add the up(add) or down(remove) index change.


$tableName Name of the table

$indexName Name of the index

$definition Array for the index definition

Add a add or remove index change.

Doctrine_Migration_Builder

Method Summary
Returns Name Description
string buildCreateForeignKey
string buildDropForeignKey
generateMigrationsFromDb
setMigrationsPath
string buildDropTable
sgtring buildAddIndex
string buildRemoveIndex
array generateMigrationsFromDiff
loadTemplate

----------------- Brought to you by


Doctrine_Migration_Builder 366

boolean generateMigrationsFromModels
__construct
Listing
0-19

string buildMigrationClass
string buildRemoveColumn
string getMigrationsPath
mixed generateMigrationClass
string buildChangeColumn
string buildAddColumn
string buildCreateTable

Method Details
(string) buildCreateForeignKey($tableName, $definition)

Parameter Summary
Build the code for creating foreign keys

(string) buildDropForeignKey($tableName, $definition)

Parameter Summary
Build the code for dropping foreign keys

generateMigrationsFromDb()

Parameter Summary
Generate a set of migration classes from the existing databases

setMigrationsPath($path)

Parameter Summary

$path path the path where migration classes are stored and being generated

Set the path to write the generated migration classes

(string) buildDropTable($tableData)

Parameter Summary
Build the code for dropping tables

----------------- Brought to you by


Doctrine_Migration_Builder 367

(sgtring) buildAddIndex($tableName, $indexName, $index)

Parameter Summary
Build the code for adding indexes

(string) buildRemoveIndex($tableName, $indexName, $index)

Parameter Summary
Build the code for removing indexes

(array) generateMigrationsFromDiff(( ) $diff)

Parameter Summary

$diff Instance to generate changes from

Generate migrations from a Doctrine_Migration_Diff instance


<strong>returns</strong> Array of changes produced from the diff

loadTemplate()

Parameter Summary
Loads the class template used for generating classes

(boolean) generateMigrationsFromModels($modelsPath = null,


$modelLoading = null)

Parameter Summary

$modelsPath Path to models


$modelLoading What type of model loading to use when loading the models

Generate a set of migrations from a set of models

__construct($migrationsPath = null)

Parameter Summary
Instantiate new instance of the Doctrine_Migration_Builder class
<pre><code> <![CDATA[ $builder = new Doctrine_Migration_Builder('/path/to/
migrations');]]> </code></pre>

----------------- Brought to you by


Doctrine_Migration_Builder 368

(string) buildMigrationClass($className, $fileName = null, $options =


array(), $up = null, $down = null)

Parameter Summary

$className Class name to generate

$fileName File name to write the class to


$options Options for the migration class
$up The code for the up function
$down The code for the down function

Build the code for a migration class


<strong>returns</strong> The code for the generated class

(string) buildRemoveColumn($tableName, $columnName, $column)

Parameter Summary
Build the code for removing columns

(string) getMigrationsPath()

Parameter Summary
Get the path where generated migration classes are written to
<strong>returns</strong> the path where migration classes are stored and being generated

(mixed) generateMigrationClass($className, $options = array(), $up =


null, $down = null, $return = false)

Parameter Summary

$className Class name to generate

$options Options for the migration class


$up The code for the up function
$down The code for the down function
$return Whether or not to return the code. If true return and false it writes the class to
disk.

Generate a migration class

(string) buildChangeColumn($tableName, $columnName, $column)

Parameter Summary

----------------- Brought to you by


Doctrine_Migration_Diff 369

Build the code for changing columns

(string) buildAddColumn($tableName, $columnName, $column)

Parameter Summary
Build the code for adding columns

(string) buildCreateTable($tableData)

Parameter Summary
Build the code for creating tables

Doctrine_Migration_Diff

Method Summary
Returns Name Description
array _buildChanges
array generateChanges
__construct
generateMigrationClasses();]]> Listing
0-20

string getUniqueId
array generateMigrationClasses
string _generateModels
array _buildModelInformation
array _diff

----------------- Brought to you by


Doctrine_Migration_Diff 370

Method Details
(array) _buildChanges($from, $to)

Parameter Summary

$from Array of schema information to generate changes from

$to Array of schema information to generate changes for

Build array of changes between the from and to array of schema information

(array) generateChanges()

Parameter Summary
Generate an array of changes found between the from and to schema information.

__construct($from, $to, $migration)

Parameter Summary

$from The from schema information source


$to The to schema information source
$migration Instance of Doctrine_Migration or path to migration classes

Instantiate new Doctrine_Migration_Diff instance


<pre><code> <![CDATA[ $diff = new Doctrine_Migration_Diff('/path/to/old_models', '/path/
to/new_models', '/path/to/migrations'); $diff->generateMigrationClasses();]]> </code></pre>

(string) getUniqueId()

Parameter Summary
Get unique hash id for this migration instance

(array) generateMigrationClasses()

Parameter Summary
Generate a migration class for the changes in this diff instance

(string) _generateModels($prefix, $item)

Parameter Summary

$prefix Prefix to generate the models with

----------------- Brought to you by


Doctrine_Migration_Process 371

$item The item to generate the models from

Generate a set of models for the schema information source


<strong>returns</strong> The path where the models were generated
<strong>throws</strong> Doctrine_Migration_Exception $e

(array) _buildModelInformation($models)

Parameter Summary

$models Array of models to build the schema information for

Build all the model schema information for the passed array of models
<strong>returns</strong> Array of schema information for all the passed models

(array) _diff($from, $to)

Parameter Summary

$from Path to set of models to migrate from

$to Path to set of models to migrate to

Generate a diff between the from and to schema information

Doctrine_Migration_Process

Method Summary
Returns Name Description
processRenamedTable
processDroppedTable
processCreatedTable
processCreatedIndex
processDroppedForeignKey
processCreatedColumn
processRenamedColumn

----------------- Brought to you by


Doctrine_Migration_Process 372

processDroppedIndex
processChangedColumn
processCreatedForeignKey
processCreatedConstraint
processDroppedConstraints
getConnection
processDroppedColumn

Method Details
processRenamedTable($table)

Parameter Summary

$table Renamed table definition

Process a renamed table change

processDroppedTable($table)

Parameter Summary

$table Table definition

Process a dropped table change

processCreatedTable($table)

Parameter Summary

$table Table definition

Process a created table change

processCreatedIndex($index)

Parameter Summary

$index Index definition

Process a created index change

processDroppedForeignKey($foreignKey)

Parameter Summary

----------------- Brought to you by


Doctrine_Migration_Process 373

Process a dropped foreign key change

processCreatedColumn($column)

Parameter Summary

$column Column definition

Process a created column change

processRenamedColumn($column)

Parameter Summary

$column Column definition

Process a renamed column change

processDroppedIndex($index)

Parameter Summary

$index Index definition

Process a dropped index change

processChangedColumn($column)

Parameter Summary

$column Changed column definition

Process a changed column change

processCreatedForeignKey($foreignKey)

Parameter Summary

$foreignKey Foreign key definition

Process a created foreign key change

processCreatedConstraint($constraint)

Parameter Summary

$constraint Constraint definition

----------------- Brought to you by


Doctrine_Node 374

Process a created constraint change

processDroppedConstraints($constraint)

Parameter Summary

$constraint Constraint definition

Process a dropped constraint change

getConnection($tableName)

Parameter Summary
Get the connection for specified table name

processDroppedColumn($column)

Parameter Summary

$column Column definition

Process a dropped column change

Doctrine_Node

Method Summary
Returns Name Description
traverse
setIteratorType
object instance getRecord
setIteratorOptions
__construct
object factory
setRecord
getIterator

----------------- Brought to you by


Doctrine_Node 375

Method Details
traverse($type = 'Pre', $options = array())

Parameter Summary

$type type of iterator (Pre | Post | Level)


$options options

convenience function for getIterator

setIteratorType($type)

Parameter Summary
sets node's iterator type

(object instance) getRecord()

Parameter Summary
getter for record attribute
<strong>returns</strong> of Doctrine_Record

setIteratorOptions($options)

Parameter Summary
sets node's iterator options

__construct(( ) $record, $options)

Parameter Summary

$record instance of Doctrine_Record

$options options

contructor, creates node with reference to record and any options

(object) factory(( ) $record, $implName, $options = array(), $impName)

Parameter Summary

$record instance of Doctrine_Record


$options options

----------------- Brought to you by


Doctrine_Node_Interface 376

$impName implementation (NestedSet, AdjacencyList, MaterializedPath)

factory method to return node instance based upon chosen implementation


<strong>returns</strong> instance of Doctrine_Node

setRecord(( ) $record)

Parameter Summary

$record instance of Doctrine_Record

setter for record attribute

getIterator($type = null, $options = null)

Parameter Summary

$type type of iterator (Pre | Post | Level)


$options options

get iterator

Doctrine_Node_Interface

Method Summary
Returns Name Description
iterator getDescendants
bool insertAsNextSiblingOf
int getLevel
moveAsPrevSiblingOf
getAncestors
bool hasParent
delete
bool hasPrevSibling
bool isEqualTo

----------------- Brought to you by


Doctrine_Node_Interface 377

moveAsLastChildOf
array getChildren
bool hasChildren
bool isLeaf
bool hasNextSibling
addChild
bool isRoot
getLastChild
moveAsFirstChildOf
getParent
moveAsNextSiblingOf
string getPath
bool insertAsPrevSiblingOf
int getNumberDescendants
getPrevSibling
array getSiblings
int getNumberChildren
bool insertAsFirstChildOf
getNextSibling
bool insertAsParentOf
bool isDescendantOf
bool insertAsLastChildOf
bool isDescendantOfOrEqualTo
getFirstChild
bool isValidNode

Method Details
(iterator) getDescendants()

Parameter Summary
gets descendants for node (direct descendants only)
<strong>returns</strong> iterator to traverse descendants from node

(bool) insertAsNextSiblingOf(( ) $dest)

Parameter Summary
inserts node as next sibling of dest record

----------------- Brought to you by


Doctrine_Node_Interface 378

(int) getLevel()

Parameter Summary
gets level (depth) of node in the tree

moveAsPrevSiblingOf(( ) $dest)

Parameter Summary
moves node as prev sibling of dest record

getAncestors()

Parameter Summary
gets ancestors for node

(bool) hasParent()

Parameter Summary
test if node has parent

delete()

Parameter Summary
deletes node and it's descendants

(bool) hasPrevSibling()

Parameter Summary
test if node has previous sibling

(bool) isEqualTo(( ) $subj)

Parameter Summary
determines if node is equal to subject node

moveAsLastChildOf(( ) $dest)

Parameter Summary
moves node as last child of dest record

----------------- Brought to you by


Doctrine_Node_Interface 379

(array) getChildren()

Parameter Summary
gets children for node (direct descendants only)
<strong>returns</strong> array of sibling Doctrine_Record objects

(bool) hasChildren()

Parameter Summary
test if node has children

(bool) isLeaf()

Parameter Summary
determines if node is leaf

(bool) hasNextSibling()

Parameter Summary
test if node has next sibling

addChild(( ) $record)

Parameter Summary
adds node as last child of record

(bool) isRoot()

Parameter Summary
determines if node is root

getLastChild()

Parameter Summary
gets record of last child or empty record

moveAsFirstChildOf(( ) $dest)

Parameter Summary
moves node as first child of dest record

----------------- Brought to you by


Doctrine_Node_Interface 380

getParent()

Parameter Summary
gets record of parent or empty record

moveAsNextSiblingOf(( ) $dest)

Parameter Summary
moves node as next sibling of dest record

(string) getPath($seperator = ' > ', $includeNode = false)

Parameter Summary

$seperator path seperator


$includeNode whether or not to include node at end of path

gets path to node from root, uses record::toString() method to get node names
<strong>returns</strong> string representation of path

(bool) insertAsPrevSiblingOf(( ) $dest)

Parameter Summary
inserts node as previous sibling of dest record

(int) getNumberDescendants()

Parameter Summary
gets number of descendants (children and their children)

getPrevSibling()

Parameter Summary
gets record of prev sibling or empty record

(array) getSiblings($includeNode = false)

Parameter Summary
gets siblings for node
<strong>returns</strong> array of sibling Doctrine_Record objects

----------------- Brought to you by


Doctrine_Node_Interface 381

(int) getNumberChildren()

Parameter Summary
gets number of children (direct descendants)

(bool) insertAsFirstChildOf(( ) $dest)

Parameter Summary
inserts node as first child of dest record

getNextSibling()

Parameter Summary
gets record of next sibling or empty record

(bool) insertAsParentOf(( ) $dest)

Parameter Summary
inserts node as parent of dest record

(bool) isDescendantOf(( ) $subj)

Parameter Summary
determines if node is child of subject node

(bool) insertAsLastChildOf(( ) $dest)

Parameter Summary
inserts node as first child of dest record

(bool) isDescendantOfOrEqualTo(( ) $subj)

Parameter Summary
determines if node is child of or sibling to subject node

getFirstChild()

Parameter Summary
gets record of first child or empty record

----------------- Brought to you by


Doctrine_Node_MaterializedPath_LevelOrderIterator 382

(bool) isValidNode()

Parameter Summary
determines if node is valid

Doctrine_Node_MaterializedPath_LevelOrde

Method Summary
Returns Name Description
key
rewind
current
valid
__construct
next

Method Details
key()

Parameter Summary

rewind()

Parameter Summary

current()

Parameter Summary

valid()

Parameter Summary

----------------- Brought to you by


Doctrine_Node_MaterializedPath_PostOrderIterator 383

__construct($node, $opts)

Parameter Summary

next()

Parameter Summary

Doctrine_Node_MaterializedPath_PostOrder

Method Summary
Returns Name Description
key
rewind
current
valid
__construct
next

Method Details
key()

Parameter Summary

rewind()

Parameter Summary

current()

Parameter Summary

----------------- Brought to you by


Doctrine_Node_MaterializedPath_PreOrderIterator 384

valid()

Parameter Summary

__construct($node, $opts)

Parameter Summary

next()

Parameter Summary

Doctrine_Node_MaterializedPath_PreOrderI

Method Summary
Returns Name Description
key
rewind
current
valid
__construct
next

Method Details
key()

Parameter Summary

rewind()

Parameter Summary

----------------- Brought to you by


Doctrine_Node_NestedSet 385

current()

Parameter Summary

valid()

Parameter Summary

__construct($node, $opts)

Parameter Summary

next()

Parameter Summary

Doctrine_Node_NestedSet

Method Summary
Returns Name Description
mixed getDescendants
bool insertAsNextSiblingOf
int getLevel
moveAsPrevSiblingOf
mixed getAncestors
bool hasParent
delete
bool hasPrevSibling
bool isEqualTo
setLeftValue
moveAsLastChildOf
mixed getChildren
bool hasChildren
detach

----------------- Brought to you by


Doctrine_Node_NestedSet 386

bool isLeaf
bool hasNextSibling
addChild
bool isRoot
int getLeftValue
getLastChild
moveAsFirstChildOf
getParent
moveAsNextSiblingOf
string getPath
bool insertAsPrevSiblingOf
int getNumberDescendants
getPrevSibling
array getSiblings
int getNumberChildren
makeRoot
setRootValue
bool insertAsFirstChildOf
setRightValue
getNextSibling
bool insertAsParentOf
bool isDescendantOf
getRootValue
bool insertAsLastChildOf
bool isDescendantOfOrEqualTo
getFirstChild
bool isValidNode
int getRightValue

Method Details
(mixed) getDescendants($depth = null, $includeNode = false)

Parameter Summary
gets descendants for node (direct descendants only)
<strong>returns</strong> The descendants of the node or FALSE if the node has no
descendants.

----------------- Brought to you by


Doctrine_Node_NestedSet 387

(bool) insertAsNextSiblingOf(( ) $dest)

Parameter Summary
inserts node as next sibling of dest record

(int) getLevel()

Parameter Summary
gets level (depth) of node in the tree

moveAsPrevSiblingOf(( ) $dest)

Parameter Summary
moves node as prev sibling of dest record

(mixed) getAncestors($depth = null, $deth)

Parameter Summary

$deth The depth &apos;upstairs&apos;.

gets ancestors for node


<strong>returns</strong> The ancestors of the node or FALSE if the node has no ancestors
(this basically means it&apos;s a root node).

(bool) hasParent()

Parameter Summary
test if node has parent

delete()

Parameter Summary
deletes node and it's descendants

(bool) hasPrevSibling()

Parameter Summary
test if node has previous sibling

(bool) isEqualTo(( ) $subj)

Parameter Summary

----------------- Brought to you by


Doctrine_Node_NestedSet 388

determines if node is equal to subject node

setLeftValue($lft)

Parameter Summary
sets record's left value

moveAsLastChildOf(( ) $dest)

Parameter Summary
moves node as last child of dest record

(mixed) getChildren()

Parameter Summary
gets children for node (direct descendants only)
<strong>returns</strong> The children of the node or FALSE if the node has no children.

(bool) hasChildren()

Parameter Summary
test if node has children

detach()

Parameter Summary
Detaches the node from the tree by invalidating it's lft & rgt values (they're set to 0).

(bool) isLeaf()

Parameter Summary
determines if node is leaf

(bool) hasNextSibling()

Parameter Summary
test if node has next sibling

addChild(( ) $record)

Parameter Summary

----------------- Brought to you by


Doctrine_Node_NestedSet 389

adds node as last child of record

(bool) isRoot()

Parameter Summary
determines if node is root

(int) getLeftValue()

Parameter Summary
gets record's left value

getLastChild()

Parameter Summary
gets record of last child or empty record

moveAsFirstChildOf(( ) $dest)

Parameter Summary
moves node as first child of dest record

getParent()

Parameter Summary
gets record of parent or empty record

moveAsNextSiblingOf(( ) $dest)

Parameter Summary
moves node as next sibling of dest record

(string) getPath($seperator = ' > ', $includeRecord = false,


$includeNode)

Parameter Summary

$seperator path seperator


$includeNode whether or not to include node at end of path

gets path to node from root, uses record::toString() method to get node names
<strong>returns</strong> string representation of path

----------------- Brought to you by


Doctrine_Node_NestedSet 390

(bool) insertAsPrevSiblingOf(( ) $dest)

Parameter Summary
inserts node as previous sibling of dest record

(int) getNumberDescendants()

Parameter Summary
gets number of descendants (children and their children)

getPrevSibling()

Parameter Summary
gets record of prev sibling or empty record

(array) getSiblings($includeNode = false)

Parameter Summary
gets siblings for node
<strong>returns</strong> array of sibling Doctrine_Record objects

(int) getNumberChildren()

Parameter Summary
gets number of children (direct descendants)

makeRoot($newRootId)

Parameter Summary
Makes this node a root node. Only used in multiple-root trees.

setRootValue($value)

Parameter Summary
sets records root id value

(bool) insertAsFirstChildOf(( ) $dest)

Parameter Summary
inserts node as first child of dest record

----------------- Brought to you by


Doctrine_Node_NestedSet 391

setRightValue($rgt)

Parameter Summary
sets record's right value

getNextSibling()

Parameter Summary
gets record of next sibling or empty record

(bool) insertAsParentOf(( ) $dest)

Parameter Summary
inserts node as parent of dest record

(bool) isDescendantOf(( ) $subj)

Parameter Summary
determines if node is child of subject node

getRootValue()

Parameter Summary
get records root id value

(bool) insertAsLastChildOf(( ) $dest)

Parameter Summary
inserts node as last child of dest record

(bool) isDescendantOfOrEqualTo(( ) $subj)

Parameter Summary
determines if node is child of or sibling to subject node

getFirstChild()

Parameter Summary
gets record of first child or empty record

----------------- Brought to you by


Doctrine_Node_NestedSet_PreOrderIterator 392

(bool) isValidNode($record = null)

Parameter Summary
determines if node is valid

(int) getRightValue()

Parameter Summary
gets record's right value

Doctrine_Node_NestedSet_PreOrderIterator

Method Summary
Returns Name Description
integer key
rewind
current
boolean valid
__construct
count
next

Method Details
(integer) key()

Parameter Summary
returns the current key

rewind()

Parameter Summary

----------------- Brought to you by


Doctrine_Null 393

rewinds the iterator

current()

Parameter Summary
returns the current record

(boolean) valid()

Parameter Summary
<strong>returns</strong> whether or not the iteration will continue

__construct($record, $opts)

Parameter Summary

count()

Parameter Summary

next()

Parameter Summary
advances the internal pointer

Doctrine_Null

Method Summary
Returns Name Description
__toString
exists

----------------- Brought to you by


Doctrine_Overloadable 394

Method Details
__toString()

Parameter Summary

exists()

Parameter Summary

Doctrine_Overloadable

Method Summary
Returns Name Description
mixed __call

Method Details
(mixed) __call($m, $a)

Parameter Summary

$m the name of the method

$a method arguments

__call method overloader


<strong>returns</strong> anything

----------------- Brought to you by


Doctrine_Pager 395

Doctrine_Pager

Method Summary
Returns Name Description
int getNumResults Returns the number of results found
_adjustOffset Adjusts last page of Doctrine_Pager, offset and limit of
Doctrine_Query associated
int getLastIndice Return the last indice number for the current page
bool haveToPaginate Return true if it's necessary to paginate or false if not
setPage Defines the current page and automatically adjust offset
and limits
getRange Builds and return a Doctrine_Pager_Range_* based on
arguments
int getMaxPerPage Returns the maximum number of itens per page
boolen getExecuted Returns the check if Pager was already executed at least
once
int getFirstPage Returns the first page
int getLastPage Returns the last page (total of pages)
setCountQuery Defines the counter query to be used by pager
array getCountQueryParams Returns the params to be used by counter Doctrine_Query

getQuery Returns the Doctrine_Query collector object related to the


pager
__construct
_setNumResults Defines the number of total results on initial query
_initialize Initialize Pager object calculating number of results
execute Executes the query, populates the collection and then
return it
getCountQuery Returns the Doctrine_Query object that is used to make
the count results to pager

----------------- Brought to you by


Doctrine_Pager 396

_setExecuted Defines if Pager was already executed


setCountQueryParams Defines the params to be used by counter Doctrine_Query

_setLastPage Defines the last page (total of pages)


int getNextPage Returns the next page
int getPage Returns the current page
int getResultsInPage Returns the number of itens in current page
setMaxPerPage Defines the maximum number of itens per page and
automatically adjust offset and limits
_setQuery Defines the collector query to be used by pager
int getFirstIndice Return the first indice number for the current page
int getPreviousPage Returns the previous page

Method Details
(int) getNumResults()

Parameter Summary
Returns the number of results found
<strong>returns</strong> the number of results found

_adjustOffset()

Parameter Summary
Adjusts last page of Doctrine_Pager, offset and limit of Doctrine_Query associated

(int) getLastIndice()

Parameter Summary
Return the last indice number for the current page
<strong>returns</strong> Last indice number

(bool) haveToPaginate()

Parameter Summary
Return true if it&apos;s necessary to paginate or false if not
<strong>returns</strong> true if it is necessary to paginate, false otherwise

----------------- Brought to you by


Doctrine_Pager 397

setPage(($page) $page)

Parameter Summary

$page current page

Defines the current page and automatically adjust offset and limits

getRange($rangeStyle, $options = array())

Parameter Summary

$rangeStyle Pager Range style

$options Custom subclass implementation options. Default is a blank array

Builds and return a Doctrine_Pager_Range_* based on arguments


<strong>returns</strong> Pager Range

(int) getMaxPerPage()

Parameter Summary
getLastPage
Returns the maximum number of itens per page
<strong>returns</strong> maximum number of itens per page

(boolen) getExecuted()

Parameter Summary
Returns the check if Pager was already executed at least once
<strong>returns</strong> Pager was executed

(int) getFirstPage()

Parameter Summary
Returns the first page
<strong>returns</strong> first page

(int) getLastPage()

Parameter Summary
Returns the last page (total of pages)
<strong>returns</strong> last page (total of pages)

----------------- Brought to you by


Doctrine_Pager 398

setCountQuery((Doctrine_Query) $query, $params = null)

Parameter Summary

$query Accepts either a Doctrine_Query object or a string (which does the


Doctrine_Query class creation).
$params Optional params to be used by counter Doctrine_Query. If not defined, the params
passed to execute method will be used.

Defines the counter query to be used by pager

(array) getCountQueryParams($defaultParams = array())

Parameter Summary
Returns the params to be used by counter Doctrine_Query
<strong>returns</strong> Doctrine_Query counter params

getQuery()

Parameter Summary
Returns the Doctrine_Query collector object related to the pager
<strong>returns</strong> Doctrine_Query object related to the pager

__construct($query, $page, $maxPerPage)

Parameter Summary

$query Accepts either a Doctrine_Query object or a string (which does the


Doctrine_Query class creation).
$page Current page
$maxPerPage Maximum itens per page

_setNumResults(($nb) $nb)

Parameter Summary

$nb Number of results found on initial query fetch

Defines the number of total results on initial query

----------------- Brought to you by


Doctrine_Pager 399

_initialize(($params) $params = array())

Parameter Summary

$params Optional parameters to Doctrine_Query::execute

Initialize Pager object calculating number of results

execute(($params) $params = array(), ($hydrationMode)


$hydrationMode = null)

Parameter Summary

$params Optional parameters to Doctrine_Query::execute


$hydrationMode Hydration Mode of Doctrine_Query::execute returned ResultSet.

Executes the query, populates the collection and then return it


<strong>returns</strong> The root collection

getCountQuery()

Parameter Summary
Returns the Doctrine_Query object that is used to make the count results to pager
<strong>returns</strong> Doctrine_Query object related to the pager

_setExecuted(($executed) $executed)

Parameter Summary

$executed Pager was executed

Defines if Pager was already executed

setCountQueryParams($params = array(), $append = false)

Parameter Summary

$params Optional params to be used by counter Doctrine_Query. If not defined, the params
passed to execute method will be used.
$append Optional argument that append the query param instead of overriding the existent
ones.

Defines the params to be used by counter Doctrine_Query

----------------- Brought to you by


Doctrine_Pager 400

_setLastPage(($page) $page)

Parameter Summary

$page last page (total of pages)

Defines the last page (total of pages)

(int) getNextPage()

Parameter Summary
Returns the next page
<strong>returns</strong> next page

(int) getPage()

Parameter Summary
getLastPage
Returns the current page
<strong>returns</strong> current page

(int) getResultsInPage()

Parameter Summary
Returns the number of itens in current page
<strong>returns</strong> Number of itens in current page

setMaxPerPage(($max) $max)

Parameter Summary

$max maximum number of itens per page

Defines the maximum number of itens per page and automatically adjust offset and limits

_setQuery((Doctrine_Query) $query)

Parameter Summary

$query Accepts either a Doctrine_Query object or a string (which does the Doctrine_Query
class creation).

Defines the collector query to be used by pager

----------------- Brought to you by


Doctrine_Pager_Layout 401

(int) getFirstIndice()

Parameter Summary
Return the first indice number for the current page
<strong>returns</strong> First indice number

(int) getPreviousPage()

Parameter Summary
Returns the previous page
<strong>returns</strong> previous page

Doctrine_Pager_Layout

Method Summary
Returns Name Description
string _parseReplacementsTemplate Parse the mask replacements of a given page

getPagerRange Returns the Doctrine_Pager_Range subclass object


related to the pager layout
setSelectedTemplate Defines the Template to be applied for active page
string _parseUrlTemplate Parse the url mask to return the correct template
depending of the options sent. Already process the
mask replacements assigned.
setSeparatorTemplate Defines the Separator template, applied between
each page
_setPager Defines the Doctrine_Pager object related to the
pager layout
addMaskReplacement Defines a mask replacement. When parsing
template, it converts replacement masks into new
ones (or values), allowing to change masks
behavior on the fly
getPager Returns the Doctrine_Pager object related to the
pager layout

----------------- Brought to you by


Doctrine_Pager_Layout 402

string getSeparatorTemplate Returns the Separator template, applied between


each page
__toString
removeMaskReplacement Remove a mask replacement
string getUrlMask Returns the URL to be assigned for each page
_setUrlMask Defines the URL to be assigned for each page
string processPage Parses the template and returns the string of a
processed page
__construct
string _parseTemplate Parse the template of a given page and return the
processed template
string _parseMaskReplacements Parse the mask replacements, changing from to-be
replaced mask with new masks/values
_setPagerRange Defines the Doctrine_Pager_Range subclass object
related to the pager layout
execute Handy method to execute the query without need
to retrieve the Pager instance
string getSelectedTemplate Returns the Template to be applied for active page
string _parseUrl Parse the url mask of a given page and return the
processed url
cleanMaskReplacements Remove all mask replacements
string getTemplate Returns the Template to be applied for inactive
pages
mixed display Displays the pager on screen based on templates
and options defined
setTemplate Defines the Template to be applied for inactive
pages (also active page if selected template not
defined)

Method Details
(string) _parseReplacementsTemplate(($options) $options = array())

Parameter Summary

$options Optional parameters to be applied in template and url mask

_parseUrl
Parse the mask replacements of a given page

----------------- Brought to you by


Doctrine_Pager_Layout 403

getPagerRange()

Parameter Summary
Returns the Doctrine_Pager_Range subclass object related to the pager layout
<strong>returns</strong> Doctrine_Pager_Range subclass object related to the pager range

setSelectedTemplate(($selectedTemplate) $selectedTemplate)

Parameter Summary

$selectedTemplate Template to be applied for active page

Defines the Template to be applied for active page

(string) _parseUrlTemplate(($options) $options = array())

Parameter Summary

$options Optional parameters to be applied in template and url mask

Parse the url mask to return the correct template depending of the options sent. Already
process the mask replacements assigned.

setSeparatorTemplate(($separatorTemplate) $separatorTemplate)

Parameter Summary

$separatorTemplate Separator template, applied between each page

Defines the Separator template, applied between each page

_setPager(($pager) $pager)

Parameter Summary

$pager Doctrine_Pager object related to the pager range

Defines the Doctrine_Pager object related to the pager layout

addMaskReplacement(($oldMask) $oldMask, ($newMask) $newMask,


($asValue) $asValue = false)

Parameter Summary

$oldMask Mask to be replaced


$newMask Mask or Value that will be defined after replacement

----------------- Brought to you by


Doctrine_Pager_Layout 404

$asValue Optional value (default false) that if defined as true, changes the bahavior of
replacement mask to replacement value

Defines a mask replacement. When parsing template, it converts replacement masks into new
ones (or values), allowing to change masks behavior on the fly

getPager()

Parameter Summary
Returns the Doctrine_Pager object related to the pager layout
<strong>returns</strong> Doctrine_Pager object related to the pager range

(string) getSeparatorTemplate()

Parameter Summary
Returns the Separator template, applied between each page
<strong>returns</strong> Separator template, applied between each page

__toString()

Parameter Summary
Simply calls display, and returns the output.

removeMaskReplacement(($oldMask) $oldMask)

Parameter Summary

$oldMask Replacement Mask to be removed

Remove a mask replacement

(string) getUrlMask()

Parameter Summary
Returns the URL to be assigned for each page
<strong>returns</strong> URL to be assigned for each page

_setUrlMask(($urlMask) $urlMask)

Parameter Summary

$urlMask URL to be assigned for each page

Defines the URL to be assigned for each page

----------------- Brought to you by


Doctrine_Pager_Layout 405

(string) processPage($options = array())

Parameter Summary

$options Optional parameters to be applied in template and url mask

Parses the template and returns the string of a processed page


<strong>returns</strong> Processed template for the given page

__construct((Doctrine_Pager) $pager, (Doctrine_Pager_Range)


$pagerRange, $urlMask)

Parameter Summary

$pager Doctrine_Pager object related to the pager layout


$pagerRange Doctrine_Pager_Range object related to the pager layout

$urlMask URL to be assigned for each page

(string) _parseTemplate($options = array())

Parameter Summary

$options Optional parameters to be applied in template and url mask

Parse the template of a given page and return the processed template

(string) _parseMaskReplacements(($str) $str)

Parameter Summary

$str String to have masks replaced

Parse the mask replacements, changing from to-be replaced mask with new masks/values

_setPagerRange(($pagerRange) $pagerRange)

Parameter Summary

$pagerRange Doctrine_Pager_Range subclass object related to the pager range

Defines the Doctrine_Pager_Range subclass object related to the pager layout

----------------- Brought to you by


Doctrine_Pager_Layout 406

execute(($params) $params = array(), ($hydrationMode)


$hydrationMode = null)

Parameter Summary

$params Optional parameters to Doctrine_Query::execute


$hydrationMode Hydration Mode of Doctrine_Query::execute returned ResultSet.

Handy method to execute the query without need to retrieve the Pager instance
<strong>returns</strong> The root collection

(string) getSelectedTemplate()

Parameter Summary
Returns the Template to be applied for active page
<strong>returns</strong> Template to be applied for active page

(string) _parseUrl(($options) $options = array())

Parameter Summary

$options Optional parameters to be applied in template and url mask

Parse the url mask of a given page and return the processed url

cleanMaskReplacements()

Parameter Summary
Remove all mask replacements

(string) getTemplate()

Parameter Summary
Returns the Template to be applied for inactive pages
<strong>returns</strong> Template to be applied for inactive pages

(mixed) display(($options) $options = array(), ($return) $return = false)

Parameter Summary

$options Optional parameters to be applied in template and url mask

$return Optional parameter if you want to capture the output of this method call (Default
value is false), instead of printing it

----------------- Brought to you by


Doctrine_Pager_Range 407

Displays the pager on screen based on templates and options defined


<strong>returns</strong> If you would like to capture the output of
Doctrine_Pager_Layout::display(), use the return parameter. If this parameter is set to TRUE,
this method will return its output, instead of pr

setTemplate(($template) $template)

Parameter Summary

$template Template to be applied for inactive pages

Defines the Template to be applied for inactive pages (also active page if selected template
not defined)

Doctrine_Pager_Range

Method Summary
Returns Name Description
array getOption Returns the custom Doctrine_Pager_Range implementation
offset option
array rangeAroundPage Calculate and returns an array representing the range around
the current page
boolean isInRange Check if a given page is in the range
_setOptions Defines the subclass implementation options
array getOptions Returns the custom Doctrine_Pager_Range implementation
options
getPager Returns the Doctrine_Pager object related to the pager range
__construct
_initialize Initialize Doctrine_Page_Range subclass which does custom
class definitions
setPager Defines the Doctrine_Pager object related to the pager range
and automatically (re-)initialize Doctrine_Pager_Range

----------------- Brought to you by


Doctrine_Pager_Range 408

Method Details
(array) getOption($option)

Parameter Summary
Returns the custom Doctrine_Pager_Range implementation offset option
<strong>returns</strong> Custom Doctrine_Pager_Range implementation options

(array) rangeAroundPage()

Parameter Summary
Calculate and returns an array representing the range around the current page

(boolean) isInRange(($page) $page)

Parameter Summary

$page Page to be checked

Check if a given page is in the range

_setOptions(($options) $options)

Parameter Summary

$options Custom Doctrine_Pager_Range implementation options

Defines the subclass implementation options

(array) getOptions()

Parameter Summary
Returns the custom Doctrine_Pager_Range implementation options
<strong>returns</strong> Custom Doctrine_Pager_Range implementation options

getPager()

Parameter Summary
Returns the Doctrine_Pager object related to the pager range
<strong>returns</strong> Doctrine_Pager object related to the pager range

----------------- Brought to you by


Doctrine_Pager_Range_Jumping 409

__construct($options = array(), (Doctrine_Pager) $pager = null)

Parameter Summary

$options Custom subclass implementation options. Default is a blank array

$pager Optional Doctrine_Pager object to be associated

_initialize()

Parameter Summary
Initialize Doctrine_Page_Range subclass which does custom class definitions

setPager(($pager) $pager)

Parameter Summary

$pager Doctrine_Pager object related to the pager range

Defines the Doctrine_Pager object related to the pager range and automatically (re-)initialize
Doctrine_Pager_Range

Doctrine_Pager_Range_Jumping

Method Summary
Returns Name Description
array rangeAroundPage Calculate and returns an array representing the range around
the current page
int getChunkLength Returns the size of the chunk defined
_initialize Initialize Doctrine_Pager_Range_Jumping and does custom
assignments
_setChunkLength Defines the size of the chunk

----------------- Brought to you by


Doctrine_Pager_Range_Sliding 410

Method Details
(array) rangeAroundPage()

Parameter Summary
Calculate and returns an array representing the range around the current page

(int) getChunkLength()

Parameter Summary
Returns the size of the chunk defined
<strong>returns</strong> Chunk length

_initialize()

Parameter Summary
Initialize Doctrine_Pager_Range_Jumping and does custom assignments

_setChunkLength(($chunkLength) $chunkLength)

Parameter Summary

$chunkLength Chunk length

Defines the size of the chunk

Doctrine_Pager_Range_Sliding

Method Summary
Returns Name Description
array rangeAroundPage Calculate and returns an array representing the range around
the current page
int getChunkLength Returns the size of the chunk defined

----------------- Brought to you by


Doctrine_Pager_Range_Sliding 411

_initialize Initialize Doctrine_Pager_Range_Sliding and does custom


assignments
_setChunkLength Defines the size of the chunk

Method Details
(array) rangeAroundPage()

Parameter Summary
Calculate and returns an array representing the range around the current page

(int) getChunkLength()

Parameter Summary
Returns the size of the chunk defined
<strong>returns</strong> Chunk length

_initialize()

Parameter Summary
Initialize Doctrine_Pager_Range_Sliding and does custom assignments

_setChunkLength(($chunkLength) $chunkLength)

Parameter Summary

$chunkLength Chunk length

Defines the size of the chunk

----------------- Brought to you by


Doctrine_Parser 412

Doctrine_Parser

Method Summary
Returns Name Description
dump Interface for pulling and dumping data to a file
getParser Get instance of the specified parser

load Interface for loading and parsing data from a file


dumpData Override in the praser driver

loadData Override in the parser driver


doLoad Get contents whether it is the path to a file file or a string of txt. Either
should allow php code in it.
doDump

Method Details
dump($array, $type = 'xml', $path = null)

Parameter Summary
Interface for pulling and dumping data to a file

getParser($type)

Parameter Summary
Get instance of the specified parser

load($path, $type = 'xml')

Parameter Summary
Interface for loading and parsing data from a file

----------------- Brought to you by


Doctrine_Parser_Json 413

dumpData($array, $path = null)

Parameter Summary
Override in the praser driver

loadData($array)

Parameter Summary
Override in the parser driver

doLoad($path)

Parameter Summary
Get contents whether it is the path to a file file or a string of txt. Either should allow php code
in it.

doDump($data, $path = null)

Parameter Summary

Doctrine_Parser_Json

Method Summary
Returns Name Description
string dumpData Dump an array of data to a specified path or return

array loadData Load and unserialize data from a file or from passed data

----------------- Brought to you by


Doctrine_Parser_Serialize 414

Method Details
(string) dumpData($array, $path = null)

Parameter Summary

$array Array of data to dump to json

$path Path to dump json data to

Dump an array of data to a specified path or return

(array) loadData($path)

Parameter Summary

$path Path to dump data to

Load and unserialize data from a file or from passed data


<strong>returns</strong> Array of json objects

Doctrine_Parser_Serialize

Method Summary
Returns Name Description
dumpData Dump an array of data to a specified path or return

loadData Load and unserialize data from a file or from passed data

Method Details
dumpData($array, $path = null)

Parameter Summary
Dump an array of data to a specified path or return

----------------- Brought to you by


Doctrine_Parser_Xml 415

loadData($path)

Parameter Summary
Load and unserialize data from a file or from passed data

Doctrine_Parser_Xml

Method Summary
Returns Name Description
string arrayToXml
string dumpData Convert array to xml and dump to specified path or return the xml
array prepareData Prepare simple xml to array for return

array loadData Load xml file and return array of data

Method Details
(string) arrayToXml($array, $rootNodeName = 'data', $xml = null)

Parameter Summary

$array Array to convert to xml


$rootNodeName Name of the root node

$xml SimpleXmlElement

<strong>returns</strong> String of xml built from array

(string) dumpData($array, $path = null)

Parameter Summary

$array Array of data to convert to xml

$path Path to write xml data to

----------------- Brought to you by


Doctrine_Parser_Yml 416

Convert array to xml and dump to specified path or return the xml

(array) prepareData($simpleXml)

Parameter Summary
Prepare simple xml to array for return

(array) loadData($path)

Parameter Summary

$path Path to load xml data from

Load xml file and return array of data


<strong>returns</strong> Array of data converted from xml

Doctrine_Parser_Yml

Method Summary
Returns Name Description
string dumpData Dump an array of data to a specified path or return

array loadData Load and parse data from a yml file

Method Details
(string) dumpData($array, $path = null)

Parameter Summary

$array Array of data to dump to yaml

$path Path to dump the yaml to

Dump an array of data to a specified path or return


<strong>throws</strong> Doctrine_Parser_Exception dumping error

----------------- Brought to you by


Doctrine_Record_Generator 417

(array) loadData($path)

Parameter Summary

$path Path to load yaml data from

Load and parse data from a yml file


<strong>returns</strong> Array of parsed yaml data
<strong>throws</strong> Doctrine_Parser_Exception parsing error

Doctrine_Record_Generator

Method Summary
Returns Name Description
buildChildDefinitions
mixed getOption
__isset
buildForeignRelation
initOptions
generateClass generates the class definition for plugin class
array getOptions returns all options and their associated values
addChild Add child record generator
__get
Doctrine_Plugin setOption
array buildForeignKeys generates foreign keys for the plugin table based on
the owner table the foreign keys generated by this
method can be used for setting the relations
between the owner and the plugin classes
buildTable
buildRelation this method can be used for generating the relation
from the plugin table to the owner table. By default
buildForeignRelation() and buildLocalRelation() are
called Those methods can be overridden or this
entire method can be overridden

----------------- Brought to you by


Doctrine_Record_Generator 418

initialize Initialize the plugin. Call in Doctrine_Template


setTableDefinition() in order to initiate a generator
in a template SEE: Doctrine_Template_I18n for an
example
buildLocalRelation

Method Details
buildChildDefinitions()

Parameter Summary

(mixed) getOption(($option) $name)

Parameter Summary

$name the name of the option to retrieve

returns the value of an option


<strong>returns</strong> the value of the option

__isset($option)

Parameter Summary

buildForeignRelation($alias = null)

Parameter Summary

$alias Alias of the foreign relation

initOptions()

Parameter Summary
empty template method for providing the concrete plugins the ability to initialize
options before the actual definition is being built

generateClass($definition = array())

Parameter Summary

$definition Definition array defining columns, relations and options for the model

generates the class definition for plugin class

----------------- Brought to you by


Doctrine_Record_Generator 419

(array) getOptions()

Parameter Summary
returns all options and their associated values
<strong>returns</strong> all options as an associative array

addChild((Doctrine_Record_Generator) $generator)

Parameter Summary
Add child record generator

__get($option)

Parameter Summary
__get an alias for getOption

(Doctrine_Plugin) setOption(($option) $name, ($value) $value)

Parameter Summary

$name the name of the option to be changed

$value the value of the option

sets given value to an option


<strong>returns</strong> this object

(array) buildForeignKeys(( ) $table)

Parameter Summary

$table the table object that owns the plugin

generates foreign keys for the plugin table based on the owner table the foreign keys
generated by this method can be used for setting the relations between the owner and the
plugin classes
<strong>returns</strong> an array of foreign key definitions

buildTable()

Parameter Summary

buildRelation()

Parameter Summary

----------------- Brought to you by


Doctrine_Query 420

this method can be used for generating the relation from the plugin table to the owner table.
By default buildForeignRelation() and buildLocalRelation() are called Those methods can be
overridden or this entire method can be overridden

initialize(( ) $table)

Parameter Summary
Initialize the plugin. Call in Doctrine_Template setTableDefinition() in order to initiate a
generator in a template SEE: Doctrine_Template_I18n for an example

buildLocalRelation()

Parameter Summary

Doctrine_Query

Method Summary
Returns Name Description
processPendingSubqueries subqueries can only be processed when
the query is fully constructed since some
subqueries may be correlated
array fetchArray
string getSqlAggregateAlias
load
processPendingAggregates
buildAssociativeRelationSql
buildSimpleRelationSql
string getSqlQuery
copy
string getAggregateAlias
buildIndexBy
parseSubquery
array serialize

----------------- Brought to you by


Doctrine_Query 421

parseDqlQuery parses a DQL query first splits the query


in parts and then uses individual parsers
for each part
string getExpressionOwner
boolean contains Method to check if a arbitrary piece of
dql exists
isSubquery if $bool parameter is set this method
sets the value of
Doctrine_Query::$isSubquery. If this
value is set to true the query object will
not load the primary key fields of the
selected components. If null is given as
the first parameter this method retr
mixed query
string getLimitSubquery when fetching one-to-many, many-to-
many associated data with LIMIT clause
an additional subquery is needed for
limiting the number of returned records
instead of limiting the number of sql
result set rows
buildInheritanceJoinSql
Doctrine_Hydrate createSubquery
string _buildSqlQueryBase returns the base of the generated sql
query On mysql driver special strategy
has to be used for DELETE statements
(where is this special strategy??)
parseFunctionExpression
_killReference This method simply copies the value to a
temporary variable and then unsets the
reference and re-assigns the old value
but not by reference
mixed fetchOne
string parseClause this method handles five tasks:

Converts all DQL functions to their
native SQL equivalents

</li> Listing
0-21
<li>
<p>Converts all component
references to their table alias
equivalents</p>
</li>
<li>
<p>Conv

string _buildSqlFromPart

----------------- Brought to you by


Doctrine_Query 422

parseIdentifierReference
integer count This method executes the main query
without all the selected fields, ORDER
BY part, LIMIT part and OFFSET part.
Example: Main query: SELECT u.*,
p.phonenumber FROM User u LEFT
JOIN u.Phonenumber p WHERE
p.phonenumber = '12
string getDqlPart
string getCountQuery
loadRoot
adjustProcessedParam
__clone
processPendingFields
free This method can therefore be used to
reduce memory usage when creating a
lot of query objects during a request.
reset
parseSelectField
parseSelect
Processed _processPendingJoinConditions
addPendingJoinCondition
create
unserialize

Method Details
processPendingSubqueries()

Parameter Summary
processPendingSubqueries processes pending subqueries
subqueries can only be processed when the query is fully constructed since some subqueries
may be correlated

(array) fetchArray($params = array())

Parameter Summary
fetchArray Convenience method to execute using array fetching as hydration mode.

----------------- Brought to you by


Doctrine_Query 423

(string) getSqlAggregateAlias($dqlAlias)

Parameter Summary

$dqlAlias the dql alias of an aggregate value

load($path, $loadFields = true)

Parameter Summary

processPendingAggregates()

Parameter Summary
processPendingAggregates processes pending aggregate values for given component
alias

buildAssociativeRelationSql(( ) $relation, $assocAlias, $foreignAlias,


$localAlias)

Parameter Summary

buildSimpleRelationSql(( ) $relation, $foreignAlias, $localAlias,


$overrideJoin, $join)

Parameter Summary

(string) getSqlQuery($params = array())

Parameter Summary

$params an array of prepared statement params (needed only in mysql driver when limit
subquery algorithm is used)

builds the sql query from the given parameters and applies things such as column
aggregation inheritance and limit subqueries if needed
<strong>returns</strong> the built sql query

copy(( ) $query = null)

Parameter Summary
Copies a Doctrine_Query object.
<strong>returns</strong> Copy of the Doctrine_Query instance.

----------------- Brought to you by


Doctrine_Query 424

(string) getAggregateAlias($dqlAlias)

Parameter Summary

$dqlAlias the dql alias of an aggregate value

buildIndexBy($componentAlias, $mapWith = null)

Parameter Summary

parseSubquery($subquery)

Parameter Summary

(array) serialize()

Parameter Summary
serialize this method is automatically called when this Doctrine_Hydrate is serialized
<strong>returns</strong> an array of serialized properties

parseDqlQuery($query, $clear = true)

Parameter Summary

$query DQL query

$clear whether or not to clear the aliases

DQL PARSER
parses a DQL query first splits the query in parts and then uses individual parsers for each
part
<strong>throws</strong> Doctrine_Query_Exception if some generic parsing error occurs

(string) getExpressionOwner($expr)

Parameter Summary

$expr expression from which to get to owner from

getExpressionOwner returns the component alias for owner of given expression


<strong>returns</strong> the component alias

----------------- Brought to you by


Doctrine_Query 425

(boolean) contains($dql)

Parameter Summary

$dql Arbitrary piece of dql to check for

Method to check if a arbitrary piece of dql exists

isSubquery($bool = null)

Parameter Summary

$bool whether or not this query acts as a subquery

if $bool parameter is set this method sets the value of Doctrine_Query::$isSubquery. If this
value is set to true the query object will not load the primary key fields of the selected
components. If null is given as the first parameter this method retr

(mixed) query($query, $params = array(), $hydrationMode = null)

Parameter Summary

$query DQL query


$params prepared statement parameters
$hydrationMode Doctrine::HYDRATE_ARRAY or Doctrine::HYDRATE_RECORD

query query the database with DQL (Doctrine Query Language)

(string) getLimitSubquery()

Parameter Summary
getLimitSubquery this is method is used by the record limit algorithm
when fetching one-to-many, many-to-many associated data with LIMIT clause an additional
subquery is needed for limiting the number of returned records instead of limiting the
number of sql result set rows
<strong>returns</strong> the limit subquery

buildInheritanceJoinSql($name, $componentAlias)

Parameter Summary

(Doctrine_Hydrate) createSubquery()

Parameter Summary
createSubquery creates a subquery

----------------- Brought to you by


Doctrine_Query 426

(string) _buildSqlQueryBase()

Parameter Summary
returns the base of the generated sql query On mysql driver special strategy has to be used
for DELETE statements (where is this special strategy??)
<strong>returns</strong> the base of the generated sql query

parseFunctionExpression($expr)

Parameter Summary

_killReference($key)

Parameter Summary
Kill the reference for the passed class property.
This method simply copies the value to a temporary variable and then unsets the reference
and re-assigns the old value but not by reference

(mixed) fetchOne($params = array(), $hydrationMode = null)

Parameter Summary

$params Parameters
$hydrationMode Hydration mode

fetchOne Convenience method to execute the query and return the first item of the
collection.
<strong>returns</strong> Array or Doctrine_Collection or false if no result.

(string) parseClause($clause)

Parameter Summary
parseClause parses given DQL clause
this method handles five tasks: <orderedlist> <li> <p>Converts all DQL functions to their
native SQL equivalents</p> </li> <li> <p>Converts all component references to their table
alias equivalents</p> </li> <li> <p>Conv
<strong>returns</strong> SQL string

(string) _buildSqlFromPart()

Parameter Summary
_buildSqlFromPart builds the from part of the query and returns it
<strong>returns</strong> the query sql from part

----------------- Brought to you by


Doctrine_Query 427

parseIdentifierReference($expr)

Parameter Summary

(integer) count($params = array())

Parameter Summary

$params an array of prepared statement parameters

count fetches the count of the query


This method executes the main query without all the selected fields, ORDER BY part, LIMIT
part and OFFSET part. Example: Main query: SELECT u.*, p.phonenumber FROM User u
LEFT JOIN u.Phonenumber p WHERE p.phonenumber = &apos;12
<strong>returns</strong> the count of this query

(string) getDqlPart($queryPart)

Parameter Summary

$queryPart the name of the query part

getDqlPart returns a specific DQL query part.


<strong>returns</strong> the DQL query part

(string) getCountQuery()

Parameter Summary
Get count sql query for this Doctrine_Query instance Used in
Doctrine_Query::count() for returning an integer for the number of records which
will be returned when executed.

loadRoot($name, $componentAlias)

Parameter Summary

adjustProcessedParam($index)

Parameter Summary
Adjust the processed param index for "foo.bar IN ?" support

__clone()

Parameter Summary

----------------- Brought to you by


Doctrine_Query 428

processPendingFields($componentAlias)

Parameter Summary

$componentAlias the alias of the component

processPendingFields the fields in SELECT clause cannot be parsed until the


components in FROM clause are parsed, hence this method is called everytime a
specific component is being parsed.
<strong>throws</strong> Doctrine_Query_Exception if unknown component alias has been
given

free()

Parameter Summary
Frees the resources used by the query object. It especially breaks a cyclic reference
between the query object and it's parsers. This enables PHP's current GC to reclaim
the memory.
This method can therefore be used to reduce memory usage when creating a lot of query
objects during a request.
<strong>returns</strong> this object

reset()

Parameter Summary
Resets the query to the state just after it has been instantiated.

parseSelectField($field)

Parameter Summary
<strong>throws</strong> Doctrine_Query_Exception if unknown component alias has been
given

parseSelect($dql)

Parameter Summary
parseSelect parses the query select part and adds selected fields to pendingFields
array

(Processed) _processPendingJoinConditions($alias)

Parameter Summary

$alias Component Alias

----------------- Brought to you by


Doctrine_Query_Abstract 429

Processes the pending join conditions, used for dynamically add conditions to root
component/joined components without interferring in the main dql processment.
<strong>returns</strong> pending conditions

addPendingJoinCondition($componentAlias, $joinCondition)

Parameter Summary

$componentAlias component alias

$joinCondition dql join condition

_addPendingJoinCondition
<strong>returns</strong> this object

create((Doctrine_Connection) $conn = null)

Parameter Summary

$conn optional connection parameter

create returns a new Doctrine_Query object

unserialize($serialized)

Parameter Summary

$serialized Doctrine_Record as serialized string

unseralize this method is automatically called everytime a Doctrine_Hydrate object is


unserialized

Doctrine_Query_Abstract

Method Summary
Returns Name Description
string generateSqlTableAlias
update

----------------- Brought to you by


Doctrine_Query_Abstract 430

array _getDqlCallback
array getParts
boolean hasAliasDeclaration
addOrderBy
Doctrine_Hydrate expireQueryCache
string generateTableAlias
getCacheDriver
clear
fixArrayParameterValues
boolean isLimitSubqueryUsed
delete
select
string generateNewSqlTableAlias
distinct
array getParams
orderBy
string getDql the query is built from $_dqlParts
string calculateQueryCacheHash
getSqlQuery The returned SQL syntax depends on the
connection driver that is used by this query
object at the time of this method call.
array getInternalParams
from
boolean _hasDqlQueryPart
forUpdate
_processWhereIn
string getSqlTableAlias this method is used for the creation of
short table aliases, its also smart enough to
check if an alias already exists for given
component (componentAlias)
Doctrine_Hydrate useCache
array getTableAliasMap
string getInheritanceCondition This function is used to append a SQL
condition to models which have inheritance
mapping The condition is applied to the
FROM component in the WHERE, but the
condition is applied to JOINS in the ON
condition and not the WHERE
parseDqlQuery
string __toString
Doctrine_Hydrate expireResultCache
leftJoin

----------------- Brought to you by


Doctrine_Query_Abstract 431

_preQuery
getAliasMap
addHaving
integer getType returns the type of this query object by
default the type is
Doctrine_Query_Abstract::SELECT but if
update() or delete() are being called the
type is Doctrine_Query_Abstract::UPDATE
and Doctrine_Query_Abstract::DELETE,
respectively
Doctrine_Hydrate setQueryPart
setHydrationMode
array getTableAliases
integer getSqlTableAliasSeed
limit
array getSqlParts
innerJoin
boolean hasTableAlias
Doctrine_Hydrate setSqlQueryPart
_addDqlQueryPart
Doctrine_Hydrate getSqlQueryPart
array getCountQueryParams
getQuery
array _getDqlCallbackComponents
getQueryPart
boolean hasSqlTableAlias
addFrom
__construct
andWhere
Doctrine_Hydrate useResultCache
integer getQueryCacheLifeSpan
getRoot
_processDqlQueryPart
_getParser
array getQueryComponent
addSqlTableAlias
execute
orWhere
preQuery
string getTableAlias this method is used for the creation of
short table aliases, its also smart enough to

----------------- Brought to you by


Doctrine_Query_Abstract 432

check if an alias already exists for given


component (componentAlias)
having
Doctrine_Hydrate removeQueryPart
string getComponentAlias
where
Doctrine_Hydrate setResultCacheLifeSpan
Doctrine_Hydrate addSqlQueryPart
setOption
Doctrine_Hydrate setCacheLifeSpan
Doctrine_Hydrate removeSqlQueryPart
set
getView
array getAliasDeclaration
andWhereNotIn
string getSql
getConnection
addGroupBy
Doctrine_Hydrate addQueryPart
offset
getQueryCacheDriver
integer getTableAliasSeed
Doctrine_Hydrate removeDqlQueryPart
andWhereIn
free
getFlattenedParams Used internally and used to pass flat array
of params to the database.
setParams
Doctrine_Hydrate useQueryCache
string generateNewTableAlias
array getRootDeclaration
orWhereIn
orWhereNotIn
string getCachedForm
array _constructQueryFromCache
setView
getResultCacheDriver
whereNotIn
PDOStatement _execute
Doctrine_Hydrate addTableAlias

----------------- Brought to you by


Doctrine_Query_Abstract 433

parseQuery
addWhere
Doctrine_Hydrate setQueryCacheLifeSpan
string calculateResultCacheHash
getQueryComponents
Doctrine_Hydrate copySubqueryInfo this method is needed by DQL subqueries
which need the aliases of the parent query
addSelect
groupBy
array getRootAlias
integer getResultCacheLifeSpan
whereIn
Doctrine_Hydrate expireCache

Method Details
(string) generateSqlTableAlias($componentAlias, $tableName)

Parameter Summary

$componentAlias the component alias to be associated with generated table alias

$tableName the table name from which to generate the table alias

generateSqlTableAlias generates a table alias from given table name and associates
it with given component alias
<strong>returns</strong> the generated table alias

update($from = null, $update)

Parameter Summary

$update Query UPDATE part

update sets the UPDATE part of the query

(array) _getDqlCallback()

Parameter Summary
Get the dql call back for this query

(array) getParts()

Parameter Summary

----------------- Brought to you by


Doctrine_Query_Abstract 434

Return the SQL parts.


<strong>returns</strong> The parts

(boolean) hasAliasDeclaration($componentAlias)

Parameter Summary

$componentAlias the component alias the retrieve the declaration from

hasAliasDeclaration whether or not this object has a declaration for given


component alias

addOrderBy($orderby)

Parameter Summary

$orderby Query ORDER BY part

addOrderBy adds fields to the ORDER BY part of the query

(Doctrine_Hydrate) expireQueryCache($expire = true)

Parameter Summary

$expire whether or not to force cache expiration

<strong>returns</strong> this object

(string) generateTableAlias($componentAlias, $tableName)

Parameter Summary

$componentAlias the component alias to be associated with generated table alias

$tableName the table name from which to generate the table alias

generateTableAlias generates a table alias from given table name and associates it
with given component alias
<strong>returns</strong> the generated table alias

getCacheDriver()

Parameter Summary
getCacheDriver returns the cache driver associated with this object
<strong>returns</strong> cache driver

----------------- Brought to you by


Doctrine_Query_Abstract 435

clear()

Parameter Summary
clear resets all the variables

fixArrayParameterValues($params = array())

Parameter Summary

(boolean) isLimitSubqueryUsed()

Parameter Summary
limitSubqueryUsed

delete($from = null)

Parameter Summary
delete sets the query type to DELETE

select($select = null)

Parameter Summary

$select Query SELECT part

select sets the SELECT part of the query

(string) generateNewSqlTableAlias($oldAlias, $tableAlias)

Parameter Summary

$tableAlias table alias from which to generate the new alias from

generateNewSqlTableAlias generates a new alias from given table alias


<strong>returns</strong> the created table alias

distinct($flag = true)

Parameter Summary

$flag Whether or not the SELECT is DISTINCT (default true).

distinct Makes the query SELECT DISTINCT.

----------------- Brought to you by


Doctrine_Query_Abstract 436

(array) getParams()

Parameter Summary
Get raw array of parameters for query and all parts.

orderBy($orderby)

Parameter Summary

$orderby Query ORDER BY part

orderBy sets the ORDER BY part of the query

(string) getDql()

Parameter Summary
getDql returns the DQL query that is represented by this query object.
the query is built from $_dqlParts
<strong>returns</strong> the DQL query

(string) calculateQueryCacheHash()

Parameter Summary
calculateQueryCacheHash calculate hash key for query cache
<strong>returns</strong> the hash

getSqlQuery($params = array())

Parameter Summary
Gets the SQL query that corresponds to this query object.
The returned SQL syntax depends on the connection driver that is used by this query object
at the time of this method call.

(array) getInternalParams($params = array())

Parameter Summary

from($from)

Parameter Summary

$from Query FROM part

from sets the FROM part of the query

----------------- Brought to you by


Doctrine_Query_Abstract 437

(boolean) _hasDqlQueryPart($queryPartName)

Parameter Summary

$queryPartName The name of the query part.

Checks if there's at least one DQL part defined to the internal parts collection.

forUpdate($flag = true)

Parameter Summary

$flag Whether or not the SELECT is FOR UPDATE (default true).

forUpdate Makes the query SELECT FOR UPDATE.

_processWhereIn($expr, $params = array(), $not = false)

Parameter Summary

(string) getSqlTableAlias($componentAlias, $tableName = null)

Parameter Summary

$componentAlias the alias for the query component to search table alias for

$tableName the table name from which the table alias is being created

getSqlTableAlias some database such as Oracle need the identifier lengths to be <
~30 chars hence Doctrine creates as short identifier aliases as possible
this method is used for the creation of short table aliases, its also smart enough to check if an
alias already exists for given component (componentAlias)
<strong>returns</strong> the generated / fetched short alias

(Doctrine_Hydrate) useCache((Doctrine_Cache_Interface|bool) $driver =


true, $timeToLive = null)

Parameter Summary

$driver cache driver


$timeToLive how long the cache entry is valid

<strong>returns</strong> this object

(array) getTableAliasMap()

Parameter Summary

----------------- Brought to you by


Doctrine_Query_Abstract 438

getTableAliasMap returns all table aliases


<strong>returns</strong> table aliases as an array

(string) getInheritanceCondition($componentAlias)

Parameter Summary
Returns the inheritance condition for the passed componentAlias If no component
alias is specified it defaults to the root component
This function is used to append a SQL condition to models which have inheritance mapping
The condition is applied to the FROM component in the WHERE, but the condition is applied
to JOINS in the ON condition and not the WHERE
<strong>returns</strong> SQL condition string

parseDqlQuery($query)

Parameter Summary

$query query to be parsed

parseDqlQuery parses a dql query


<strong>returns</strong> this object

(string) __toString()

Parameter Summary
toString magic call this method is automatically called when Doctrine_Query object
is trying to be used as a string So, it it converted into its DQL correspondant
<strong>returns</strong> DQL string

(Doctrine_Hydrate) expireResultCache($expire = true)

Parameter Summary

$expire whether or not to force cache expiration

expireCache
<strong>returns</strong> this object

leftJoin($join, $params = array())

Parameter Summary

$join Query LEFT JOIN

leftJoin appends a LEFT JOIN to the FROM part of the query

----------------- Brought to you by


Doctrine_Query_Abstract 439

_preQuery($params = array())

Parameter Summary
Pre query method which invokes the pre*Query() methods on the model instance or
any attached record listeners

getAliasMap()

Parameter Summary

addHaving($having, $params = array())

Parameter Summary

$having Query HAVING part

$params an array of parameters or a simple scalar

addHaving adds conditions to the HAVING part of the query

(integer) getType()

Parameter Summary
returns the type of this query object by default the type is Doctrine_Query_Abstract::SELECT
but if update() or delete() are being called the type is Doctrine_Query_Abstract::UPDATE and
Doctrine_Query_Abstract::DELETE, respectively
<strong>returns</strong> return the query type

(Doctrine_Hydrate) setQueryPart($name, $part)

Parameter Summary

$name the name of the query part to be set

$part query part string

setQueryPart sets a query part in the query part array


<strong>returns</strong> this object
<strong>throws</strong> Doctrine_Query_Exception if trying to set unknown query part

setHydrationMode($hydrationMode)

Parameter Summary

----------------- Brought to you by


Doctrine_Query_Abstract 440

(array) getTableAliases()

Parameter Summary
getTableAliases returns all table aliases
<strong>returns</strong> table aliases as an array

(integer) getSqlTableAliasSeed($sqlTableAlias, $tableAlias)

Parameter Summary

$tableAlias table alias that identifies the alias seed

getSqlTableAliasSeed returns the alias seed for given table alias


<strong>returns</strong> table alias seed

limit($limit)

Parameter Summary

$limit limit to be used for limiting the query results

limit sets the Query query limit

(array) getSqlParts()

Parameter Summary
Return the SQL parts.
<strong>returns</strong> The parts

innerJoin($join, $params = array())

Parameter Summary

$join Query INNER JOIN

innerJoin appends an INNER JOIN to the FROM part of the query

(boolean) hasTableAlias($sqlTableAlias, $tableAlias)

Parameter Summary

$tableAlias the table alias to be checked

hasTableAlias whether or not this object has given tableAlias


<strong>returns</strong> true if this object has given alias, otherwise false

----------------- Brought to you by


Doctrine_Query_Abstract 441

(Doctrine_Hydrate) setSqlQueryPart($name, $part)

Parameter Summary

$name the name of the query part to be set

$part query part string

setSqlQueryPart sets an SQL query part in the SQL query part array
<strong>returns</strong> this object
<strong>throws</strong> Doctrine_Query_Exception if trying to set unknown query part

_addDqlQueryPart($queryPartName, $queryPart, $append = false)

Parameter Summary

$queryPartName The name of the query part.

$queryPart The actual query part to add.


$append Whether to append $queryPart to already existing parts under the same
$queryPartName. Defaults to FALSE (previously added parts with the
same name get overridden).

Adds a DQL part to the internal parts collection.

(Doctrine_Hydrate) getSqlQueryPart($part, $name)

Parameter Summary

$part query part string


$name the name of the query part to be set

getSqlQueryPart gets an SQL query part from the SQL query part array
<strong>returns</strong> this object
<strong>throws</strong> Doctrine_Query_Exception if trying to set unknown query part

(array) getCountQueryParams($params = array())

Parameter Summary
getCountQueryParams Retrieves the parameters for count query
<strong>returns</strong> Parameters array

getQuery($params = array())

Parameter Summary

----------------- Brought to you by


Doctrine_Query_Abstract 442

(array) _getDqlCallbackComponents($params = array())

Parameter Summary
Returns an array of components to execute the query callbacks for

getQueryPart($part, $name)

Parameter Summary

$part query part string


$name the name of the query part to be set

getQueryPart gets a query part from the query part array


<strong>returns</strong> this object
<strong>throws</strong> Doctrine_Query_Exception if trying to set unknown query part

(boolean) hasSqlTableAlias($sqlTableAlias, $tableAlias)

Parameter Summary

$tableAlias the table alias to be checked

hasSqlTableAlias whether or not this object has given tableAlias


<strong>returns</strong> true if this object has given alias, otherwise false

addFrom($from)

Parameter Summary

$from Query FROM part

addFrom adds fields to the FROM part of the query

__construct(( ) $connection = null, ( ) $hydrator = null)

Parameter Summary

$connection The connection object the query will use.

$hydrator The hydrator that will be used for generating result sets.

Constructor.

----------------- Brought to you by


Doctrine_Query_Abstract 443

andWhere($where, $params = array())

Parameter Summary

$where Query WHERE part


$params An array of parameters or a simple scalar

Adds conditions to the WHERE part of the query

(Doctrine_Hydrate) useResultCache((Doctrine_Cache_Interface|bool)
$driver = true, $timeToLive = null)

Parameter Summary

$driver cache driver


$timeToLive how long the cache entry is valid

<strong>returns</strong> this object

(integer) getQueryCacheLifeSpan()

Parameter Summary
Gets the life span of the query cache the Query object is using.
<strong>returns</strong> The life span in seconds.

getRoot()

Parameter Summary
getRoot returns the root component for this object
<strong>returns</strong> root components table

_processDqlQueryPart($queryPartName, $queryParts)

Parameter Summary

$queryPartName the name of the query part

$queryParts an array containing the query part data

_processDqlQueryPart parses given query part


<strong>returns</strong> this object

_getParser($name)

Parameter Summary

----------------- Brought to you by


Doctrine_Query_Abstract 444

_getParser parser lazy-loader


<strong>throws</strong> Doctrine_Query_Exception if unknown parser name given

(array) getQueryComponent($componentAlias)

Parameter Summary

$componentAlias the component alias the retrieve the declaration from

getQueryComponent get the declaration for given component alias


<strong>returns</strong> the alias declaration

addSqlTableAlias($sqlTableAlias, $componentAlias, $tableAlias)

Parameter Summary

$componentAlias the alias for the query component associated with given tableAlias

$tableAlias the table alias to be added

addSqlTableAlias adds an SQL table alias and associates it a component alias

execute($params = array(), $hydrationMode = null)

Parameter Summary
execute executes the query and populates the data set
<strong>returns</strong> the root collection

orWhere($where, $params = array())

Parameter Summary

$where Query WHERE part


$params An array of parameters or a simple scalar

Adds conditions to the WHERE part of the query

preQuery()

Parameter Summary
Blank hook methods which can be implemented in Doctrine_Query child classes

----------------- Brought to you by


Doctrine_Query_Abstract 445

(string) getTableAlias($componentAlias, $tableName = null)

Parameter Summary

$componentAlias the alias for the query component to search table alias for

$tableName the table name from which the table alias is being created

getTableAlias some database such as Oracle need the identifier lengths to be < ~30
chars hence Doctrine creates as short identifier aliases as possible
this method is used for the creation of short table aliases, its also smart enough to check if an
alias already exists for given component (componentAlias)
<strong>returns</strong> the generated / fetched short alias

having($having, $params = array())

Parameter Summary

$having Query HAVING part

$params an array of parameters or a simple scalar

having sets the HAVING part of the query

(Doctrine_Hydrate) removeQueryPart($name)

Parameter Summary

$name the name of the query part to be removed

removeQueryPart removes a query part from the query part array


<strong>returns</strong> this object
<strong>throws</strong> Doctrine_Query_Exception if trying to remove unknown query
part

(string) getComponentAlias($sqlTableAlias)

Parameter Summary

$sqlTableAlias the SQL table alias that identifies the component alias

getComponentAlias get component alias associated with given table alias


<strong>returns</strong> component alias

----------------- Brought to you by


Doctrine_Query_Abstract 446

where($where, $params = array(), $join)

Parameter Summary

$params an array of parameters or a simple scalar

$join Query WHERE part

where sets the WHERE part of the query

(Doctrine_Hydrate) setResultCacheLifeSpan($timeToLive)

Parameter Summary

$timeToLive how long the cache entry is valid (in seconds)

<strong>returns</strong> this object

(Doctrine_Hydrate) addSqlQueryPart($name, $part)

Parameter Summary

$name the name of the query part to be added

$part query part string

addSqlQueryPart adds an SQL query part to the SQL query part array
<strong>returns</strong> this object
<strong>throws</strong> Doctrine_Query_Exception if trying to add unknown query part

setOption($name, $value)

Parameter Summary

$name option name

$value option value

<strong>returns</strong> this object

(Doctrine_Hydrate) setCacheLifeSpan($timeToLive)

Parameter Summary

$timeToLive how long the cache entry is valid

<strong>returns</strong> this object

----------------- Brought to you by


Doctrine_Query_Abstract 447

(Doctrine_Hydrate) removeSqlQueryPart($name)

Parameter Summary

$name the name of the query part to be removed

removeSqlQueryPart removes a query part from the query part array


<strong>returns</strong> this object
<strong>throws</strong> Doctrine_Query_Exception if trying to remove unknown query
part

set($key, $value, $params = null, $update)

Parameter Summary

$update Query UPDATE part

set sets the SET part of the query

getView()

Parameter Summary
getView returns the view associated with this query object (if any)
<strong>returns</strong> the view associated with this query object

(array) getAliasDeclaration($componentAlias)

Parameter Summary

$componentAlias the component alias the retrieve the declaration from

getAliasDeclaration get the declaration for given component alias


<strong>returns</strong> the alias declaration

andWhereNotIn($expr, $params = array())

Parameter Summary

$expr The operand of the NOT IN


$params An array of parameters or a simple scalar

Adds NOT IN condition to the query WHERE part

----------------- Brought to you by


Doctrine_Query_Abstract 448

(string) getSql($params = array())

Parameter Summary

$params (optional)

getSql shortcut for .


<strong>returns</strong> sql query string

getConnection()

Parameter Summary

addGroupBy($groupby)

Parameter Summary

$groupby Query GROUP BY part

addGroupBy adds fields to the GROUP BY part of the query

(Doctrine_Hydrate) addQueryPart($name, $part)

Parameter Summary

$name the name of the query part to be added

$part query part string

addQueryPart adds a query part in the query part array


<strong>returns</strong> this object
<strong>throws</strong> Doctrine_Query_Exception if trying to add unknown query part

offset($offset)

Parameter Summary

$offset offset to be used for paginating the query

offset sets the Query query offset

getQueryCacheDriver()

Parameter Summary
getQueryCacheDriver returns the cache driver used for caching queries
<strong>returns</strong> cache driver

----------------- Brought to you by


Doctrine_Query_Abstract 449

(integer) getTableAliasSeed($sqlTableAlias, $tableAlias)

Parameter Summary

$tableAlias table alias that identifies the alias seed

getTableAliasSeed returns the alias seed for given table alias


<strong>returns</strong> table alias seed

(Doctrine_Hydrate) removeDqlQueryPart($name)

Parameter Summary

$name the name of the query part to be removed

removeDqlQueryPart removes a dql query part from the dql query part array
<strong>returns</strong> this object
<strong>throws</strong> Doctrine_Query_Exception if trying to remove unknown query
part

andWhereIn($expr, $params = array(), $not = false)

Parameter Summary

$expr The operand of the IN


$params An array of parameters or a simple scalar

$not Whether or not to use NOT in front of IN

Adds IN condition to the query WHERE part

free()

Parameter Summary
Blank template method free(). Override to be used to free query object memory

getFlattenedParams($params = array())

Parameter Summary
Get flattened array of parameters for query.
Used internally and used to pass flat array of params to the database.

setParams($params = array())

Parameter Summary

----------------- Brought to you by


Doctrine_Query_Abstract 450

(Doctrine_Hydrate) useQueryCache((Doctrine_Cache_Interface|bool)
$driver = true, $timeToLive = null)

Parameter Summary

$driver cache driver


$timeToLive how long the cache entry is valid

<strong>returns</strong> this object

(string) generateNewTableAlias($oldAlias, $tableAlias)

Parameter Summary

$tableAlias table alias from which to generate the new alias from

generateNewTableAlias generates a new alias from given table alias


<strong>returns</strong> the created table alias

(array) getRootDeclaration()

Parameter Summary
getRootDeclaration returns the root declaration

orWhereIn($expr, $params = array(), $not = false)

Parameter Summary

$expr The operand of the IN


$params An array of parameters or a simple scalar

$not Whether or not to use NOT in front of IN

Adds IN condition to the query WHERE part

orWhereNotIn($expr, $params = array())

Parameter Summary

$expr The operand of the NOT IN


$params An array of parameters or a simple scalar

Adds NOT IN condition to the query WHERE part

----------------- Brought to you by


Doctrine_Query_Abstract 451

(string) getCachedForm($customComponent = null, $resultSet)

Parameter Summary
getCachedForm returns the cached form of this query for given resultSet
<strong>returns</strong> serialized string representation of this query

(array) _constructQueryFromCache($cached)

Parameter Summary

$cached The cached query, in a serialized form.

Constructs the query from the cached form.


<strong>returns</strong> The custom component that was cached together with the
essential query data. This can be either a result set (result caching) or an SQL query string
(query caching).

setView(( ) $view)

Parameter Summary

$view database view

setView sets a database view this query object uses this method should only be called
internally by doctrine

getResultCacheDriver()

Parameter Summary
getResultCacheDriver returns the cache driver used for caching result sets
<strong>returns</strong> cache driver

whereNotIn($expr, $params = array())

Parameter Summary

$expr the operand of the NOT IN


$params an array of parameters or a simple scalar

whereNotIn adds NOT IN condition to the query WHERE part

(PDOStatement) _execute($params)

Parameter Summary
<strong>returns</strong> The executed PDOStatement.

----------------- Brought to you by


Doctrine_Query_Abstract 452

(Doctrine_Hydrate) addTableAlias($tableAlias, $componentAlias)

Parameter Summary

$tableAlias the table alias to be added


$componentAlias the alias for the query component associated with given tableAlias

addTableAlias adds an alias for table and associates it with given component alias

parseQuery($query)

Parameter Summary

addWhere($where, $params = array())

Parameter Summary

$where Query WHERE part


$params an array of parameters or a simple scalar

addWhere adds conditions to the WHERE part of the query

(Doctrine_Hydrate) setQueryCacheLifeSpan($timeToLive)

Parameter Summary

$timeToLive how long the cache entry is valid

<strong>returns</strong> this object

(string) calculateResultCacheHash($params = array())

Parameter Summary
calculateResultCacheHash calculate hash key for result cache
<strong>returns</strong> the hash

getQueryComponents()

Parameter Summary
Gets the components of this query.

----------------- Brought to you by


Doctrine_Query_Abstract 453

(Doctrine_Hydrate) copySubqueryInfo(( ) $query)

Parameter Summary

$query the query object from which the aliases are copied from

copySubqueryInfo copy aliases from another Hydrate object


this method is needed by DQL subqueries which need the aliases of the parent query
<strong>returns</strong> this object

addSelect($select)

Parameter Summary

$select Query SELECT part

addSelect adds fields to the SELECT part of the query

groupBy($groupby)

Parameter Summary

$groupby Query GROUP BY part

groupBy sets the GROUP BY part of the query

(array) getRootAlias()

Parameter Summary
getRootAlias returns the alias of the the root component

(integer) getResultCacheLifeSpan()

Parameter Summary
Gets the life span of the result cache in seconds.

whereIn($expr, $params = array(), $not = false)

Parameter Summary

$expr the operand of the IN


$params an array of parameters or a simple scalar

$not whether or not to use NOT in front of IN

whereIn adds IN condition to the query WHERE part

----------------- Brought to you by


Doctrine_Query_Check 454

(Doctrine_Hydrate) expireCache($expire = true)

Parameter Summary

$expire whether or not to force cache expiration

<strong>returns</strong> this object

Doctrine_Query_Check

Method Summary
Returns Name Description
parseSingle
parseFunction
string parse
parseClause
getTable
__construct
string getSql returns database specific sql CHECK constraint definition parsed
from the given dql CHECK definition

Method Details
parseSingle($part)

Parameter Summary

parseFunction($dql)

Parameter Summary

----------------- Brought to you by


Doctrine_Query_Check 455

(string) parse($dql)

Parameter Summary

$dql DQL CHECK constraint definition

parseClause($dql, $alias, $field, $value)

Parameter Summary

$alias component alias

$field the field name


$value the value of the field

getTable()

Parameter Summary
getTable returns the table object associated with this object

__construct((Doctrine_Table|string) $table)

Parameter Summary

$table Doctrine_Table object

(string) getSql()

Parameter Summary
returns database specific sql CHECK constraint definition parsed from the given dql CHECK
definition

----------------- Brought to you by


Doctrine_Query_Condition 456

Doctrine_Query_Condition

Method Summary
Returns Name Description
string parse
string parseLiteralValue boolean literals are parsed to integers components are parsed
to associated table aliases

Method Details
(string) parse($str)

Parameter Summary
DQL CONDITION PARSER parses the join condition/where/having part of the query
string

(string) parseLiteralValue($value)

Parameter Summary

$value literal value to be parsed

parses a literal value and returns the parsed value


boolean literals are parsed to integers components are parsed to associated table aliases

----------------- Brought to you by


Doctrine_Query_Filter 457

Doctrine_Query_Filter

Method Summary
Returns Name Description
preQuery Method for listening the preQuery method of Doctrine_Query and
hooking into the query building procedure, doing any custom /
specialized query building procedures that are neccessary.
postQuery Method for listening the postQuery method of Doctrine_Query and to
hook into the query building procedure, doing any custom / specialized
post query procedures (for example logging) that are neccessary.

Method Details
preQuery(( ) $query)

Parameter Summary
Method for listening the preQuery method of Doctrine_Query and hooking into the query
building procedure, doing any custom / specialized query building procedures that are
neccessary.

postQuery(( ) $query)

Parameter Summary
Method for listening the postQuery method of Doctrine_Query and to hook into the query
building procedure, doing any custom / specialized post query procedures (for example
logging) that are neccessary.

----------------- Brought to you by


Doctrine_Query_Filter_Chain 458

Doctrine_Query_Filter_Chain

Method Summary
Returns Name Description
add
mixed get
preQuery Method for listening the preQuery method of Doctrine_Query and
hooking into the query building procedure, doing any custom /
specialized query building procedures that are neccessary.
set
postQuery Method for listening the postQuery method of Doctrine_Query and to
hook into the query building procedure, doing any custom / specialized
post query procedures (for example logging) that are neccessary.

Method Details
add(( ) $filter)

Parameter Summary

(mixed) get($key)

Parameter Summary
returns a Doctrine_Query_Filter on success and null on failure

preQuery(( ) $query)

Parameter Summary
Method for listening the preQuery method of Doctrine_Query and hooking into the query
building procedure, doing any custom / specialized query building procedures that are
neccessary.

----------------- Brought to you by


Doctrine_Query_Filter_Interface 459

set($key, ( ) $listener)

Parameter Summary

postQuery(( ) $query)

Parameter Summary
Method for listening the postQuery method of Doctrine_Query and to hook into the query
building procedure, doing any custom / specialized post query procedures (for example
logging) that are neccessary.

Doctrine_Query_Filter_Interface

Method Summary
Returns Name Description
preQuery Method for listening the preQuery method of Doctrine_Query and
hooking into the query building procedure, doing any custom /
specialized query building procedures that are neccessary.
postQuery Method for listening the postQuery method of Doctrine_Query and to
hook into the query building procedure, doing any custom / specialized
post query procedures (for example logging) that are neccessary.

Method Details
preQuery(( ) $query)

Parameter Summary
Method for listening the preQuery method of Doctrine_Query and hooking into the query
building procedure, doing any custom / specialized query building procedures that are
neccessary.

postQuery(( ) $query)

Parameter Summary

----------------- Brought to you by


Doctrine_Query_Forupdate 460

Method for listening the postQuery method of Doctrine_Query and to hook into the query
building procedure, doing any custom / specialized post query procedures (for example
logging) that are neccessary.

Doctrine_Query_Forupdate

Method Summary
Returns Name Description
parse

Method Details
parse($forUpdate)

Parameter Summary

Doctrine_Query_From

Method Summary
Returns Name Description
parse

----------------- Brought to you by


Doctrine_Query_Groupby 461

Method Details
parse($str, $return = false)

Parameter Summary

$return if to return the parsed FROM and skip load()

DQL FROM PARSER parses the FROM part of the query string

Doctrine_Query_Groupby

Method Summary
Returns Name Description
parse

Method Details
parse($clause, $append = false, $str)

Parameter Summary
DQL GROUP BY PARSER parses the group by part of the query string

----------------- Brought to you by


Doctrine_Query_Having 462

Doctrine_Query_Having

Method Summary
Returns Name Description
string load

Method Details
(string) load($having)

Parameter Summary
load returns the parsed query part

Doctrine_Query_JoinCondition

Method Summary
Returns Name Description
load
_processPossibleAggExpression

----------------- Brought to you by


Doctrine_Query_Limit 463

Method Details
load($condition)

Parameter Summary

_processPossibleAggExpression([[[amp]]]$expr, [[[amp]]]$matches)

Parameter Summary

Doctrine_Query_Limit

Method Summary
Returns Name Description
parse

Method Details
parse($limit)

Parameter Summary

----------------- Brought to you by


Doctrine_Query_Offset 464

Doctrine_Query_Offset

Method Summary
Returns Name Description
parse

Method Details
parse($offset)

Parameter Summary

Doctrine_Query_Orderby

Method Summary
Returns Name Description
parse

Method Details
parse($clause, $append = false)

Parameter Summary

----------------- Brought to you by


Doctrine_Query_Part 465

DQL ORDER BY PARSER parses the order by part of the query string

Doctrine_Query_Part

Method Summary
Returns Name Description
getQuery
__construct

Method Details
getQuery()

Parameter Summary
<strong>returns</strong> the query object associated with this parser

__construct((Doctrine_Query) $query, ( ) $tokenizer = null)

Parameter Summary

$query the query object associated with this parser

----------------- Brought to you by


Doctrine_Query_Registry 466

Doctrine_Query_Registry

Method Summary
Returns Name Description
has
add
get

Method Details
has($key, $namespace = null)

Parameter Summary

add($key, $query)

Parameter Summary

get($key, $namespace = null)

Parameter Summary

----------------- Brought to you by


Doctrine_Query_Select 467

Doctrine_Query_Select

Method Summary
Returns Name Description
parse

Method Details
parse($dql)

Parameter Summary

Doctrine_Query_Set

Method Summary
Returns Name Description
parse
_processPossibleAggExpression

----------------- Brought to you by


Doctrine_Query_Tokenizer 468

Method Details
parse($dql)

Parameter Summary

_processPossibleAggExpression([[[amp]]]$expr, [[[amp]]]$matches)

Parameter Summary

Doctrine_Query_Tokenizer

Method Summary
Returns Name Description
bracketTrim
array tokenizeQuery splits the given dql query into an array where keys represent
different query part names and values are arrays splitted using
sqlExplode method example: parameter: $query = "SELECT u.*
FROM User u WHERE u.name LIKE ?" returns: arr
quoteExplode example: parameters: $str = email LIKE 'John@example.com' $d
= ' LIKE ' would return an array: array("email", "LIKE",
"'John@example.com'")
bracketExplode example: parameters: $str = (age < 20 AND age > 18) AND
email LIKE 'John@example.com' $d = ' AND ' $e1 = '(' $e2 = ')'
would return an array: array("(age < 20 AND age >
array sqlExplode explodes a string into array using custom brackets and quote
delimeters example: parameters: $str = "(age < 20 AND age >
18) AND name LIKE 'John Doe'" $d = ' ' $e1 = '(' $e2 = &apo
array clauseExplode explodes a string into array using custom brackets and quote
delimeters example: parameters: $str = "(age < 20 AND age >
18) AND name LIKE 'John Doe'" $d = ' ' $e1 = '(' $e2 = &apo

----------------- Brought to you by


Doctrine_Query_Tokenizer 469

Method Details
bracketTrim($str, $e1 = '(', $e2 = ')')

Parameter Summary

$e1 the first bracket, usually &apos;(&apos;

$e2 the second bracket, usually &apos;)&apos;

trims brackets

(array) tokenizeQuery($query)

Parameter Summary

$query DQL query

splits the given dql query into an array where keys represent different query part names and
values are arrays splitted using sqlExplode method example: parameter: $query =
&quot;SELECT u.* FROM User u WHERE u.name LIKE ?&quot; returns: arr
<strong>returns</strong> an array containing the query string parts
<strong>throws</strong> Doctrine_Query_Exception if some generic parsing error occurs

quoteExplode($str, $d = ' ')

Parameter Summary

$d the delimeter which explodes the string

example: parameters: $str = email LIKE &apos;John@example.com&apos; $d = &apos; LIKE


&apos; would return an array: array(&quot;email&quot;, &quot;LIKE&quot;,
&quot;&apos;John@example.com&apos;&quot;)

bracketExplode($str, $d = ' ', $e1 = '(', $e2 = ')')

Parameter Summary

$d the delimeter which explodes the string


$e1 the first bracket, usually &apos;(&apos;

$e2 the second bracket, usually &apos;)&apos;

example: parameters: $str = (age &lt; 20 AND age &gt; 18) AND email LIKE
&apos;John@example.com&apos; $d = &apos; AND &apos; $e1 = &apos;(&apos; $e2 =
&apos;)&apos; would return an array: array(&quot;(age &lt; 20 AND age &gt;

----------------- Brought to you by


Doctrine_Query_Where 470

(array) sqlExplode($str, $d = ' ', $e1 = '(', $e2 = ')')

Parameter Summary

$d the delimeter which explodes the string


$e1 the first bracket, usually &apos;(&apos;

$e2 the second bracket, usually &apos;)&apos;

explodes a string into array using custom brackets and quote delimeters example:
parameters: $str = &quot;(age &lt; 20 AND age &gt; 18) AND name LIKE &apos;John
Doe&apos;&quot; $d = &apos; &apos; $e1 = &apos;(&apos; $e2 = &apo

(array) clauseExplode($str, $d, $e1 = '(', $e2 = ')')

Parameter Summary

$d the delimeter which explodes the string


$e1 the first bracket, usually &apos;(&apos;

$e2 the second bracket, usually &apos;)&apos;

explodes a string into array using custom brackets and quote delimeters example:
parameters: $str = &quot;(age &lt; 20 AND age &gt; 18) AND name LIKE &apos;John
Doe&apos;&quot; $d = &apos; &apos; $e1 = &apos;(&apos; $e2 = &apo

Doctrine_Query_Where

Method Summary
Returns Name Description
parseValue
load
_buildWhereInArraySqlPart
_buildSql
string parseExists

----------------- Brought to you by


Doctrine_RawSql 471

Method Details
parseValue($rightExpr)

Parameter Summary

load($where)

Parameter Summary

_buildWhereInArraySqlPart($rightExpr)

Parameter Summary

_buildSql($leftExpr, $operator, $rightExpr)

Parameter Summary

(string) parseExists($where, $negation)

Parameter Summary

$where query where part to be parsed


$negation whether or not to use the NOT keyword

parses an EXISTS expression

Doctrine_RawSql

Method Summary
Returns Name Description
parseDqlQueryPart This implementation does no parsing at all, except of the
SELECT portion of the query which is special in RawSql
queries. The entire remaining parts are used "as is", so the
user of the RawSql query is responsible for writing SQL that
is porta

----------------- Brought to you by


Doctrine_RawSql 472

string getSqlQuery
parseDqlQuery Overrides Doctrine_Query_Abstract::parseDqlQuery(). This
implementation simply tokenizes the provided query string
and uses them as SQL parts right away.
parseQueryPart
_addDqlQueryPart This implementation for RawSql parses the new parts right
away, generating the SQL.
__construct
integer count This method executes the main query without all the selected
fields, ORDER BY part, LIMIT part and OFFSET part. This is
an exact copy of the Dql Version
array getFields
string getCountQuery
addComponent

Method Details
parseDqlQueryPart($queryPartName, $queryPart, $append = false)

Parameter Summary

$queryPartName the name of the query part

$queryPart query part to be parsed


$append whether or not to append the query part to its stack if false is given, this
method will overwrite the given query part stack with $queryPart

parseDqlQueryPart parses given DQL query part. Overrides


Doctrine_Query_Abstract::parseDqlQueryPart().
This implementation does no parsing at all, except of the SELECT portion of the query which
is special in RawSql queries. The entire remaining parts are used &quot;as is&quot;, so the
user of the RawSql query is responsible for writing SQL that is porta
<strong>returns</strong> this object

(string) getSqlQuery($params = array())

Parameter Summary
getSqlQuery builds the sql query.
<strong>returns</strong> the built sql query

----------------- Brought to you by


Doctrine_RawSql 473

parseDqlQuery($query)

Parameter Summary

$query query to be parsed

parseDqlQuery parses an sql query and adds the parts to internal array.
Overrides Doctrine_Query_Abstract::parseDqlQuery(). This implementation simply tokenizes
the provided query string and uses them as SQL parts right away.
<strong>returns</strong> this object

parseQueryPart($queryPartName, $queryPart, $append = false)

Parameter Summary

_addDqlQueryPart($queryPartName, $queryPart, $append = false)

Parameter Summary
Adds a DQL query part. Overrides Doctrine_Query_Abstract::_addDqlQueryPart().
This implementation for RawSql parses the new parts right away, generating the SQL.

__construct(( ) $connection = null, ( ) $hydrator = null)

Parameter Summary

$connection The connection object the query will use.

$hydrator The hydrator that will be used for generating result sets.

Constructor.

(integer) count($params = array())

Parameter Summary

$params an array of prepared statement parameters

count fetches the count of the query


This method executes the main query without all the selected fields, ORDER BY part, LIMIT
part and OFFSET part. This is an exact copy of the Dql Version
<strong>returns</strong> the count of this query

(array) getFields()

Parameter Summary
getFields returns the fields associated with this parser

----------------- Brought to you by


Doctrine_Record 474

<strong>returns</strong> all the fields associated with this parser

(string) getCountQuery($params = array())

Parameter Summary
getCountQuery builds the count query.
<strong>returns</strong> the built sql query

addComponent($tableAlias, $path, $componentName)

Parameter Summary

Doctrine_Record

Method Summary
Returns Name Description
boolean assignDefaultValues
integer getIncremented
preSave
preDqlUpdate queries at runtime
loadReference
mapValue Usually this method is used internally by Doctrine for
the mapping of aggregate values.
deleteNode
preDelete
postHydrate after it runs
_get
state
boolean load Used to move a record from PROXY to CLEAN/DIRTY
state.
postUpdate
postValidate

----------------- Brought to you by


Doctrine_Record 475

validateOnInsert
coreSetRelated
array getPrepared returns an array of modified fields and values with data
preparation adds column aggregation inheritance and
converts Records into primary key values
clearRelated (references to related objects still remain on Table
objects)
boolean delete this event can be listened by the onPreDelete and
onDelete listeners
refreshRelated
mixed __call the function of this method is to try to find given method
from the templates this record is using and if it finds
given method it will execute it So, in sense, this method
replicates the usage of mixins (as seen in some
programming languages)
array getMutators
array identifier
copy
obtainReference
boolean refresh
importFrom Import data from an external data source
merge
getErrorStack
array serialize
string getAccessor
boolean hydrate
boolean hasReference
__toString
construct
boolean contains
mixed get
save this method also saves the related components
validate
postSave
linkInDb
clearMutator
array getReferences
clearAccessor
array getPendingUnlinks
array getLastModified

----------------- Brought to you by


Doctrine_Record 476

boolean _isValueModified This function basically says if what is being set is of


Doctrine type boolean and something like current_value
== 1 && new_value = true would not be considered
modified Simply doing $old !== $new will return false
for boolean columns would mark t
integer columnCount
getLast this method is used internally be Doctrine_Query it is
needed to provide compatibility between records and
collections
array getModified
__unset
boolean hasRelation
link
preInsert
TRUE trySave In contrast to Doctrine_Record::save(), this method does
not throw an exception when validation fails but returns
TRUE on success or FALSE on failure.
preValidate
unlink
getTable
unshiftFilter
__construct
mixed getNode
preHydrate before it runs
preDqlDelete queries at runtime
boolean exists
integer getOid
integer count
array getPendingDeletes
postInsert
integer replace Execute a SQL REPLACE query. A REPLACE query is
identical to a INSERT query, except that if there is
already a row in the table with the same key field values,
the REPLACE query just updates its values instead of
inserting a new row. The REPLACE type o
_resetModified
boolean hasMutator
postUnserialize
validateOnUpdate
setRelated
assignIdentifier
getIterator

----------------- Brought to you by


Doctrine_Record 477

set
boolean hasAccessor
assignInheritanceValues
oid
array getData
free Cuts all references the entity has to other entities and
removes the entity from the instance pool. Note: The
entity is no longer useable after free() has been called.
Any operations done with the entity afterwards can lead
to unpredictable results.
unlinkInDb
string getMutator
array cleanData
hasAccessorMutator
mixed exportTo
preUnserialize
call
errorStack
integer _index
reference
fromArray
_set
array getAccessors
mixed rawGet
string toString
postSerialize
array toArray
unserialize
setUp
boolean isModified
synchronizeWithArray it expects an array representation of a Doctrine_Record
similar to the return value of the toArray() method. If the
array contains relations it will create those that don't
exist, update the ones that do, and delete the ones
missing on the array b
preDqlSelect queries at runtime
postDelete
resetPendingUnlinks
preUpdate
preSerialize
boolean isValid

----------------- Brought to you by


Doctrine_Record 478

Method Details
(boolean) assignDefaultValues($overwrite = false)

Parameter Summary

$overwrite whether or not to overwrite the already set values

setDefaultValues sets the default values for records internal data

(integer) getIncremented()

Parameter Summary
returns the value of autoincremented primary key of this object (if any)

preSave($event)

Parameter Summary
Empty template method to provide concrete Record classes with the possibility to
hook into the saving procedure.

preDqlUpdate($event)

Parameter Summary
Empty template method to provide Record classes with the ability to alter DQL
update
queries at runtime

loadReference($name)

Parameter Summary
loadReference loads a related component
<strong>throws</strong> Doctrine_Table_Exception if trying to load an unknown related
component

mapValue($name, $value = null)

Parameter Summary

$name the name of the mapped value

$value mixed value to be mapped

mapValue This simple method is used for mapping values to $values property.

----------------- Brought to you by


Doctrine_Record 479

Usually this method is used internally by Doctrine for the mapping of aggregate values.

deleteNode()

Parameter Summary
used to delete node from tree - MUST BE USE TO DELETE RECORD IF TABLE ACTS
AS TREE

preDelete($event)

Parameter Summary
Empty template method to provide concrete Record classes with the possibility to
hook into the deletion procedure.

postHydrate($event)

Parameter Summary
Empty template method to provide Record classes with the ability to alter hydration
after it runs

_get($fieldName, $load = true)

Parameter Summary

state((integer|string) $state = null)

Parameter Summary

$state if set, this method tries to set the record state to $state

state returns / assigns the state of this record


<strong>throws</strong> Doctrine_Record_State_Exception if trying to set an unknown
state

(boolean) load($data = array())

Parameter Summary
load Loads all the uninitialized properties from the database.
Used to move a record from PROXY to CLEAN/DIRTY state.

postUpdate($event)

Parameter Summary

----------------- Brought to you by


Doctrine_Record 480

Empty template method to provide concrete Record classes with the possibility to
hook into the saving procedure only when the record is going to be updated.

postValidate($event)

Parameter Summary
Empty template method to provide concrete Record classes with the possibility to
hook into the validation procedure.

validateOnInsert()

Parameter Summary
Empty template method to provide concrete Record classes with the possibility to
hook into the validation procedure only when the record is going to be inserted into
the data store the first time.

coreSetRelated($name, $value)

Parameter Summary
DESCRIBE WHAT THIS METHOD DOES, PLEASE!

(array) getPrepared($array = array())

Parameter Summary
returns an array of modified fields and values with data preparation adds column aggregation
inheritance and converts Records into primary key values

clearRelated()

Parameter Summary
clearRelated unsets all the relationships this object has
(references to related objects still remain on Table objects)

(boolean) delete(( ) $conn = null)

Parameter Summary
deletes this data access object and all the related composites this operation is
isolated by a transaction
this event can be listened by the onPreDelete and onDelete listeners
<strong>returns</strong> true on success, false on failure

----------------- Brought to you by


Doctrine_Record 481

refreshRelated($name = null)

Parameter Summary

$name name of a related component. if set, this method only refreshes the specified related
component

refresh refresh data of related objects from the database


<strong>returns</strong> this object

(mixed) __call($method, $args)

Parameter Summary

$method name of the method

$args method arguments

__call this method is a magic method that is being used for method overloading
the function of this method is to try to find given method from the templates this record is
using and if it finds given method it will execute it So, in sense, this method replicates the
usage of mixins (as seen in some programming languages)
<strong>returns</strong> the return value of the given method

(array) getMutators()

Parameter Summary
Get all mutators for this component instance

(array) identifier()

Parameter Summary
returns the primary keys of this object

copy($deep = false)

Parameter Summary
copy returns a copy of this object

obtainReference($name)

Parameter Summary
<strong>throws</strong> Doctrine_Record_Exception if trying to get an unknown related
component

----------------- Brought to you by


Doctrine_Record 482

(boolean) refresh($deep = false)

Parameter Summary

$deep If true, fetch also current relations. Caution: this deletes any aggregated values you
may have queried beforee

refresh refresh internal data from the database


<strong>throws</strong> Doctrine_Record_Exception When the refresh operation fails
(when the database row this record represents does not exist anymore)

importFrom($type, $data)

Parameter Summary

$type Format type: xml, yml, json

$data Data to be parsed and imported

Import data from an external data source

merge($data, $deep = true)

Parameter Summary

$data Data to merge. Either another instance of this model or an array

$deep Bool value for whether or not to merge the data deep

Merges this record with an array of values or with another existing instance of this
object

getErrorStack()

Parameter Summary
<strong>returns</strong> returns the errorStack associated with this record

(array) serialize()

Parameter Summary
serialize this method is automatically called when this Doctrine_Record is serialized

(string) getAccessor($fieldName)

Parameter Summary
Get the custom accessor for a field name

----------------- Brought to you by


Doctrine_Record 483

(boolean) hydrate($data)

Parameter Summary
hydrate hydrates this object from given array

(boolean) hasReference($name)

Parameter Summary
hasRefence

__toString()

Parameter Summary
returns a string representation of this object

construct()

Parameter Summary
construct Empty template method to provide concrete Record classes with the
possibility to hook into the constructor procedure

(boolean) contains($fieldName, $name)

Parameter Summary

(mixed) get($fieldName, $load = true, $name)

Parameter Summary

$load whether or not to invoke the loading procedure


$name name of the property or related component

get returns a value of a property or a related component


<strong>throws</strong> Doctrine_Record_Exception if trying to get a value of unknown
property / related component

save(( ) $conn = null)

Parameter Summary

$conn optional connection parameter

applies the changes made to this object into database this method is smart enough
to know if any changes are made and whether to use INSERT or UPDATE statement

----------------- Brought to you by


Doctrine_Record 484

this method also saves the related components

validate()

Parameter Summary
Empty template method to provide concrete Record classes with the possibility to
hook into the validation procedure, doing any custom / specialized validations that
are neccessary.

postSave($event)

Parameter Summary
Empty template method to provide concrete Record classes with the possibility to
hook into the saving procedure.

linkInDb($alias, $ids)

Parameter Summary

clearMutator($fieldName)

Parameter Summary
Clear the mutator for a field name

(array) getReferences()

Parameter Summary
<strong>returns</strong> all references

clearAccessor($fieldName)

Parameter Summary
Clear the accessor for a field name

(array) getPendingUnlinks()

Parameter Summary
Get pending un links array

----------------- Brought to you by


Doctrine_Record 485

(array) getLastModified($old = false)

Parameter Summary

$old Whether or not to return the old values instead of the new

returns an array of the modified fields from the last transaction.

(boolean) _isValueModified($type, $old, $new)

Parameter Summary

$type Doctrine type of the column

$old Old value


$new New value

Check if a value has changed according to Doctrine Doctrine is loose with type
checking in the same ways PHP is for consistancy of behavior
This function basically says if what is being set is of Doctrine type boolean and something like
current_value == 1 &amp;&amp; new_value = true would not be considered modified Simply
doing $old !== $new will return false for boolean columns would mark t
<strong>returns</strong> Whether or not Doctrine considers the value modified

(integer) columnCount()

Parameter Summary
alias for count()
<strong>returns</strong> the number of columns in this record

getLast()

Parameter Summary
this method is used internally be Doctrine_Query it is needed to provide compatibility
between records and collections

(array) getModified($old = false, $last = false)

Parameter Summary
returns an array of modified fields and associated new values specify $old = true to
retrieve an array with the old values

__unset($name)

Parameter Summary

----------------- Brought to you by


Doctrine_Record 486

(boolean) hasRelation($fieldName, $name)

Parameter Summary

$name name of the property or reference

method for checking existence of properties and Doctrine_Record references

link($alias, $ids, $now = false)

Parameter Summary

$alias related component alias

$ids the identifiers of the related records


$now wether or not to execute now or set pending

link creates links from this record to given records


<strong>returns</strong> this object

preInsert($event)

Parameter Summary
Empty template method to provide concrete Record classes with the possibility to
hook into the saving procedure only when the record is going to be inserted into the
data store the first time.

(TRUE) trySave(( ) $conn = null)

Parameter Summary

$conn optional connection parameter

Tries to save the object and all its related components.


In contrast to Doctrine_Record::save(), this method does not throw an exception when
validation fails but returns TRUE on success or FALSE on failure.
<strong>returns</strong> if the record was saved sucessfully without errors, FALSE
otherwise.

preValidate($event)

Parameter Summary
Empty template method to provide concrete Record classes with the possibility to
hook into the validation procedure. Useful for cleaning up data before validating it.

----------------- Brought to you by


Doctrine_Record 487

unlink($alias, $ids = array(), $now = false)

Parameter Summary

$alias related component alias

$ids the identifiers of the related records


$now wether or not to execute now or set pending

unlink removes links from this record to given records if no ids are given, it removes
all links
<strong>returns</strong> this object

getTable()

Parameter Summary
getTable returns the table object for this record
<strong>returns</strong> a Doctrine_Table object

unshiftFilter(( ) $filter)

Parameter Summary

__construct((Doctrine_Table|null) $table = null, $isNewEntry = false)

Parameter Summary

$table a Doctrine_Table object or null, if null the table object is retrieved from
current connection
$isNewEntry whether or not this record is transient

constructor
<strong>throws</strong> Doctrine_Record_Exception if the cleanData operation fails
somehow

(mixed) getNode()

Parameter Summary
getter for node assciated with this record
<strong>returns</strong> if tree returns Doctrine_Node otherwise returns false

preHydrate($event)

Parameter Summary

----------------- Brought to you by


Doctrine_Record 488

Empty template method to provide Record classes with the ability to alter hydration
before it runs

preDqlDelete($event)

Parameter Summary
Empty template method to provide Record classes with the ability to alter DQL
delete
queries at runtime

(boolean) exists()

Parameter Summary
exists returns true if this record is persistent, otherwise false

(integer) getOid()

Parameter Summary
getOid returns the object identifier

(integer) count()

Parameter Summary
count this class implements countable interface
<strong>returns</strong> the number of columns in this record

(array) getPendingDeletes()

Parameter Summary
<strong>returns</strong> Array of Doctrine_Records instances which need to be deleted on
save

postInsert($event)

Parameter Summary
Empty template method to provide concrete Record classes with the possibility to
hook into the saving procedure only when the record is going to be inserted into the
data store the first time.

----------------- Brought to you by


Doctrine_Record 489

(integer) replace(( ) $conn = null)

Parameter Summary

$conn optional connection parameter

Execute a SQL REPLACE query. A REPLACE query is identical to a INSERT query, except
that if there is already a row in the table with the same key field values, the REPLACE query
just updates its values instead of inserting a new row. The REPLACE type o
<strong>returns</strong> number of rows affected
<strong>throws</strong> Doctrine_Connection_Exception if some of the key values was null

_resetModified()

Parameter Summary
Reset the modified array and store the old array in lastModified so it can be accessed
by users after saving a record since the modified array is reset after the object is
saved.

(boolean) hasMutator($fieldName, $mutator = null)

Parameter Summary
Set a fieldname to have a custom mutator or check if a field has a custom mutator
defined

postUnserialize($event)

Parameter Summary
Empty template method to provide concrete Record classes with the possibility to
hook into the serializing procedure.

validateOnUpdate()

Parameter Summary
Empty template method to provide concrete Record classes with the possibility to
hook into the validation procedure only when the record is going to be updated.

setRelated($alias, ( ) $coll)

Parameter Summary

assignIdentifier($id = false)

Parameter Summary

----------------- Brought to you by


Doctrine_Record 490

getIterator()

Parameter Summary
<strong>returns</strong> a Doctrine_Record_Iterator that iterates through the data

set($fieldName, $value, $load = true, $name)

Parameter Summary

$value value of the property or reference

$load whether or not to refresh / load the uninitialized record data


$name name of the property or reference

set method for altering properties and Doctrine_Record references if the load
parameter is set to false this method will not try to load uninitialized record data
<strong>throws</strong> Doctrine_Record_Exception if trying to set a value of wrong type
for related component

(boolean) hasAccessor($fieldName, $accessor = null)

Parameter Summary
Set a fieldname to have a custom accessor or check if a field has a custom accessor
defined

assignInheritanceValues()

Parameter Summary
Assign the inheritance column values

oid()

Parameter Summary

(array) getData()

Parameter Summary
getData return all the internal data
<strong>returns</strong> an array containing all the properties

free($deep = false)

Parameter Summary
Helps freeing the memory occupied by the entity.

----------------- Brought to you by


Doctrine_Record 491

Cuts all references the entity has to other entities and removes the entity from the instance
pool. Note: The entity is no longer useable after free() has been called. Any operations done
with the entity afterwards can lead to unpredictable results.

unlinkInDb($alias, $ids = array())

Parameter Summary

(string) getMutator($fieldName)

Parameter Summary
Get the custom accessor for a field name

(array) cleanData([[[amp]]]$data, $data)

Parameter Summary

$data data array to be cleaned

cleanData leaves the $data array only with values whose key is a field inside this
record and returns the values that were removed from $data. Also converts any
values of 'null' to objects of type Doctrine_Null.
<strong>returns</strong> values cleaned from data

hasAccessorMutator($fieldName, $accessor, $mutator, $fieldname)

Parameter Summary
Set a fieldname to have a custom accessor and mutator

(mixed) exportTo($type, $deep = true)

Parameter Summary

$type Format type: xml, yml, json

$deep Whether or not to export deep in to all relationships

preUnserialize($event)

Parameter Summary
Empty template method to provide concrete Record classes with the possibility to
hook into the serializing procedure.

----------------- Brought to you by


Doctrine_Record 492

call((string|array) $callback, $column, 2)

Parameter Summary

$callback valid callback

$column column name


2 arg1 ... argN optional callback arguments

errorStack((Doctrine_Validator_ErrorStack) $stack = null)

Parameter Summary

$stack errorStack to be assigned for this record

errorStack assigns / returns record errorStack


<strong>returns</strong> returns the errorStack associated with this record

(integer) _index()

Parameter Summary

reference($name)

Parameter Summary

fromArray($array, $deep = true)

Parameter Summary

$array Php array of data

$deep Bool value for whether or not to merge the data deep

Import data from a php array

_set($fieldName, $value, $load = true)

Parameter Summary

(array) getAccessors()

Parameter Summary
Get all accessors for this component instance

----------------- Brought to you by


Doctrine_Record 493

(mixed) rawGet(($name) $fieldName)

Parameter Summary

$fieldName name of the property

rawGet returns the value of a property, if the property is not yet loaded this method
does NOT load it
<strong>throws</strong> Doctrine_Record_Exception if trying to get an unknown property

(string) toString()

Parameter Summary
__toString alias

postSerialize($event)

Parameter Summary
Empty template method to provide concrete Record classes with the possibility to
hook into the serializing procedure.

(array) toArray($deep = true, $prefixKey = false)

Parameter Summary

$deep
• Return also the relations

toArray returns the record as an array

unserialize($serialized)

Parameter Summary

$serialized Doctrine_Record as serialized string

unseralize this method is automatically called everytime a Doctrine_Record object is


unserialized
<strong>throws</strong> Doctrine_Record_Exception if the cleanData operation fails
somehow

setUp()

Parameter Summary
setUp this method is used for setting up relations and attributes it should be
implemented by child classes

----------------- Brought to you by


Doctrine_Record 494

(boolean) isModified()

Parameter Summary
isModified returns true if this record was modified, otherwise false

synchronizeWithArray($array, $deep = true)

Parameter Summary

$array representation of a Doctrine_Record

Synchronizes a Doctrine_Record and its relations with data from an array


it expects an array representation of a Doctrine_Record similar to the return value of the
toArray() method. If the array contains relations it will create those that don&apos;t exist,
update the ones that do, and delete the ones missing on the array b

preDqlSelect($event)

Parameter Summary
Empty template method to provide Record classes with the ability to alter DQL select
queries at runtime

postDelete($event)

Parameter Summary
Empty template method to provide concrete Record classes with the possibility to
hook into the deletion procedure.

resetPendingUnlinks()

Parameter Summary
Reset pending un links array

preUpdate($event)

Parameter Summary
Empty template method to provide concrete Record classes with the possibility to
hook into the saving procedure only when the record is going to be updated.

preSerialize($event)

Parameter Summary

----------------- Brought to you by


Doctrine_Record_Abstract 495

Empty template method to provide concrete Record classes with the possibility to
hook into the serializing procedure.

(boolean) isValid()

Parameter Summary
<strong>returns</strong> whether or not this record is valid

Doctrine_Record_Abstract

Method Summary
Returns Name Description
setTableDefinition
hasColumn
setListener
check
setTableName
hasColumns
unique
loadGenerator
mixed option
mixed attribute
getTable
hasMany
setSubclasses
hasOne
setInheritanceMap
getListener
actAs
addListener
bindQueryParts
setUp

----------------- Brought to you by


Doctrine_Record_Abstract 496

mixed index defines or retrieves an index if the second parameter is set


this method defines an index if not this method retrieves index
named $name
setAttribute

Method Details
setTableDefinition()

Parameter Summary

hasColumn($name, $type = null, $length = null, $options = array())

Parameter Summary
hasColumn sets a column definition

setListener((Doctrine_EventListener_Interface|Doctrine_Overloadable)
$listener)

Parameter Summary

check($constraint, $name = null)

Parameter Summary

$constraint either a SQL constraint portion or an array of CHECK constraints

$name optional constraint name

check adds a check constraint


<strong>returns</strong> this object

setTableName($tableName)

Parameter Summary

hasColumns($definitions)

Parameter Summary

unique()

Parameter Summary
Specify an array of fields that are unique and will be validated as such

----------------- Brought to you by


Doctrine_Record_Abstract 497

loadGenerator(( ) $generator)

Parameter Summary

(mixed) option($name, $value = null)

Parameter Summary

$name the name of the option

$value options value

option sets or retrieves an option

(mixed) attribute($attr, $value)

Parameter Summary
attribute sets or retrieves an option

getTable()

Parameter Summary
getTable returns the associated table object
<strong>returns</strong> the associated table object

hasMany($componentName, $options)

Parameter Summary

$componentName the name of the related component

$options relation options

hasMany binds One-to-Many / Many-to-Many aggregate relation


<strong>returns</strong> this object

setSubclasses($map)

Parameter Summary

hasOne($componentName, $options)

Parameter Summary

$componentName the name of the related component

----------------- Brought to you by


Doctrine_Record_Abstract 498

$options relation options

hasOne binds One-to-One aggregate relation


<strong>returns</strong> this object

setInheritanceMap($map)

Parameter Summary

getListener()

Parameter Summary

actAs($tpl, $options = array())

Parameter Summary
actAs loads the given plugin

addListener((Doctrine_EventListener_Interface|Doctrine_Overloadable)
$listener, $name = null)

Parameter Summary

bindQueryParts($queryParts)

Parameter Summary

$queryParts an array of pre-bound query parts

bindQueryParts binds query parts to given component


<strong>returns</strong> this object

setUp()

Parameter Summary

(mixed) index($name, $definition = array())

Parameter Summary

$name the name of the index


$definition the definition array

defines or retrieves an index if the second parameter is set this method defines an index if not
this method retrieves index named $name

----------------- Brought to you by


Doctrine_Record_Filter 499

setAttribute($attr, $value)

Parameter Summary

Doctrine_Record_Filter

Method Summary
Returns Name Description
setTable
getTable
filterGet
filterSet

Method Details
setTable(( ) $table)

Parameter Summary

getTable()

Parameter Summary

filterGet(( ) $record, $name)

Parameter Summary

$name name of the property or related component

filterGet defines an implementation for filtering the get() method of


Doctrine_Record

----------------- Brought to you by


Doctrine_Record_Filter_Compound 500

filterSet(( ) $record, $name, $value)

Parameter Summary

$name name of the property or related component

filterSet defines an implementation for filtering the set() method of Doctrine_Record

Doctrine_Record_Filter_Compound

Method Summary
Returns Name Description
init
__construct
filterGet
filterSet

Method Details
init()

Parameter Summary

__construct($aliases)

Parameter Summary

filterGet(( ) $record, $name)

Parameter Summary

$name name of the property or related component

filterGet defines an implementation for filtering the get() method of


Doctrine_Record

----------------- Brought to you by


Doctrine_Record_Filter_Standard 501

filterSet(( ) $record, $name, $value)

Parameter Summary

$name name of the property or related component

filterSet defines an implementation for filtering the set() method of Doctrine_Record

Doctrine_Record_Filter_Standard

Method Summary
Returns Name Description
filterGet
filterSet

Method Details
filterGet(( ) $record, $name)

Parameter Summary

$name name of the property or related component

filterGet defines an implementation for filtering the get() method of


Doctrine_Record

filterSet(( ) $record, $name, $value)

Parameter Summary

$name name of the property or related component

filterSet defines an implementation for filtering the set() method of Doctrine_Record

----------------- Brought to you by


Doctrine_Record_Iterator 502

Doctrine_Record_Iterator

Method Summary
Returns Name Description
initNullObject
mixed current
__construct

Method Details
initNullObject(( ) $null)

Parameter Summary

(mixed) current()

Parameter Summary

__construct(( ) $record)

Parameter Summary
constructor

----------------- Brought to you by


Doctrine_Record_Listener 503

Doctrine_Record_Listener

Method Summary
Returns Name Description
preSave
preDqlUpdate
mixed getOption
preDelete
postHydrate
postUpdate
postValidate
postSave
preInsert
preValidate
preHydrate
preDqlDelete
postInsert
postUnserialize
setOption
preUnserialize
postSerialize
preDqlSelect
postDelete
preUpdate
preSerialize

Method Details
preSave(( ) $event)

Parameter Summary

----------------- Brought to you by


Doctrine_Record_Listener 504

preDqlUpdate(( ) $event)

Parameter Summary

(mixed) getOption($name)

Parameter Summary

$name the name of the option

getOption returns the value of given option


<strong>returns</strong> the value of given option

preDelete(( ) $event)

Parameter Summary

postHydrate(( ) $event)

Parameter Summary

postUpdate(( ) $event)

Parameter Summary

postValidate(( ) $event)

Parameter Summary

postSave(( ) $event)

Parameter Summary

preInsert(( ) $event)

Parameter Summary

preValidate(( ) $event)

Parameter Summary

preHydrate(( ) $event)

Parameter Summary

----------------- Brought to you by


Doctrine_Record_Listener 505

preDqlDelete(( ) $event)

Parameter Summary

postInsert(( ) $event)

Parameter Summary

postUnserialize(( ) $event)

Parameter Summary

setOption($name, $value = null)

Parameter Summary

$name the name of the option to set

$value the value of the option

setOption sets an option in order to allow flexible listener

preUnserialize(( ) $event)

Parameter Summary

postSerialize(( ) $event)

Parameter Summary

preDqlSelect(( ) $event)

Parameter Summary

postDelete(( ) $event)

Parameter Summary

preUpdate(( ) $event)

Parameter Summary

preSerialize(( ) $event)

Parameter Summary

----------------- Brought to you by


Doctrine_Record_Listener_Chain 506

Doctrine_Record_Listener_Chain

Method Summary
Returns Name Description
preSave
preDqlUpdate
mixed getOption
preDelete
postHydrate
postUpdate
postValidate
add
mixed get
postSave
preInsert
preValidate
preHydrate
preDqlDelete
postInsert
postUnserialize
setOption
set
preUnserialize
postSerialize
preDqlSelect
postDelete
preUpdate
preSerialize

----------------- Brought to you by


Doctrine_Record_Listener_Chain 507

Method Details
preSave(( ) $event)

Parameter Summary

preDqlUpdate(( ) $event)

Parameter Summary

(mixed) getOption($name)

Parameter Summary

$name the name of the option

getOption returns the value of given option


<strong>returns</strong> the value of given option

preDelete(( ) $event)

Parameter Summary

postHydrate(( ) $event)

Parameter Summary

postUpdate(( ) $event)

Parameter Summary

postValidate(( ) $event)

Parameter Summary

add($listener, $name = null)

Parameter Summary
add adds a listener to the chain of listeners

(mixed) get($key)

Parameter Summary
returns a Doctrine_Record_Listener on success and null on failure

----------------- Brought to you by


Doctrine_Record_Listener_Chain 508

postSave(( ) $event)

Parameter Summary

preInsert(( ) $event)

Parameter Summary

preValidate(( ) $event)

Parameter Summary

preHydrate(( ) $event)

Parameter Summary

preDqlDelete(( ) $event)

Parameter Summary

postInsert(( ) $event)

Parameter Summary

postUnserialize(( ) $event)

Parameter Summary

setOption($name, $value = null)

Parameter Summary

$name the name of the option to set

$value the value of the option

setOption sets an option in order to allow flexible listener chaining

set($key, (Doctrine_Record_Listener) $listener)

Parameter Summary

$listener listener to be added

<strong>returns</strong> this object

----------------- Brought to you by


Doctrine_Record_Listener_Interface 509

preUnserialize(( ) $event)

Parameter Summary

postSerialize(( ) $event)

Parameter Summary

preDqlSelect(( ) $event)

Parameter Summary

postDelete(( ) $event)

Parameter Summary

preUpdate(( ) $event)

Parameter Summary

preSerialize(( ) $event)

Parameter Summary

Doctrine_Record_Listener_Interface

Method Summary
Returns Name Description
preSave
preDelete
postHydrate
postUpdate
postSave
preInsert
preHydrate

----------------- Brought to you by


Doctrine_Record_Listener_Interface 510

postInsert
postUnserialize
preUnserialize
postSerialize
postDelete
preUpdate
preSerialize

Method Details
preSave(( ) $event)

Parameter Summary

preDelete(( ) $event)

Parameter Summary

postHydrate(( ) $event)

Parameter Summary

postUpdate(( ) $event)

Parameter Summary

postSave(( ) $event)

Parameter Summary

preInsert(( ) $event)

Parameter Summary

preHydrate(( ) $event)

Parameter Summary

postInsert(( ) $event)

Parameter Summary

----------------- Brought to you by


Doctrine_Relation 511

postUnserialize(( ) $event)

Parameter Summary

preUnserialize(( ) $event)

Parameter Summary

postSerialize(( ) $event)

Parameter Summary

postDelete(( ) $event)

Parameter Summary

preUpdate(( ) $event)

Parameter Summary

preSerialize(( ) $event)

Parameter Summary

Doctrine_Relation

Method Summary
Returns Name Description
string getLocal
boolean isOneToOne
string getRelationDql
offsetUnset
string getAlias
string getForeignColumnName
offsetSet

----------------- Brought to you by


Doctrine_Relation 512

isDeferred
offsetGet
string getForeign
string __toString
boolean isCascadeDelete
boolean hasConstraint
offsetExists
integer getType
fetchRelatedFor fetches a component related to given record
isEqual
getTable
__construct
string getLocalColumnName
getForeignFieldName returns the field name of the foreign column
string getForeignKeyName
getLocalFieldName returns the field name of the local column
isDeferrable
getClass
array toArray

Method Details
(string) getLocal()

Parameter Summary
getLocal returns the name of the local column

(boolean) isOneToOne()

Parameter Summary
isOneToOne returns whether or not this relation is a one-to-one relation

(string) getRelationDql($count)

Parameter Summary

offsetUnset($offset)

Parameter Summary

----------------- Brought to you by


Doctrine_Relation 513

(string) getAlias()

Parameter Summary
getAlias returns the relation alias

(string) getForeignColumnName()

Parameter Summary
getForeignColumnName returns the column name of the foreign column

offsetSet($offset, $value)

Parameter Summary

isDeferred()

Parameter Summary

offsetGet($offset)

Parameter Summary

(string) getForeign()

Parameter Summary
getForeign returns the name of the foreignkey column where the localkey column is
pointing at

(string) __toString()

Parameter Summary

(boolean) isCascadeDelete()

Parameter Summary
Checks whether this relation cascades deletions to the related objects on the
application level.

(boolean) hasConstraint()

Parameter Summary
hasConstraint whether or not this relation has an explicit constraint

----------------- Brought to you by


Doctrine_Relation 514

offsetExists($offset)

Parameter Summary

(integer) getType()

Parameter Summary
getType returns the relation type, either 0 or 1

fetchRelatedFor(( ) $record)

Parameter Summary
fetches a component related to given record

isEqual()

Parameter Summary

getTable()

Parameter Summary
getTable returns the foreign table object

__construct($definition)

Parameter Summary

$definition <p> an associative array with the following structure: name foreign key
constraint name </p> <p>local the local field(s)</p> <p>foreign the foreign
reference field(s)</p> <p>

constructor

(string) getLocalColumnName()

Parameter Summary
getLocalColumnName returns the column name of the local column

getForeignFieldName()

Parameter Summary
getLocalFieldName
returns the field name of the foreign column

----------------- Brought to you by


Doctrine_Relation_Association 515

(string) getForeignKeyName()

Parameter Summary
Get the name of the foreign key for this relationship

getLocalFieldName()

Parameter Summary
returns the field name of the local column

isDeferrable()

Parameter Summary

getClass()

Parameter Summary
getClass returns the name of the related class

(array) toArray()

Parameter Summary

Doctrine_Relation_Association

Method Summary
Returns Name Description
string getRelationDql
getLocalRefFieldName returns the field name of the local reference column
getForeignRefColumnName returns the column name of the foreign reference
column
getAssociationFactory
fetchRelatedFor fetches a component related to given record

----------------- Brought to you by


Doctrine_Relation_Association 516

getAssociationTable
getLocalRefColumnName returns the column name of the local reference
column
getForeignRefFieldName returns the field name of the foreign reference
column

Method Details
(string) getRelationDql($count, $context = 'record')

Parameter Summary

getLocalRefFieldName()

Parameter Summary
returns the field name of the local reference column

getForeignRefColumnName()

Parameter Summary
returns the column name of the foreign reference column

getAssociationFactory()

Parameter Summary

fetchRelatedFor(( ) $record)

Parameter Summary
fetches a component related to given record

getAssociationTable()

Parameter Summary

getLocalRefColumnName()

Parameter Summary
returns the column name of the local reference column

----------------- Brought to you by


Doctrine_Relation_Association_Self 517

getForeignRefFieldName()

Parameter Summary
returns the field name of the foreign reference column

Doctrine_Relation_Association_Self

Method Summary
Returns Name Description
string getRelationDql
fetchRelatedFor

Method Details
(string) getRelationDql($count, $context = 'record')

Parameter Summary

fetchRelatedFor(( ) $record)

Parameter Summary

----------------- Brought to you by


Doctrine_Relation_ForeignKey 518

Doctrine_Relation_ForeignKey

Method Summary
Returns Name Description
fetchRelatedFor fetches a component related to given record

getCondition

Method Details
fetchRelatedFor(( ) $record)

Parameter Summary
fetches a component related to given record

getCondition($alias = null)

Parameter Summary

Doctrine_Relation_LocalKey

Method Summary
Returns Name Description
fetchRelatedFor fetches a component related to given record

----------------- Brought to you by


Doctrine_Relation_Nest 519

getCondition

Method Details
fetchRelatedFor(( ) $record)

Parameter Summary
fetches a component related to given record

getCondition($alias = null)

Parameter Summary

Doctrine_Relation_Nest

Method Summary
Returns Name Description
string fetchRelatedFor

Method Details
(string) fetchRelatedFor(( ) $record, $count)

Parameter Summary
getRelationDql

----------------- Brought to you by


Doctrine_Relation_Parser 520

Doctrine_Relation_Parser

Method Summary
Returns Name Description
array getPendingRelations
getRelation
array getPendingRelation
getImpl returns the table class of the concrete implementation
for given template if the given template is not a
template then this method just returns the table class
for the given record
bind
array completeAssocDefinition
boolean hasRelation
array guessColumns
getTable
__construct
unsetPendingRelations
array completeDefinition
getIdentifiers the identifiers are in format:
[componentName].[identifier]
array getRelations

Method Details
(array) getPendingRelations()

Parameter Summary
<strong>returns</strong> an array containing all the pending relations

----------------- Brought to you by


Doctrine_Relation_Parser 521

getRelation($alias, $recursive = true)

Parameter Summary

$alias relation alias

(array) getPendingRelation($name)

Parameter Summary
<strong>returns</strong> an array defining a pending relation

getImpl($template)

Parameter Summary
returns the table class of the concrete implementation for given template if the given
template is not a template then this method just returns the table class for the given record

bind($name, $options = array(), $field)

Parameter Summary
binds a relation

(array) completeAssocDefinition($def)

Parameter Summary

$def definition array to be completed

Completes the given association definition


<strong>returns</strong> completed definition array

(boolean) hasRelation($name)

Parameter Summary
Check if a relation alias exists

(array) guessColumns($classes, ( ) $foreignTable)

Parameter Summary

$classes an array of class names


$foreignTable foreign table object

<strong>returns</strong> an array of column names

----------------- Brought to you by


Doctrine_Relation_Parser 522

getTable()

Parameter Summary
<strong>returns</strong> the table object this parser belongs to

__construct(( ) $table)

Parameter Summary

$table the table object this parser belongs to

constructor

unsetPendingRelations($name)

Parameter Summary

$name relation to remove

unsetPendingRelations Removes a relation. Warning: this only affects pending


relations

(array) completeDefinition($def)

Parameter Summary

$def definition array to be completed

Completes the given definition


<strong>returns</strong> completed definition array

getIdentifiers(( ) $table)

Parameter Summary

$table table object to retrieve identifiers from

getIdentifiers gives a list of identifiers from given table


the identifiers are in format: [componentName].[identifier]

(array) getRelations()

Parameter Summary
getRelations returns an array containing all relation objects
<strong>returns</strong> an array of Doctrine_Relation objects

----------------- Brought to you by


Doctrine_Search 523

Doctrine_Search

Method Summary
Returns Name Description
setTableDefinition
batchUpdateIndex
analyze
readTableData
integer updateIndex
__construct
mixed search

Method Details
setTableDefinition()

Parameter Summary
buildDefinition

batchUpdateIndex($limit = null, $offset = null)

Parameter Summary

analyze($text, $encoding = 'ISO8859-15')

Parameter Summary
analyze a text in the encoding format

readTableData($limit = null, $offset = null)

Parameter Summary
<strong>returns</strong> The collection of results

----------------- Brought to you by


Doctrine_Search_Analyzer 524

(integer) updateIndex($data, (Doctrine_Record) $record)

Parameter Summary
updateIndex updates the index

__construct($options)

Parameter Summary

(mixed) search($string, (Doctrine_Query) $query = null)

Parameter Summary

$string Keyword string to search for

$query Query object to alter. Adds where condition to limit the results using the search
index

Searchable keyword search


<strong>returns</strong> The Doctrine_Collection or array of ids and relevancy

Doctrine_Search_Analyzer

Method Summary
Returns Name Description
analyze

Method Details
analyze($text, $encoding = 'ISO8859-15')

Parameter Summary

----------------- Brought to you by


Doctrine_Search_Analyzer_Interface 525

Doctrine_Search_Analyzer_Interface

Method Summary
Returns Name Description
analyze

Method Details
analyze($text, $encoding = 'ISO8859-15')

Parameter Summary

Doctrine_Search_Analyzer_Standard

Method Summary
Returns Name Description
analyze

Method Details
analyze($text, $encoding = 'ISO-8859-15')

Parameter Summary

----------------- Brought to you by


Doctrine_Search_Analyzer_Utf8 526

Doctrine_Search_Analyzer_Utf8

Method Summary
Returns Name Description
analyze

Method Details
analyze($text, $encoding = 'ISO8859-15')

Parameter Summary

Doctrine_Search_File

Method Summary
Returns Name Description
indexDirectory
__construct
buildRelation

----------------- Brought to you by


Doctrine_Search_Indexer 527

Method Details
indexDirectory($dir)

Parameter Summary

$dir the name of the directory to index

indexes given directory

__construct($options = array())

Parameter Summary

$options an array of plugin options

constructor

buildRelation()

Parameter Summary

Doctrine_Search_Indexer

Method Summary
Returns Name Description
indexDirectory

Method Details
indexDirectory($dir)

Parameter Summary

----------------- Brought to you by


Doctrine_Search_Indexer_Dir 528

Doctrine_Search_Indexer_Dir

Method Summary
Returns Name Description
add

Method Details
add($dir)

Parameter Summary

Doctrine_Search_Listener

Method Summary
Returns Name Description
postUpdate
__construct
postInsert
preUpdate

----------------- Brought to you by


Doctrine_Search_Parser 529

Method Details
postUpdate(( ) $event)

Parameter Summary

__construct(( ) $search)

Parameter Summary

postInsert(( ) $event)

Parameter Summary

preUpdate(( ) $event)

Parameter Summary

Doctrine_Search_Parser

Method Summary
Returns Name Description
parse

Method Details
parse($file)

Parameter Summary

----------------- Brought to you by


Doctrine_Search_Query 530

Doctrine_Search_Query

Method Summary
Returns Name Description
getParams
query
parseClause
isExpression
__construct
getSql
parseTerm
getWords
parseWord

Method Details
getParams()

Parameter Summary

query($text, $includeRelevance = true)

Parameter Summary

parseClause($originalClause, $recursive = false)

Parameter Summary

isExpression($term)

Parameter Summary

----------------- Brought to you by


Doctrine_Search_Record 531

__construct($table, (Doctrine_Table) $_table)

Parameter Summary

$_table the index table

getSql()

Parameter Summary

parseTerm($term)

Parameter Summary

getWords()

Parameter Summary

parseWord($word)

Parameter Summary

Doctrine_Search_Record

Method Summary
Returns Name Description
setTableDefinition
setUp

Method Details
setTableDefinition()

Parameter Summary

----------------- Brought to you by


Doctrine_Sequence 532

setUp()

Parameter Summary

Doctrine_Sequence

Method Summary
Returns Name Description
lastInsertId
integer currId
integer nextId

Method Details
lastInsertId($table = null, $field = null)

Parameter Summary

$table name of the table into which a new row was inserted

$field name of the field into which a new row was inserted

Returns the autoincrement ID if supported or $id or fetches the current ID in a


sequence called: $table.(empty($field) ? '' : '_'.$field)

(integer) currId($seqName)

Parameter Summary

$seqName name of the sequence

Returns the current id of a sequence


<strong>returns</strong> current id in the given sequence

----------------- Brought to you by


Doctrine_Sequence_Db2 533

(integer) nextId($seqName, $ondemand = true)

Parameter Summary

$seqName name of the sequence


$ondemand when true missing sequences are automatic created

Returns the next free id of a sequence


<strong>returns</strong> next id in the given sequence

Doctrine_Sequence_Db2

Method Summary
Returns Name Description
integer lastInsertId As a convention, on RDBMS brands that support sequences (e.g.
Oracle, PostgreSQL, DB2), this method forms the name of a
sequence from the arguments and returns the last id generated
by that sequence. On RDBMS brands that support IDENTITY/
AUTOINCREMENT
integer lastSequenceId This is supported only on RDBMS brands that support sequences
(e.g. Oracle, PostgreSQL, DB2). Other RDBMS brands return
null.
integer nextSequenceId This is supported only on RDBMS brands that support sequences
(e.g. Oracle, PostgreSQL, DB2). Other RDBMS brands return
null.

Method Details
(integer) lastInsertId($tableName = null, $primaryKey = null)

Parameter Summary

$tableName OPTIONAL

$primaryKey OPTIONAL

----------------- Brought to you by


Doctrine_Sequence_Firebird 534

Gets the last ID generated automatically by an IDENTITY/AUTOINCREMENT column.


As a convention, on RDBMS brands that support sequences (e.g. Oracle, PostgreSQL, DB2),
this method forms the name of a sequence from the arguments and returns the last id
generated by that sequence. On RDBMS brands that support IDENTITY/AUTOINCREMENT
<strong>throws</strong> Doctrine_Adapter_Db2_Exception

(integer) lastSequenceId($sequenceName)

Parameter Summary
Return the most recent value from the specified sequence in the database.
This is supported only on RDBMS brands that support sequences (e.g. Oracle, PostgreSQL,
DB2). Other RDBMS brands return null.
<strong>throws</strong> Doctrine_Adapter_Db2_Exception

(integer) nextSequenceId($sequenceName)

Parameter Summary
Generate a new value from the specified sequence in the database, and return it.
This is supported only on RDBMS brands that support sequences (e.g. Oracle, PostgreSQL,
DB2). Other RDBMS brands return null.
<strong>throws</strong> Doctrine_Adapter_Db2_Exception

Doctrine_Sequence_Firebird

Method Summary
Returns Name Description
lastInsertId
integer currId
integer nextID

----------------- Brought to you by


Doctrine_Sequence_Mssql 535

Method Details
lastInsertId($table = null, $field = null)

Parameter Summary

$table name of the table into which a new row was inserted

$field name of the field into which a new row was inserted

Returns the autoincrement ID if supported or $id or fetches the current ID in a


sequence called: $table.(empty($field) ? '' : '_'.$field)

(integer) currId($seqName)

Parameter Summary

$seqName name of the sequence

Returns the current id of a sequence


<strong>returns</strong> current id in the given sequence

(integer) nextID($seqName, $onDemand = true)

Parameter Summary

$seqName name of the sequence


$onDemand when true missing sequences are automatic created

Returns the next free id of a sequence


<strong>returns</strong> next id in the given sequence

Doctrine_Sequence_Mssql

Method Summary
Returns Name Description
bool checkSequence

----------------- Brought to you by


Doctrine_Sequence_Mssql 536

lastInsertId
integer currId
integer nextId

Method Details
(bool) checkSequence($seqName)

Parameter Summary

$seqName The sequence name to verify.

Checks if there's a sequence that exists.


<strong>returns</strong> The value if the table exists or not

lastInsertId($table = null, $field = null)

Parameter Summary

$table name of the table into which a new row was inserted

$field name of the field into which a new row was inserted

Returns the autoincrement ID if supported or $id or fetches the current ID in a


sequence called: $table.(empty($field) ? '' : '_'.$field)

(integer) currId($seqName)

Parameter Summary

$seqName name of the sequence

Returns the current id of a sequence


<strong>returns</strong> current id in the given sequence

(integer) nextId($seqName, $onDemand = true)

Parameter Summary

$seqName name of the sequence


$onDemand when true missing sequences are automatic created

Returns the next free id of a sequence


<strong>returns</strong> next id in the given sequence

----------------- Brought to you by


Doctrine_Sequence_Mysql 537

Doctrine_Sequence_Mysql

Method Summary
Returns Name Description
integer|boolean lastInsertId
integer currId
integer nextId

Method Details
(integer|boolean) lastInsertId($table = null, $field = null)

Parameter Summary

$table name of the table into which a new row was inserted

$field name of the field into which a new row was inserted

Returns the autoincrement ID if supported or $id or fetches the current ID in a


sequence called: $table.(empty($field) ? '' : '_'.$field)

(integer) currId($seqName)

Parameter Summary

$seqName name of the sequence

Returns the current id of a sequence


<strong>returns</strong> current id in the given sequence

(integer) nextId($seqName, $onDemand = true)

Parameter Summary

$seqName name of the sequence

----------------- Brought to you by


Doctrine_Sequence_Oracle 538

$onDemand when true missing sequences are automatic created

Returns the next free id of a sequence


<strong>returns</strong> next id in the given sequence

Doctrine_Sequence_Oracle

Method Summary
Returns Name Description
lastInsertID
integer currID
integer nextID

Method Details
lastInsertID($table = null, $field = null)

Parameter Summary

$table name of the table into which a new row was inserted

$field name of the field into which a new row was inserted

Returns the autoincrement ID if supported or $id or fetches the current ID in a


sequence called: $table.(empty($field) ? '' : '_'.$field)

(integer) currID($seqName)

Parameter Summary

$seqName name of the sequence

Returns the current id of a sequence


<strong>returns</strong> current id in the given sequence

----------------- Brought to you by


Doctrine_Sequence_Pgsql 539

(integer) nextID($seqName, $onDemand = true)

Parameter Summary

$seqName name of the sequence


$onDemand onDemand when true missing sequences are automatic created

Returns the next free id of a sequence


<strong>returns</strong> next id in the given sequence

Doctrine_Sequence_Pgsql

Method Summary
Returns Name Description
integer lastInsertId Returns the autoincrement ID if supported or $id or fetches the
current ID in a sequence called: $table.(empty($field) ? '' : '_'.$field)
integer currId
integer nextId

Method Details
(integer) lastInsertId($table = null, $field = null)

Parameter Summary

$table name of the table into which a new row was inserted

$field name of the field into which a new row was inserted

Returns the autoincrement ID if supported or $id or fetches the current ID in a sequence


called: $table.(empty($field) ? &apos;&apos; : &apos;_&apos;.$field)
<strong>returns</strong> the autoincremented id

----------------- Brought to you by


Doctrine_Sequence_Sqlite 540

(integer) currId($seqName)

Parameter Summary

$seqName name of the sequence

Returns the current id of a sequence


<strong>returns</strong> current id in the given sequence

(integer) nextId($seqName, $onDemand = true)

Parameter Summary

$seqName name of the sequence


$onDemand onDemand when true missing sequences are automatic created

Returns the next free id of a sequence


<strong>returns</strong> next id in the given sequence

Doctrine_Sequence_Sqlite

Method Summary
Returns Name Description
integer|boolean lastInsertId
integer currId
integer nextId

Method Details
(integer|boolean) lastInsertId($table = null, $field = null)

Parameter Summary

$table name of the table into which a new row was inserted

$field name of the field into which a new row was inserted

----------------- Brought to you by


Doctrine_Parser_Spyc 541

Returns the autoincrement ID if supported or $id or fetches the current ID in a


sequence called: $table.(empty($field) ? '' : '_'.$field)

(integer) currId($seqName)

Parameter Summary

$seqName name of the sequence

Returns the current id of a sequence


<strong>returns</strong> current id in the given sequence

(integer) nextId($seqName, $onDemand = true)

Parameter Summary

$seqName name of the sequence


$onDemand when true missing sequences are automatic created

Returns the next free id of a sequence


<strong>returns</strong> next id in the given sequence

Doctrine_Parser_Spyc

Method Summary
Returns Name Description
string dump The dump method, when supplied with an array, will do its best to
convert the array into friendly YAML. Pretty simple. Feel free to save
the returned string as tasteful.yaml and pass it around. Oh, and you
can decide how big the indent is and what the
array load The load method, when supplied with a YAML stream (string or file
path), will do its best to convert the YAML into a PHP array. Pretty
simple. Usage:
<
pre> load('lucky.yaml');

----------------- Brought to you by


Doctrine_Parser_Spyc 542

array YAMLLoad The load method, when supplied with a YAML stream (string or file),
will do its best to convert YAML in a file into a PHP array. Pretty
simple. Usage:
<
pre>
_linkRef
string YAMLDump The dump method, when supplied with an array, will do its best to
convert the array into friendly YAML. Pretty simple. Feel free to save
the returned string as nothing.yaml and pass it around. Oh, and you
can decide how big the indent is and what the

Method Details
(string) dump($array, $indent = false, $wordwrap = false)

Parameter Summary

$array PHP array


$indent Pass in false to use the default, which is 2
$wordwrap Pass in 0 for no wordwrap, false for default (40)

Dump PHP array to YAML


The dump method, when supplied with an array, will do its best to convert the array into
friendly YAML. Pretty simple. Feel free to save the returned string as tasteful.yaml and pass it
around. Oh, and you can decide how big the indent is and what the

(array) load($input)

Parameter Summary

$input Path of YAML file or string containing YAML

Load YAML into a PHP array from an instantiated object


The load method, when supplied with a YAML stream (string or file path), will do its best to
convert the YAML into a PHP array. Pretty simple. Usage: <pre><code> <![CDATA[ $parser
= new Doctrine_Spyc; $array = $parser->load('lucky.yaml');

(array) YAMLLoad($input)

Parameter Summary

$input Path of YAML file or string containing YAML

Load YAML into a PHP array statically

----------------- Brought to you by


Doctrine_Parser_Spyc_YamlNode 543

The load method, when supplied with a YAML stream (string or file), will do its best to
convert YAML in a file into a PHP array. Pretty simple. Usage: <pre><code> <![CDATA[
$array = Doctrine_Spyc::YAMLLoad('lucky.yaml'); print_r($array);]]>

_linkRef([[[amp]]]$n, $key, $k = NULL, $v = NULL)

Parameter Summary

(string) YAMLDump($array, $indent = false, $wordwrap = false)

Parameter Summary

$array PHP array


$indent Pass in false to use the default, which is 2
$wordwrap Pass in 0 for no wordwrap, false for default (40)

Dump YAML from PHP array statically


The dump method, when supplied with an array, will do its best to convert the array into
friendly YAML. Pretty simple. Feel free to save the returned string as nothing.yaml and pass
it around. Oh, and you can decide how big the indent is and what the

Doctrine_Parser_Spyc_YamlNode

Method Summary
Returns Name Description
__construct

Method Details
__construct($nodeId)

Parameter Summary
The constructor assigns the node a unique ID.

----------------- Brought to you by


Doctrine_Table 544

Doctrine_Table

Method Summary
Returns Name Description
mixed getOption
addNamedQuery
array getTemplates
boolean hasColumn
mixed find
array getColumnNames
setColumns
__isset
getRepository
array getColumns
boolean removeColumn
clear
getGenerator
createQuery
boolean isIdentifierComposite
setConnection
getRelation
mixed getDefinitionOf
__call Adds support for magic finders.
findByColumnName, findByRelationAlias
findById, findByContactId, etc.
array getOptions
getProxy
addCheckConstraint adds a check constraint to this table
validateUniques
setTableName
getRelationParser
createNamedQuery

----------------- Brought to you by


Doctrine_Table 545

array|boolean getIndex
bind
string __toString
construct
setOptions
boolean removeRecord
boolean isInheritedColumn
array getUniques
unique
hasGenerator
getTableName
setData
array getIdentifierColumnNames
getRecord
getComponentName
__get
array getFilters
addTemplate
findBySql
mixed executeOne if no query for given queryKey is being found a
Doctrine_Query_Registry exception is being
thrown
boolean hasRelation
validateField
boolean isIdentifierAutoincrement
getColumnDefinition
string _resolveFindByFieldName regardless of whether the user passes a column
name, field name, or a
Doctrine_Inflector::classified() version of their
column name. It will be inflected with
Doctrine_Inflector::tableize() to get the column
or field name
boolean hasTemplate
initIdentifier
object Empty getRecordInstance
boolean isIdentifier
object unshiftFilter
__construct
findBy
setColumn
mixed getTypeOf

----------------- Brought to you by


Doctrine_Table 546

string getClassnameToReturn Check the subclasses option and the


inheritanceMap for each subclass to see if all the
maps in a subclass is met. If this is the case
return that subclass name. If no subclasses
match or if there are no subclasses defined
return the name of the class f
integer count
mixed execute if no query for given queryKey is being found a
Doctrine_Query_Registry exception is being
thrown
addGenerator
findOneBy
findAll
mixed enumValue
array getFieldNames
mixed enumIndex
array getEnumValues
mixed getDefaultValueOf
setOption
mixed isTree determine if table acts as tree
setMethodOwner
mixed prepareValue •
It unserializes array and object typed columns

Listing </li>
0-22
<li>
<p>Uncompresses gzip typed columns</p>
</li>
<li>
<p>Gets the appropriate enum values
for enum typed columns</p>
</li>
<li>

getQueryObject
string getFieldName returns a column alias for a column name if no
alias can be found the column name is returned.
mixed getTree getter for associated tree
array getRelations
array getExportableFormat
mixed getIdentifier
integer getIdentifierType
getConnection
addForeignKey adds a foreignKey to this table

----------------- Brought to you by


Doctrine_Table 547

boolean export
string getColumnOwner The owner of a column is the name of the
component in a hierarchy that defines the
column.
array getData
array getGenerators
bindQueryPart
string getBoundQueryPart
getTemplate
integer getColumnCount
bindQueryParts
addIndex adds an index to this table
findByDql
array getFieldValidators
initDefinition
string applyInheritance
getMethodOwner
boolean hasDefaultValues
create
string getColumnName returns a column name for column alias if the
actual name for the alias cannot be found this
method returns the given alias
mixed getTypeOfColumn
boolean hasField
boolean addRecord
getFieldLength

Method Details
(mixed) getOption($name)

Parameter Summary

$name the name of the option

getOption returns the value of given option


<strong>returns</strong> the value of given option

----------------- Brought to you by


Doctrine_Table 548

addNamedQuery(($queryKey) $queryKey, ($query) $query)

Parameter Summary

$queryKey Query key name

$query DQL string or Doctrine_Query object

adds a named query in the query registry

(array) getTemplates()

Parameter Summary
getTemplates returns all templates attached to this table
<strong>returns</strong> an array containing all templates

(boolean) hasColumn($columnName)

Parameter Summary

(mixed) find($name, $params, $hydrationMode)

Parameter Summary

$name Database Row ID or Query Name defined previously as a NamedQuery


$params This argument is the hydration mode (Doctrine::HYDRATE_ARRAY or
Doctrine::HYDRATE_RECORD) if first param is a Database Row ID.
Otherwise this argument expect an array of query params.
$hydrationMode Optional Doctrine::HYDRATE_ARRAY or Doctrine::HYDRATE_RECORD if
first argument is a NamedQuery

finds a record by its identifier


<strong>returns</strong> Doctrine_Collection, array, Doctrine_Record or false if no result

(array) getColumnNames($fieldNames = null)

Parameter Summary
returns an array containing all the column names.

setColumns($definitions)

Parameter Summary

----------------- Brought to you by


Doctrine_Table 549

__isset($option)

Parameter Summary

getRepository()

Parameter Summary

(array) getColumns()

Parameter Summary
returns all columns and their definitions

(boolean) removeColumn($fieldName)

Parameter Summary
Removes the passed field name from the table schema information

clear()

Parameter Summary
clear clears the first level cache (identityMap)

getGenerator($generator)

Parameter Summary
Get generator instance for a passed name

createQuery($alias = '')

Parameter Summary

$alias Optional alias name for component aliasing.

createQuery creates a new Doctrine_Query object and adds the component name of
this table as the query 'from' part

(boolean) isIdentifierComposite()

Parameter Summary
Checks whether a field identifier is a composite key.
<strong>returns</strong> TRUE if the identifier is a composite key, FALSE otherwise

----------------- Brought to you by


Doctrine_Table 550

setConnection(( ) $conn)

Parameter Summary
sets the connection for this class
<strong>returns</strong> this object

getRelation($alias, $recursive = true)

Parameter Summary

$alias relation alias

(mixed) getDefinitionOf($fieldName)

Parameter Summary
<strong>returns</strong> array on success, false on failure

__call($method, $arguments)

Parameter Summary
Adds support for magic finders. findByColumnName, findByRelationAlias findById,
findByContactId, etc.

(array) getOptions()

Parameter Summary
getOptions returns all options of this table and the associated values
<strong>returns</strong> all options and their values

getProxy(($id) $id = null)

Parameter Summary

$id database row id

<strong>throws</strong> Doctrine_Find_Exception

addCheckConstraint($definition, $name)

Parameter Summary
adds a check constraint to this table

----------------- Brought to you by


Doctrine_Table 551

validateUniques(( ) $record)

Parameter Summary
Validate all the unique sets of fields for the given Doctrine_Record instance

setTableName($tableName)

Parameter Summary

getRelationParser()

Parameter Summary
getRelationParser return the relation parser associated with this table
<strong>returns</strong> relation parser object

createNamedQuery(($queryKey) $queryKey)

Parameter Summary

$queryKey Query key name

creates a named query in the query registry

(array|boolean) getIndex($index)

Parameter Summary
<strong>returns</strong> array on success, FALSE on failure

bind($args, $type)

Parameter Summary
DESCRIBE WHAT THIS METHOD DOES, PLEASE!

(string) __toString()

Parameter Summary
returns a string representation of this object

construct()

Parameter Summary
construct Empty template method to provide concrete Table classes with the
possibility to hook into the constructor procedure

----------------- Brought to you by


Doctrine_Table 552

setOptions($options)

Parameter Summary

(boolean) removeRecord(( ) $record)

Parameter Summary

$record record to be removed

removeRecord removes a record from the identity map, returning true if the record
was found and removed and false if the record wasn't found.

(boolean) isInheritedColumn(($columnName) $columnName)

Parameter Summary

$columnName The column name

Checks whether a column is inherited from a component further up in the hierarchy.


<strong>returns</strong> TRUE if column is inherited, FALSE otherwise.

(array) getUniques()

Parameter Summary
Get array of sets of unique fields

unique($fields)

Parameter Summary
Add set of fields to be unique. Will automatically create unique index and validate
the values on save

hasGenerator($generator)

Parameter Summary
Check if a generator name exists

getTableName()

Parameter Summary

----------------- Brought to you by


Doctrine_Table 553

setData($data)

Parameter Summary

$data internal data

setData doctrine uses this function internally users are strongly discouraged to use
this function

(array) getIdentifierColumnNames()

Parameter Summary
returns an array with all the identifier column names.

getRecord()

Parameter Summary
getRecord first checks if record exists in identityMap, if not returns a new record

getComponentName()

Parameter Summary

__get($option)

Parameter Summary
__get an alias for getOption

(array) getFilters()

Parameter Summary

addTemplate($template, ( ) $impl)

Parameter Summary
Add template to the table

findBySql($dql, $params = array(), $hydrationMode = null)

Parameter Summary

$dql DQL after WHERE clause


$params query parameters

----------------- Brought to you by


Doctrine_Table 554

$hydrationMode Doctrine::HYDRATE_ARRAY or Doctrine::HYDRATE_RECORD

findBySql finds records with given SQL where clause returns a collection of records

(mixed) executeOne($queryKey, $params = array(), $hydrationMode =


Doctrine::HYDRATE_RECORD)

Parameter Summary

$queryKey the query key

$params prepared statement params (if any)

executeOne fetches data using the provided queryKey and the associated query in
the query registry
if no query for given queryKey is being found a Doctrine_Query_Registry exception is being
thrown
<strong>returns</strong> the fetched data

(boolean) hasRelation($alias)

Parameter Summary

$alias the relation to check if exists

<strong>returns</strong> true if the relation exists otherwise false

validateField($fieldName, $value, ( ) $record = null, $name)

Parameter Summary

(boolean) isIdentifierAutoincrement()

Parameter Summary
Checks whether a field identifier is of type autoincrement
<strong>returns</strong> TRUE if the identifier is autoincrement FALSE otherwise

getColumnDefinition($columnName)

Parameter Summary

(string) _resolveFindByFieldName($name)

Parameter Summary
Resolve the passed find by field name to the appropriate field name

----------------- Brought to you by


Doctrine_Table 555

regardless of whether the user passes a column name, field name, or a


Doctrine_Inflector::classified() version of their column name. It will be inflected with
Doctrine_Inflector::tableize() to get the column or field name

(boolean) hasTemplate($template)

Parameter Summary
Check if the table has a template name

initIdentifier()

Parameter Summary
Initializes the table identifier(s)/primary key(s)

(object Empty) getRecordInstance()

Parameter Summary
Gets the record instance for this table. The Doctrine_Table instance always holds at
least one instance of a model so that it can be reused for several things, but
primarily it is first used to instantiate all the internal in memory meta da
<strong>returns</strong> instance of the record

(boolean) isIdentifier($fieldName)

Parameter Summary

$fieldName The field name

Checks whether a field is part of the table identifier/primary key field(s).


<strong>returns</strong> TRUE if the field is part of the table identifier/primary key
field(s), FALSE otherwise.

(object) unshiftFilter(( ) $filter)

Parameter Summary

__construct($name, ( ) $conn, $initDefinition = false)

Parameter Summary

$name the name of the component

$conn the connection associated with this table

the constructor

----------------- Brought to you by


Doctrine_Table 556

<strong>throws</strong> Doctrine_Connection_Exception if there are no opened


connections

findBy($fieldName, $value, $hydrationMode = null, $column)

Parameter Summary

setColumn($name, $type = null, $length = null, $options = array(),


$prepend = false)

Parameter Summary

$prepend Whether to prepend or append the new column to the column list. By default the
column gets appended.

<strong>throws</strong> Doctrine_Table_Exception if trying use wrongly typed parameter

(mixed) getTypeOf($fieldName)

Parameter Summary
<strong>returns</strong> string on success, false on failure

(string) getClassnameToReturn()

Parameter Summary
Get the classname to return. Most often this is just the options&[apos;name']
Check the subclasses option and the inheritanceMap for each subclass to see if all the maps
in a subclass is met. If this is the case return that subclass name. If no subclasses match or if
there are no subclasses defined return the name of the class f
<strong>returns</strong> The name of the class to create

(integer) count()

Parameter Summary

(mixed) execute($queryKey, $params = array(), $hydrationMode =


Doctrine::HYDRATE_RECORD)

Parameter Summary

$queryKey the query key

$params prepared statement params (if any)

execute fetches data using the provided queryKey and the associated query in the
query registry

----------------- Brought to you by


Doctrine_Table 557

if no query for given queryKey is being found a Doctrine_Query_Registry exception is being


thrown
<strong>returns</strong> the fetched data

addGenerator(( ) $generator, $name = null)

Parameter Summary
Add a generate to the table instance

findOneBy($fieldName, $value, $hydrationMode = null, $column)

Parameter Summary

findAll($hydrationMode = null)

Parameter Summary

$hydrationMode Doctrine::HYDRATE_ARRAY or Doctrine::HYDRATE_RECORD

findAll returns a collection of records

(mixed) enumValue($fieldName, $index, $field)

Parameter Summary

(array) getFieldNames()

Parameter Summary
returns an array containing all the field names.

(mixed) enumIndex($fieldName, $value, $field)

Parameter Summary

(array) getEnumValues($fieldName)

Parameter Summary

(mixed) getDefaultValueOf($fieldName)

Parameter Summary
getDefaultValueOf returns the default value(if any) for given column

----------------- Brought to you by


Doctrine_Table 558

setOption($name, $value)

Parameter Summary

$name the name of the option to set

$value the value of the option

setOption sets an option and returns this object in order to allow flexible method
chaining
<strong>returns</strong> this object

(mixed) isTree()

Parameter Summary
determine if table acts as tree
<strong>returns</strong> if tree return true, otherwise returns false

setMethodOwner($method, $class)

Parameter Summary

(mixed) prepareValue($fieldName, $value, $typeHint = null, $field)

Parameter Summary

$value field value


$typeHint Type hint used to pass in the type of the value to prepare if it is already known.
This enables the method to skip the type determination. Used i.e. during
hydration.
$field the name of the field

prepareValue this method performs special data preparation depending on the type
of the given column
<orderedlist> <li> <p>It unserializes array and object typed columns</p> </li> <li>
<p>Uncompresses gzip typed columns</p> </li> <li> <p>Gets the appropriate enum
values for enum typed columns</p> </li> <li>
<strong>returns</strong> prepared value
<strong>throws</strong> Doctrine_Table_Exception if uncompression of gzip typed column
fails *

getQueryObject()

Parameter Summary
<strong>returns</strong> a Doctrine_Query object

----------------- Brought to you by


Doctrine_Table 559

(string) getFieldName($columnName)

Parameter Summary

$columnName column name

getColumnAlias
returns a column alias for a column name if no alias can be found the column name is
returned.
<strong>returns</strong> column alias

(mixed) getTree()

Parameter Summary
getter for associated tree
<strong>returns</strong> if tree return instance of Doctrine_Tree, otherwise returns false

(array) getRelations()

Parameter Summary
getRelations returns an array containing all relation objects
<strong>returns</strong> an array of Doctrine_Relation objects

(array) getExportableFormat($parseForeignKeys = true)

Parameter Summary
getExportableFormat returns exportable presentation of this object

(mixed) getIdentifier()

Parameter Summary

(integer) getIdentifierType()

Parameter Summary

getConnection()

Parameter Summary
returns the connection associated with this table (if any)
<strong>returns</strong> the connection object

----------------- Brought to you by


Doctrine_Table 560

addForeignKey($definition)

Parameter Summary
adds a foreignKey to this table

(boolean) export()

Parameter Summary
export exports this table to database based on column and option definitions
<strong>returns</strong> whether or not the export operation was successful false if table
already existed in the database
<strong>throws</strong> Doctrine_Connection_Exception if some error other than
Doctrine::ERR_ALREADY_EXISTS occurred during the create table operation

(string) getColumnOwner($columnName)

Parameter Summary

$columnName The column name

Gets the owner of a column.


The owner of a column is the name of the component in a hierarchy that defines the column.
<strong>returns</strong> The name of the owning/defining component

(array) getData()

Parameter Summary
returns internal data, used by Doctrine_Record instances when retrieving data from
database

(array) getGenerators()

Parameter Summary
Get all the generators for the table

bindQueryPart($queryPart, $value)

Parameter Summary
bindQueryPart binds given value to given query part
<strong>returns</strong> this object

----------------- Brought to you by


Doctrine_Table 561

(string) getBoundQueryPart($queryPart)

Parameter Summary

getTemplate($template)

Parameter Summary

(integer) getColumnCount()

Parameter Summary
<strong>returns</strong> the number of columns in this table

bindQueryParts($queryParts)

Parameter Summary

$queryParts an array of pre-bound query parts

bindQueryParts binds query parts to given component


<strong>returns</strong> this object

addIndex($index, $definition)

Parameter Summary
adds an index to this table

findByDql($dql, $params = array(), $hydrationMode = null)

Parameter Summary

$dql DQL after WHERE clause


$params query parameters
$hydrationMode Doctrine::HYDRATE_ARRAY or Doctrine::HYDRATE_RECORD

findByDql finds records with given DQL where clause returns a collection of records

(array) getFieldValidators($fieldName)

Parameter Summary

$fieldName The field name.

Gets the names of all validators that are applied on a field.

----------------- Brought to you by


Doctrine_Table 562

<strong>returns</strong> The names of all validators that are applied on the specified field.

initDefinition($name)

Parameter Summary
Initializes the in-memory table definition.

(string) applyInheritance(($where) $where)

Parameter Summary

$where query where part to be modified

<strong>returns</strong> query where part with column aggregation inheritance added

getMethodOwner($method)

Parameter Summary

(boolean) hasDefaultValues()

Parameter Summary
hasDefaultValues returns true if this table has default values, otherwise false

create($array = array())

Parameter Summary

$array an array where keys are field names and values representing field values

creates a new record


<strong>returns</strong> the created record object

(string) getColumnName($fieldName, $alias)

Parameter Summary

$alias column alias

returns a column name for column alias if the actual name for the alias cannot be found this
method returns the given alias
<strong>returns</strong> column name

----------------- Brought to you by


Doctrine_Table_Exception 563

(mixed) getTypeOfColumn($columnName)

Parameter Summary
<strong>returns</strong> The column type or FALSE if the type cant be determined.

(boolean) hasField($fieldName)

Parameter Summary

(boolean) addRecord(( ) $record)

Parameter Summary

$record record to be added

addRecord adds a record to identity map

getFieldLength($fieldName)

Parameter Summary
Gets the (maximum) length of a field.

Doctrine_Table_Exception

Method Summary
Returns Name Description
__construct

Method Details
__construct($message)

Parameter Summary

----------------- Brought to you by


Doctrine_Table_Repository 564

Doctrine_Table_Repository

Method Summary
Returns Name Description
integer evictAll
boolean add
contains
get
boolean evict
getTable
__construct
integer count Doctrine_Registry implements interface Countable
ArrayIterator getIterator
loadAll

Method Details
(integer) evictAll()

Parameter Summary
<strong>returns</strong> number of records evicted

(boolean) add(( ) $record)

Parameter Summary

$record record to be added into registry

----------------- Brought to you by


Doctrine_Table_Repository 565

contains($oid)

Parameter Summary

$oid object identifier

get($oid)

Parameter Summary
<strong>throws</strong> Doctrine_Table_Repository_Exception

(boolean) evict($oid)

Parameter Summary

$oid object identifier

<strong>returns</strong> whether ot not the operation was successful

getTable()

Parameter Summary

__construct(( ) $table)

Parameter Summary
constructor

(integer) count()

Parameter Summary
Doctrine_Registry implements interface Countable
<strong>returns</strong> the number of records this registry has

(ArrayIterator) getIterator()

Parameter Summary

loadAll()

Parameter Summary

----------------- Brought to you by


Doctrine_Task 566

Doctrine_Task

Method Summary
Returns Name Description
notify
array getArguments
array getRequiredArgumentsDescriptions
ask
bool validate Validates that all required fields are present
string getTaskName
__construct Since this is an abstract classes that extend
this must follow a patter of
Doctrine_Task_{TASK_NAME} This is what
determines the task name for executing it.
array getOptionalArgumentsDescriptions
array getOptionalArguments
execute Override with each task class
mixed getArgument
setArguments
string getDescription
addArgument
array getRequiredArguments

Method Details
notify($notification = null)

Parameter Summary

(array) getArguments()

Parameter Summary

----------------- Brought to you by


Doctrine_Task 567

(array) getRequiredArgumentsDescriptions()

Parameter Summary

ask()

Parameter Summary

(bool) validate()

Parameter Summary
Validates that all required fields are present
<strong>returns</strong> true

(string) getTaskName()

Parameter Summary

__construct($dispatcher = null)

Parameter Summary
Since this is an abstract classes that extend this must follow a patter of
Doctrine_Task_{TASK_NAME} This is what determines the task name for executing it.

(array) getOptionalArgumentsDescriptions()

Parameter Summary

(array) getOptionalArguments()

Parameter Summary

execute()

Parameter Summary
Override with each task class

(mixed) getArgument($name, $default = null)

Parameter Summary

setArguments($args)

Parameter Summary

----------------- Brought to you by


Doctrine_Task_BuildAll 568

(string) getDescription()

Parameter Summary

addArgument($name, $value)

Parameter Summary

(array) getRequiredArguments()

Parameter Summary

Doctrine_Task_BuildAll

Method Summary
Returns Name Description
__construct
execute

Method Details
__construct($dispatcher = null)

Parameter Summary

execute()

Parameter Summary

----------------- Brought to you by


Doctrine_Task_BuildAllLoad 569

Doctrine_Task_BuildAllLoad

Method Summary
Returns Name Description
__construct
execute

Method Details
__construct($dispatcher = null)

Parameter Summary

execute()

Parameter Summary

Doctrine_Task_BuildAllReload

Method Summary
Returns Name Description
__construct
execute

----------------- Brought to you by


Doctrine_Task_Compile 570

Method Details
__construct($dispatcher = null)

Parameter Summary

execute()

Parameter Summary

Doctrine_Task_Compile

Method Summary
Returns Name Description
execute

Method Details
execute()

Parameter Summary

----------------- Brought to you by


Doctrine_Task_CreateDb 571

Doctrine_Task_CreateDb

Method Summary
Returns Name Description
execute

Method Details
execute()

Parameter Summary

Doctrine_Task_CreateTables

Method Summary
Returns Name Description
execute

Method Details
execute()

Parameter Summary

----------------- Brought to you by


Doctrine_Task_Dql 572

Doctrine_Task_Dql

Method Summary
Returns Name Description
execute
_printResults

Method Details
execute()

Parameter Summary

_printResults($array)

Parameter Summary

Doctrine_Task_DropDb

Method Summary
Returns Name Description
execute

----------------- Brought to you by


Doctrine_Task_DumpData 573

Method Details
execute()

Parameter Summary

Doctrine_Task_DumpData

Method Summary
Returns Name Description
execute

Method Details
execute()

Parameter Summary

Doctrine_Task_GenerateMigration

Method Summary
Returns Name Description
execute

----------------- Brought to you by


Doctrine_Task_GenerateMigrationsDb 574

Method Details
execute()

Parameter Summary

Doctrine_Task_GenerateMigrationsDb

Method Summary
Returns Name Description
execute

Method Details
execute()

Parameter Summary

Doctrine_Task_GenerateMigrationsModels

Method Summary
Returns Name Description
execute

----------------- Brought to you by


Doctrine_Task_GenerateModelsDb 575

Method Details
execute()

Parameter Summary

Doctrine_Task_GenerateModelsDb

Method Summary
Returns Name Description
execute

Method Details
execute()

Parameter Summary

Doctrine_Task_GenerateModelsYaml

Method Summary
Returns Name Description
execute

----------------- Brought to you by


Doctrine_Task_GenerateSql 576

Method Details
execute()

Parameter Summary

Doctrine_Task_GenerateSql

Method Summary
Returns Name Description
execute

Method Details
execute()

Parameter Summary

Doctrine_Task_GenerateYamlDb

Method Summary
Returns Name Description
execute

----------------- Brought to you by


Doctrine_Task_GenerateYamlModels 577

Method Details
execute()

Parameter Summary

Doctrine_Task_GenerateYamlModels

Method Summary
Returns Name Description
execute

Method Details
execute()

Parameter Summary

Doctrine_Task_LoadData

Method Summary
Returns Name Description
execute

----------------- Brought to you by


Doctrine_Task_Migrate 578

Method Details
execute()

Parameter Summary

Doctrine_Task_Migrate

Method Summary
Returns Name Description
execute

Method Details
execute()

Parameter Summary

Doctrine_Task_RebuildDb

Method Summary
Returns Name Description
__construct
execute

----------------- Brought to you by


Doctrine_Template 579

Method Details
__construct($dispatcher = null)

Parameter Summary

execute()

Parameter Summary

Doctrine_Template

Method Summary
Returns Name Description
setTableDefinition
setTable
mixed getOption
getPlugin
array getOptions
Doctrine_Template. addChild
get
getTable
__construct
getInvoker
set
setInvoker
setUp

----------------- Brought to you by


Doctrine_Template 580

Method Details
setTableDefinition()

Parameter Summary
Blank method for template table definition

setTable(( ) $table)

Parameter Summary
Set the table object that this Template belongs to

(mixed) getOption($name)

Parameter Summary

$name the name of the option

getOption returns the value of given option


<strong>returns</strong> the value of given option

getPlugin()

Parameter Summary
Get plugin instance

(array) getOptions()

Parameter Summary
getOptions returns all options of this template and the associated values
<strong>returns</strong> all options and their values

(Doctrine_Template.) addChild(( ) $template)

Parameter Summary
Adds a plugin as a child to this plugin
<strong>returns</strong> Chainable.

get($name)

Parameter Summary

----------------- Brought to you by


Doctrine_Template 581

getTable()

Parameter Summary
returns the associated table object
<strong>returns</strong> the associated table object

__construct($options = array(), $array)

Parameter Summary

getInvoker()

Parameter Summary
returns the last used invoker
<strong>returns</strong> the record that invoked the last delegated call

set($name, $value)

Parameter Summary

setInvoker(( ) $invoker)

Parameter Summary

$invoker the record that invoked the last delegated call

sets the last used invoker


<strong>returns</strong> this object

setUp()

Parameter Summary
Blank method for template setup

----------------- Brought to you by


Doctrine_Template_Geographical 582

Doctrine_Template_Geographical

Method Summary
Returns Name Description
setTableDefinition
getDistanceQuery
integer getDistance

Method Details
setTableDefinition()

Parameter Summary
Set table definition for Geographical behavior

getDistanceQuery()

Parameter Summary
Initiate and get a distance query with the select parts for the number of kilometers
and miles between this record and other zipcode records in the database

(integer) getDistance(( ) $record, $kilometers = false, $Doctrine_Record)

Parameter Summary
Get distance between this record and another

----------------- Brought to you by


Doctrine_Template_I18n 583

Doctrine_Template_I18n

Method Summary
Returns Name Description
__construct
getI18n
setUp

Method Details
__construct($options = array(), $array)

Parameter Summary

getI18n()

Parameter Summary
Get the plugin instance for the I18n template

setUp()

Parameter Summary
Initialize the I18n plugin for the template

----------------- Brought to you by


Doctrine_Template_Listener_Sluggable 584

Doctrine_Template_Listener_Sluggable

Method Summary
Returns Name Description
string buildSlug
preInsert
__construct
string getUniqueSlug
preUpdate

Method Details
(string) buildSlug((Doctrine_Record) $record)

Parameter Summary
Generate the slug for a given Doctrine_Record based on the configured options

preInsert(( ) $event)

Parameter Summary
Set the slug value automatically when a record is inserted

__construct($options, $array)

Parameter Summary

(string) getUniqueSlug((Doctrine_Record) $record)

Parameter Summary
Creates a unique slug for a given Doctrine_Record. This function enforces the
uniqueness by incrementing the values with a postfix if the slug is not unique

----------------- Brought to you by


Doctrine_Template_Listener_SoftDelete 585

preUpdate(( ) $event)

Parameter Summary
Set the slug value automatically when a record is updated if the options are
configured to allow it

Doctrine_Template_Listener_SoftDelete

Method Summary
Returns Name Description
preDelete
__construct
preDqlDelete
preDqlSelect
postDelete

Method Details
preDelete(( ) $event)

Parameter Summary
Skip the normal delete options so we can override it with our own

__construct($options)

Parameter Summary

preDqlDelete(( ) $event)

Parameter Summary
Implement preDqlDelete() hook and modify a dql delete query so it updates the
deleted flag instead of deleting the record

----------------- Brought to you by


Doctrine_Template_Listener_Timestampable 586

preDqlSelect(( ) $event)

Parameter Summary
Implement preDqlSelect() hook and add the deleted flag to all queries for which this
model is being used in.

postDelete(( ) $event)

Parameter Summary
Implement postDelete() hook and set the deleted flag to true

Doctrine_Template_Listener_Timestampab

Method Summary
Returns Name Description
getTimestamp
preDqlUpdate
preInsert
__construct
preUpdate

Method Details
getTimestamp($type)

Parameter Summary
Gets the timestamp in the correct format based on the way the behavior is
configured

preDqlUpdate(( ) $event, (Doctrine_Event) $evet)

Parameter Summary
Set the updated field for dql update queries

----------------- Brought to you by


Doctrine_Template_NestedSet 587

preInsert(( ) $event)

Parameter Summary
Set the created and updated Timestampable columns when a record is inserted

__construct($options)

Parameter Summary

preUpdate(( ) $event, (Doctrine_Event) $evet)

Parameter Summary
Set updated Timestampable column when a record is updated

Doctrine_Template_NestedSet

Method Summary
Returns Name Description
setTableDefinition
setUp

Method Details
setTableDefinition()

Parameter Summary
Call set table definition for the NestedSet behavior

setUp()

Parameter Summary
Set up NestedSet template

----------------- Brought to you by


Doctrine_Template_Searchable 588

Doctrine_Template_Searchable

Method Summary
Returns Name Description
batchUpdateIndex
__construct
mixed searchTableProxy
setUp

Method Details
batchUpdateIndex($limit = null, $offset = null)

Parameter Summary
Make the batchUpdateIndex() function available to the template so Doctrine_Record
child classes with the behavior enabled can all the function

__construct($options = array())

Parameter Summary

(mixed) searchTableProxy($string, (Doctrine_Query) $query = null)

Parameter Summary

$string Keyword string to search for

$query Query object to alter. Adds where condition to limit the results using the search
index

Searchable keyword search proxy for Doctrine_Table


<strong>returns</strong> The Doctrine_Collection or array of ids and relevancy

----------------- Brought to you by


Doctrine_Template_Sluggable 589

setUp()

Parameter Summary
Setup the Searchable template behavior

Doctrine_Template_Sluggable

Method Summary
Returns Name Description
setTableDefinition

Method Details
setTableDefinition()

Parameter Summary
Set table definition for Sluggable behavior

Doctrine_Template_SoftDelete

Method Summary
Returns Name Description
setTableDefinition

----------------- Brought to you by


Doctrine_Template_Timestampable 590

Method Details
setTableDefinition()

Parameter Summary
Set table definition for SoftDelete behavior

Doctrine_Template_Timestampable

Method Summary
Returns Name Description
setTableDefinition

Method Details
setTableDefinition()

Parameter Summary
Set table definition for Timestampable behavior

Doctrine_Template_Versionable

Method Summary
Returns Name Description

----------------- Brought to you by


Doctrine_Template_Versionable 591

revert
__construct
getAuditLog
setUp

Method Details
revert($version)

Parameter Summary

$version an integer &gt; 1

revert reverts this record to given version, this method only works if versioning
plugin is enabled
<strong>returns</strong> this object
<strong>throws</strong> Doctrine_Record_Exception if given version does not exist

__construct($options = array())

Parameter Summary

getAuditLog()

Parameter Summary
Get plugin for Versionable template

setUp()

Parameter Summary
Setup the Versionable behavior for the template

----------------- Brought to you by


Doctrine_Transaction 592

Doctrine_Transaction

Method Summary
Returns Name Description
createSavePoint
string getIsolation fetches the current session
transaction isolation level note:
some drivers may support
setting the transaction isolation
level but not fetching it
beginInternalTransaction This method must only be used
by Doctrine itself to initiate
transactions. Userland-code
must use beginTransaction .
boolean commit Listeners:
preTransactionCommit,
postTransactionCommit
integer beginTransaction if trying to set a savepoint and rollbackSavePoint
there is no active transaction a
new transaction is being started
This method should only be
used by userland-code to
initiate transactions. To initiate
a transaction from inside
Doctrine use
boolean rollback Cancel any database changes
done during a transaction or
since a specific savepoint that is
in progress. This function may
only be called when auto-
committing is disabled,
otherwise it will fail. Therefore,
a new transaction is implicitly
started after
_doCommit
integer getTransactionLevel

----------------- Brought to you by


Doctrine_Transaction 593

addCollection at the end of each commit this


array is looped over and of
every collection Doctrine then
takes a snapshot in order to
keep the collections up to date
with the database
array getInvalid
setIsolation Set the transacton isolation
level. (implemented by the
connection drivers) example:

setIsolation('READ Listing
0-23
UNCOMMITTED');]]>

boolean addInvalid
getInternalTransactionLevel
_doBeginTransaction
integer getState
releaseSavePoint
_doRollback

Method Details
createSavePoint($savepoint)

Parameter Summary

$savepoint name of a savepoint to create

releaseSavePoint creates a new savepoint

(string) getIsolation()

Parameter Summary
getTransactionIsolation
fetches the current session transaction isolation level note: some drivers may support setting
the transaction isolation level but not fetching it
<strong>returns</strong> returns the current session transaction isolation level
<strong>throws</strong> PDOException if something fails at the PDO level

beginInternalTransaction($savepoint = null)

Parameter Summary

----------------- Brought to you by


Doctrine_Transaction 594

Initiates a transaction.
This method must only be used by Doctrine itself to initiate transactions. Userland-code must
use <a href="package.default.doctrine.transaction.doctrine-transaction.begintransaction">
<function>beginTransaction</function> </a> .

(boolean) commit($savepoint = null)

Parameter Summary

$savepoint name of a savepoint to release

Commit the database changes done during a transaction that is in progress or


release a savepoint. This function may only be called when auto-committing is
disabled, otherwise it will fail.
Listeners: preTransactionCommit, postTransactionCommit
<strong>returns</strong> false if commit couldn&apos;t be performed, true otherwise
<strong>throws</strong> Doctrine_Validator_Exception if the transaction fails due to record
validations

(integer) beginTransaction($savepoint = null)

Parameter Summary

$savepoint name of a savepoint to set

beginTransaction Start a transaction or set a savepoint.


if trying to set a savepoint and there is no active transaction a new transaction is being
started This method should only be used by userland-code to initiate transactions. To initiate
a transaction from inside Doctrine use <a href="package.default.
<strong>returns</strong> current transaction nesting level
<strong>throws</strong> Doctrine_Transaction_Exception if the transaction fails at
database level

rollbackSavePoint($savepoint)

Parameter Summary

$savepoint name of a savepoint to rollback to

rollbackSavePoint releases given savepoint

(boolean) rollback($savepoint = null)

Parameter Summary

$savepoint name of a savepoint to rollback to

----------------- Brought to you by


Doctrine_Transaction 595

Cancel any database changes done during a transaction or since a specific savepoint that is in
progress. This function may only be called when auto-committing is disabled, otherwise it will
fail. Therefore, a new transaction is implicitly started after
<strong>returns</strong> false if rollback couldn&apos;t be performed, true otherwise
<strong>throws</strong> Doctrine_Transaction_Exception if the rollback operation fails at
database level

_doCommit()

Parameter Summary
Performs the commit.

(integer) getTransactionLevel()

Parameter Summary
getTransactionLevel get the current transaction nesting level

addCollection(( ) $coll)

Parameter Summary

$coll a collection to be added

addCollection adds a collection in the internal array of collections


at the end of each commit this array is looped over and of every collection Doctrine then
takes a snapshot in order to keep the collections up to date with the database
<strong>returns</strong> this object

(array) getInvalid()

Parameter Summary
Return the invalid records
<strong>returns</strong> An array of invalid records

setIsolation($isolation)

Parameter Summary

$isolation standard isolation level READ UNCOMMITTED (allows dirty reads) READ
COMMITTED (prevents dirty reads) REPEATABLE READ (prevents
nonrepeatable reads) SERIALIZABLE (prevents phantom reads)

Set the transacton isolation level. (implemented by the connection drivers) example:
<pre><code> <![CDATA[ $tx->setIsolation('READ UNCOMMITTED');]]> </code></pre>
<strong>throws</strong> PDOException if something fails at the PDO level

----------------- Brought to you by


Doctrine_Transaction 596

(boolean) addInvalid(( ) $record)

Parameter Summary
addInvalid adds record into invalid records list
<strong>returns</strong> false if record already existed in invalid records list, otherwise
true

getInternalTransactionLevel()

Parameter Summary

_doBeginTransaction()

Parameter Summary
Begins a database transaction.

(integer) getState()

Parameter Summary
getState returns the state of this transaction module.
<strong>returns</strong> the connection state

releaseSavePoint($savepoint)

Parameter Summary

$savepoint name of a savepoint to release

releaseSavePoint releases given savepoint

_doRollback()

Parameter Summary
Performs the rollback.

----------------- Brought to you by


Doctrine_Transaction_Firebird 597

Doctrine_Transaction_Firebird

Method Summary
Returns Name Description
createSavePoint
rollbackSavePoint
setIsolation
releaseSavePoint

Method Details
createSavePoint($savepoint)

Parameter Summary

$savepoint name of a savepoint to set

createSavepoint creates a new savepoint

rollbackSavePoint($savepoint)

Parameter Summary

$savepoint name of a savepoint to rollback to

rollbackSavePoint releases given savepoint

setIsolation($isolation, $options = array())

Parameter Summary

$isolation standard isolation level (SQL-92) READ UNCOMMITTED (allows dirty reads)
READ COMMITTED (prevents dirty reads) REPEATABLE READ (prevents
nonrepeatable reads) SERIALIZABLE (prevents

----------------- Brought to you by


Doctrine_Transaction_Mssql 598

$options some transaction options: &apos;wait&apos; =&gt; &apos;WAIT&apos; |


&apos;NO WAIT&apos; &apos;rw&apos; =&gt; &apos;READ WRITE&apos; |
&apos;READ ONLY&apos;

Set the transacton isolation level.


<strong>throws</strong> Doctrine_Transaction_Exception if using unknown isolation level
or unknown wait option

releaseSavePoint($savepoint)

Parameter Summary

$savepoint name of a savepoint to release

releaseSavePoint releases given savepoint

Doctrine_Transaction_Mssql

Method Summary
Returns Name Description
_doCommit
setIsolation
_doBeginTransaction
_doRollback

Method Details
_doCommit()

Parameter Summary
Performs the commit.

----------------- Brought to you by


Doctrine_Transaction_Mysql 599

setIsolation($isolation, $options = array())

Parameter Summary

$isolation standard isolation level (SQL-92) portable modes: READ UNCOMMITTED (allows
dirty reads) READ COMMITTED (prevents dirty reads) REPEATABLE READ
(prevents nonrepeatable reads) S

Set the transacton isolation level.


<strong>throws</strong> PDOException if something fails at the PDO level

_doBeginTransaction()

Parameter Summary
Begins a database transaction.

_doRollback()

Parameter Summary
Performs the rollback.

Doctrine_Transaction_Mysql

Method Summary
Returns Name Description
createSavePoint
string getIsolation
rollbackSavePoint
setIsolation
releaseSavePoint

----------------- Brought to you by


Doctrine_Transaction_Mysql 600

Method Details
createSavePoint($savepoint)

Parameter Summary

$savepoint name of a savepoint to set

createSavepoint creates a new savepoint

(string) getIsolation()

Parameter Summary
getTransactionIsolation
<strong>returns</strong> returns the current session transaction isolation level

rollbackSavePoint($savepoint)

Parameter Summary

$savepoint name of a savepoint to rollback to

rollbackSavePoint releases given savepoint

setIsolation($isolation)

Parameter Summary

$isolation standard isolation level READ UNCOMMITTED (allows dirty reads) READ
COMMITTED (prevents dirty reads) REPEATABLE READ (prevents
nonrepeatable reads) SERIALIZABLE (prevents phantom reads)

Set the transacton isolation level.


<strong>throws</strong> PDOException if something fails at the PDO level

releaseSavePoint($savepoint)

Parameter Summary

$savepoint name of a savepoint to release

releaseSavePoint releases given savepoint

----------------- Brought to you by


Doctrine_Transaction_Oracle 601

Doctrine_Transaction_Oracle

Method Summary
Returns Name Description
createSavePoint
rollbackSavePoint
setIsolation
releaseSavePoint

Method Details
createSavePoint($savepoint)

Parameter Summary

$savepoint name of a savepoint to set

createSavepoint creates a new savepoint

rollbackSavePoint($savepoint)

Parameter Summary

$savepoint name of a savepoint to rollback to

rollbackSavePoint releases given savepoint

setIsolation($isolation)

Parameter Summary

$isolation standard isolation level READ UNCOMMITTED (allows dirty reads) READ
COMMITTED (prevents dirty reads) REPEATABLE READ (prevents
nonrepeatable reads) SERIALIZABLE (prevents phantom reads)

----------------- Brought to you by


Doctrine_Transaction_Pgsql 602

Set the transacton isolation level.


<strong>throws</strong> Doctrine_Transaction_Exception if using unknown isolation level

releaseSavePoint($savepoint)

Parameter Summary

$savepoint name of a savepoint to release

releaseSavePoint releases given savepoint

Doctrine_Transaction_Pgsql

Method Summary
Returns Name Description
createSavePoint
rollbackSavePoint
setIsolation
releaseSavePoint

Method Details
createSavePoint($savepoint)

Parameter Summary

$savepoint name of a savepoint to set

createSavepoint creates a new savepoint

rollbackSavePoint($savepoint)

Parameter Summary

$savepoint name of a savepoint to rollback to

----------------- Brought to you by


Doctrine_Transaction_Sqlite 603

rollbackSavePoint releases given savepoint

setIsolation($isolation)

Parameter Summary

$isolation standard isolation level READ UNCOMMITTED (allows dirty reads) READ
COMMITTED (prevents dirty reads) REPEATABLE READ (prevents
nonrepeatable reads) SERIALIZABLE (prevents phantom reads)

Set the transacton isolation level.


<strong>throws</strong> Doctrine_Transaction_Exception if using unknown isolation level
or unknown wait option

releaseSavePoint($savepoint)

Parameter Summary

$savepoint name of a savepoint to release

releaseSavePoint releases given savepoint

Doctrine_Transaction_Sqlite

Method Summary
Returns Name Description
setIsolation

----------------- Brought to you by


Doctrine_Tree 604

Method Details
setIsolation($isolation)

Parameter Summary

$isolation standard isolation level READ UNCOMMITTED (allows dirty reads) READ
COMMITTED (prevents dirty reads) REPEATABLE READ (prevents
nonrepeatable reads) SERIALIZABLE (prevents phantom reads)

Set the transacton isolation level.


<strong>throws</strong> Doctrine_Transaction_Exception if using unknown isolation level

Doctrine_Tree

Method Summary
Returns Name Description
setTableDefinition
getBaseComponent
__construct
getAttribute
object factory
setUp
setAttribute

Method Details
setTableDefinition()

Parameter Summary
Used to define table attributes required for the given implementation
<strong>throws</strong> Doctrine_Tree_Exception if table attributes have not been defined

----------------- Brought to you by


Doctrine_Tree 605

getBaseComponent()

Parameter Summary
Returns the base tree component.

__construct(( ) $table, $options)

Parameter Summary

$table instance of Doctrine_Table


$options options

constructor, creates tree with reference to table and any options

getAttribute($name)

Parameter Summary
gets tree attribute value

(object) factory(( ) $table, $implName, $options = array(), $impName)

Parameter Summary

$table instance of Doctrine_Table


$options options
$impName implementation (NestedSet, AdjacencyList, MaterializedPath)

factory method to return tree instance based upon chosen implementation


<strong>returns</strong> instance of Doctrine_Node
<strong>throws</strong> Doctrine_Exception if class does not extend Doctrine_Tree

setUp()

Parameter Summary
this method is used for setting up relations and attributes and should be used by
specific implementations

setAttribute($name, $value)

Parameter Summary
sets tree attribute value

----------------- Brought to you by


Doctrine_Tree_Interface 606

Doctrine_Tree_Interface

Method Summary
Returns Name Description
createRoot
object findRoot
iterator fetchBranch
object fetchTree

Method Details
createRoot(( ) $record = null)

Parameter Summary

$record instance of Doctrine_Record

creates root node from given record or from a new record

(object) findRoot($root_id = 1)

Parameter Summary
returns root node
<strong>returns</strong> instance of Doctrine_Record

(iterator) fetchBranch($pk, $options = array(), $hydrationMode = null,


$fetchmode)

Parameter Summary

$pk primary key as used by table::find() to locate node to traverse tree from
$options options
$fetchmode One of the Doctrine::HYDRATE_* constants.

----------------- Brought to you by


Doctrine_Tree_NestedSet 607

optimised method that returns iterator for traversal of the tree from the given
record primary key
<strong>returns</strong> instance of
Doctrine_Node_&lt;Implementation&gt;_PreOrderIterator

(object) fetchTree($options = array(), $hydrationMode = null,


$fetchmode)

Parameter Summary

$options options
$fetchmode One of the Doctrine::HYDRATE_* constants.

optimised method to returns iterator for traversal of the entire tree from root
<strong>returns</strong> instance of
Doctrine_Node_&lt;Implementation&gt;_PreOrderIterator

Doctrine_Tree_NestedSet

Method Summary
Returns Name Description
setTableDefinition adds lft and rgt columns for corresponding left and right
values
returnQueryWithRootId
mixed fetchRoots
setBaseQuery
__construct
createRoot Note: When using a tree with multiple root nodes
(hasManyRoots), you MUST pass in a record to use as
the root. This can either be a new/transient record that
already has the root id column set to some numeric value
OR a persistent record. In the latter
integer getMaxRootId
unknown getBaseQuery
object findRoot
mixed fetchBranch

----------------- Brought to you by


Doctrine_Tree_NestedSet 608

getBaseAlias
mixed fetchTree
resetBaseQuery
fetchRoot
integer getNextRootId

Method Details
setTableDefinition()

Parameter Summary
used to define table attributes required for the NestetSet implementation
adds lft and rgt columns for corresponding left and right values

returnQueryWithRootId($query, $rootId = 1, $root_id)

Parameter Summary

$query Doctrine_Query
$root_id id of destination root

returns parsed query with root id where clause added if applicable

(mixed) fetchRoots()

Parameter Summary
Fetches all root nodes. If the tree has only one root this is the same as fetchRoot().
<strong>returns</strong> The root nodes.

setBaseQuery(( ) $query)

Parameter Summary
Enter description here...

__construct(( ) $table, $options)

Parameter Summary

$table instance of Doctrine_Table


$options options

constructor, creates tree with reference to table and sets default root options

----------------- Brought to you by


Doctrine_Tree_NestedSet 609

createRoot(( ) $record = null)

Parameter Summary

$record instance of Doctrine_Record

Creates root node from given record or from a new record.


Note: When using a tree with multiple root nodes (hasManyRoots), you MUST pass in a
record to use as the root. This can either be a new/transient record that already has the root
id column set to some numeric value OR a persistent record. In the latter

(integer) getMaxRootId()

Parameter Summary
calculates the current max root id

(unknown) getBaseQuery($options)

Parameter Summary
Enter description here...

(object) findRoot($rootId = 1)

Parameter Summary
returns root node
<strong>returns</strong> instance of Doctrine_Record

(mixed) fetchBranch($pk, $options = array(), $hydrationMode = null,


$fetchmode)

Parameter Summary

$pk primary key as used by table::find() to locate node to traverse tree from
$options Options.
$fetchmode One of the Doctrine::HYDRATE_* constants.

Fetches a branch of a tree.


<strong>returns</strong> The branch or FALSE if the branch could not be found.

getBaseAlias()

Parameter Summary
Enter description here...

----------------- Brought to you by


Doctrine_Validator 610

(mixed) fetchTree($options = array(), $hydrationMode = null,


$fetchmode)

Parameter Summary

$options Options
$fetchmode One of the Doctrine::HYDRATE_* constants.

Fetches a tree.
<strong>returns</strong> The tree or FALSE if the tree could not be found.

resetBaseQuery()

Parameter Summary
Enter description here...

fetchRoot($rootId = 1)

Parameter Summary
Fetches a/the root node.

(integer) getNextRootId()

Parameter Summary
calculates the next available root id

Doctrine_Validator

Method Summary
Returns Name Description
boolean isValidType
boolean validateLength
integer getStringLength
validateRecord

----------------- Brought to you by


Doctrine_Validator 611

boolean hasErrors
Doctrine_Validator_Interface getValidator

Method Details
(boolean) isValidType($var, $type)

Parameter Summary

$var Variable to validate


$type Type of the variable expected

Validate the type of the passed variable

(boolean) validateLength($value, $type, $maximumLength)

Parameter Summary

$value Value to validate


$type Type of field being validated
$maximumLength Maximum length allowed for the column

Validates the length of a field.


<strong>returns</strong> True/false for whether the value passed validation

(integer) getStringLength($string)

Parameter Summary
Get length of passed string. Will use multibyte character functions if they exist

validateRecord(( ) $record)

Parameter Summary
Validates a given record and saves possible errors in Doctrine_Validator::$stack

(boolean) hasErrors()

Parameter Summary
Whether or not errors exist on this validator
<strong>returns</strong> True/false for whether or not this validate instance has error

----------------- Brought to you by


Doctrine_Validator_Country 612

(Doctrine_Validator_Interface) getValidator($name)

Parameter Summary

$name Name of the validator or the validator class name

Get a validator instance for the passed $name

Doctrine_Validator_Country

Method Summary
Returns Name Description
boolean validate
array getCountries

Method Details
(boolean) validate($value)

Parameter Summary
checks if given value is a valid country code

(array) getCountries()

Parameter Summary
returns all available country codes

----------------- Brought to you by


Doctrine_Validator_Creditcard 613

Doctrine_Validator_Creditcard

Method Summary
Returns Name Description
boolean validate

Method Details
(boolean) validate($value)

Parameter Summary
checks if given value is a valid credit card number

Doctrine_Validator_Date

Method Summary
Returns Name Description
boolean validate

----------------- Brought to you by


Doctrine_Validator_Driver 614

Method Details
(boolean) validate($value)

Parameter Summary
checks if given value is a valid date

Doctrine_Validator_Driver

Method Summary
Returns Name Description
__isset
__get
array getArgs
mixed getArg
setArg
__set

Method Details
__isset($arg)

Parameter Summary

__get($arg)

Parameter Summary
__get an alias for getOption

(array) getArgs()

Parameter Summary

----------------- Brought to you by


Doctrine_Validator_Email 615

returns all args and their associated values


<strong>returns</strong> all args as an associative array

(mixed) getArg(($arg) $arg)

Parameter Summary

$arg the name of the option to retrieve

returns the value of an argument


<strong>returns</strong> the value of the option

setArg(($arg) $arg, ($value) $value)

Parameter Summary

$arg the name of the option to be changed


$value the value of the option

sets given value to an argument


<strong>returns</strong> this object

__set(($arg) $arg, ($value) $value)

Parameter Summary

$arg the name of the option to be changed


$value the value of the option

sets given value to an argument


<strong>returns</strong> this object

Doctrine_Validator_Email

Method Summary
Returns Name Description

----------------- Brought to you by


Doctrine_Validator_ErrorStack 616

boolean validate

Method Details
(boolean) validate($value)

Parameter Summary
checks if given value is a valid email address

Doctrine_Validator_ErrorStack

Method Summary
Returns Name Description
add
clear
boolean contains
mixed get
__construct
integer count
string getClassname
unknown getIterator
set
array getValidators
remove
toArray

Method Details
add($invalidFieldName, $errorCode = 'general', $errorType)

Parameter Summary

----------------- Brought to you by


Doctrine_Validator_ErrorStack 617

Adds an error to the stack.

clear()

Parameter Summary
Removes all errors from the stack.

(boolean) contains($fieldName)

Parameter Summary
Check if a field has an error

(mixed) get($fieldName)

Parameter Summary
Get errors for field

__construct($className)

Parameter Summary
Constructor

(integer) count()

Parameter Summary
Count the number of errors

(string) getClassname()

Parameter Summary
Get the classname where the errors occured

(unknown) getIterator()

Parameter Summary
Enter description here...

set($fieldName, $errorCode)

Parameter Summary
Alias for add()

----------------- Brought to you by


Doctrine_Validator_Exception 618

(array) getValidators()

Parameter Summary
Get array of failed validators

remove($fieldName)

Parameter Summary
Removes all existing errors for the specified field from the stack.

toArray()

Parameter Summary

Doctrine_Validator_Exception

Method Summary
Returns Name Description
inspect
string __toString
__construct
count
getInvalidRecords
getIterator

Method Details
inspect($function)

Parameter Summary

$function Either string with function name or array with object, functionname. See
call_user_func in php manual for more inforamtion

----------------- Brought to you by


Doctrine_Validator_Future 619

This method will apply the value of the $function variable as a user_func to tall
errorstack objects in the exception

(string) __toString()

Parameter Summary

__construct($invalid, (Doctrine_Validator) $validator)

Parameter Summary

count()

Parameter Summary

getInvalidRecords()

Parameter Summary

getIterator()

Parameter Summary

Doctrine_Validator_Future

Method Summary
Returns Name Description
boolean validate

Method Details
(boolean) validate($value)

Parameter Summary

----------------- Brought to you by


Doctrine_Validator_HtmlColor 620

checks if the given value is a valid date in the future.

Doctrine_Validator_HtmlColor

Method Summary
Returns Name Description
boolean validate

Method Details
(boolean) validate($value)

Parameter Summary
checks if given value is a valid html color code

Doctrine_Validator_Ip

Method Summary
Returns Name Description
boolean validate

----------------- Brought to you by


Doctrine_Validator_Minlength 621

Method Details
(boolean) validate($value)

Parameter Summary
checks if given value is valid ip address

Doctrine_Validator_Minlength

Method Summary
Returns Name Description
boolean validate

Method Details
(boolean) validate($value)

Parameter Summary
checks if given value is more length than the minimum length required

Doctrine_Validator_Nospace

Method Summary
Returns Name Description

----------------- Brought to you by


Doctrine_Validator_Notblank 622

boolean validate

Method Details
(boolean) validate($value)

Parameter Summary
checks that value doesn't contain any space chars

Doctrine_Validator_Notblank

Method Summary
Returns Name Description
boolean validate

Method Details
(boolean) validate($value)

Parameter Summary
checks that value isn't blank a value is blank when its either null or contains only
space characters

----------------- Brought to you by


Doctrine_Validator_Notnull 623

Doctrine_Validator_Notnull

Method Summary
Returns Name Description
boolean validate

Method Details
(boolean) validate($value)

Parameter Summary
checks that given value isn't null

Doctrine_Validator_Past

Method Summary
Returns Name Description
boolean validate

----------------- Brought to you by


Doctrine_Validator_Range 624

Method Details
(boolean) validate($value)

Parameter Summary
checks if the given value is a valid date in the past.

Doctrine_Validator_Range

Method Summary
Returns Name Description
boolean validate

Method Details
(boolean) validate($value)

Parameter Summary
checks if value is within given range

Doctrine_Validator_Readonly

Method Summary
Returns Name Description

----------------- Brought to you by


Doctrine_Validator_Regexp 625

boolean validate

Method Details
(boolean) validate($value)

Parameter Summary
checks if value has been modified

Doctrine_Validator_Regexp

Method Summary
Returns Name Description
boolean validate

Method Details
(boolean) validate($value, $args)

Parameter Summary
checks if given value satisfies a regular expression

----------------- Brought to you by


Doctrine_Validator_Time 626

Doctrine_Validator_Time

Method Summary
Returns Name Description
boolean validate checks if given value is a valid time

Method Details
(boolean) validate($value)

Parameter Summary
checks if given value is a valid time

Doctrine_Validator_Timestamp

Method Summary
Returns Name Description
boolean validate

----------------- Brought to you by


Doctrine_Validator_Unique 627

Method Details
(boolean) validate($value)

Parameter Summary
checks if given value is a valid timestamp (YYYY-MM-DD HH:MM:SS)

Doctrine_Validator_Unique

Method Summary
Returns Name Description
boolean validate

Method Details
(boolean) validate($value)

Parameter Summary
checks if given value is unique

Doctrine_Validator_Unsigned

Method Summary
Returns Name Description

----------------- Brought to you by


Doctrine_Validator_Usstate 628

boolean validate valid values: null, '', 5, '5', 5.9, '5.9' invalid values: -5, '-5', 'five', -5.9,
'-5.9', '5.5.5'

Method Details
(boolean) validate($value)

Parameter Summary
checks if given value is a valid unsigned integer or float
valid values: null, &apos;&apos;, 5, &apos;5&apos;, 5.9, &apos;5.9&apos; invalid values: -5,
&apos;-5&apos;, &apos;five&apos;, -5.9, &apos;-5.9&apos;, &apos;5.5.5&apos;

Doctrine_Validator_Usstate

Method Summary
Returns Name Description
boolean validate
getStates

Method Details
(boolean) validate($value, $args)

Parameter Summary
checks if given value is a valid US state code

getStates()

Parameter Summary

----------------- Brought to you by


Doctrine_View 629

Doctrine_View

Method Summary
Returns Name Description
string getViewSql
string getName
drop
getQuery
__construct
string getViewDql
execute
getConnection
string getSelectSql
create

Method Details
(string) getViewSql()

Parameter Summary
Get the view sql string

(string) getName()

Parameter Summary
returns the name of this view

drop()

Parameter Summary
drops this view from the database

----------------- Brought to you by


Doctrine_View 630

<strong>throws</strong> Doctrine_View_Exception

getQuery()

Parameter Summary
returns the associated query object

__construct(( ) $query, $viewName)

Parameter Summary
constructor

(string) getViewDql()

Parameter Summary
Get the view dql string

execute()

Parameter Summary
returns a collection of Doctrine_Record objects

getConnection()

Parameter Summary
returns the connection object

(string) getSelectSql()

Parameter Summary
returns the select sql for this view

create()

Parameter Summary
creates this view
<strong>throws</strong> Doctrine_View_Exception

----------------- Brought to you by

S-ar putea să vă placă și