This class is the Propel implementation of sfData. It interacts with the
data source and loads data.
Inheritence
sfPropelData
<
sfData
Method Summary
-
doDeleteCurrentData($files)
Clears existing data from the data source by reading the fixture files and
deleting the existing data for only those classes that are mentioned in
the fixtures.
-
dumpData($directoryOrFile, $tables = 'all', $connectionName = 'propel')
Dumps data to fixture from one or more tables.
-
fixOrderingOfForeignKeyData($classes)
Fixes the ordering of foreign key data, by outputting data a foreign key
depends on before the table with the foreign key.
-
fixOrderingOfForeignKeyDataInSameTable($resultsSets, $tableName, $column, $in = null)
-
array
getData($tables = 'all', $connectionName = 'propel')
Returns data from one or more tables.
-
loadData($directoryOrFile = null, $connectionName = 'propel')
Loads data from a file or directory into a Propel data source
-
loadDataFromArray($data)
Implements the abstract loadDataFromArray method and loads the data using
the generated data model.
-
loadMany2Many((BaseObject) $obj, $middleTableName, $values)
Loads many to many objects.
-
loadMapBuilders()
Loads all map builders.
Methods inherited from sfData
doLoadData , doLoadDataFromFile , getDeleteCurrentData , getFiles , loadDataFromArray , setDeleteCurrentData
Method Details
-
doDeleteCurrentData ($files)
Browse code
| $files |
The list of YAML files.
|
Clears existing data from the data source by reading the fixture files and
deleting the existing data for only those classes that are mentioned in
the fixtures.
throws sfException If a class mentioned in a fixture can not be found
-
dumpData ($directoryOrFile, $tables = 'all', $connectionName = 'propel')
Browse code
| $directoryOrFile |
The directory or file to dump to
|
| $tables |
The name or names of tables to dump (or all to dump all tables)
|
| $connectionName |
The connection name (default to propel)
|
Dumps data to fixture from one or more tables.
-
fixOrderingOfForeignKeyData ($classes)
Browse code
| $classes |
The array with the class names.
|
Fixes the ordering of foreign key data, by outputting data a foreign key
depends on before the table with the foreign key.
-
fixOrderingOfForeignKeyDataInSameTable ($resultsSets, $tableName, $column, $in = null)
Browse code
| $resultsSets |
|
| $tableName |
|
| $column |
|
| $in |
|
-
(array) getData ($tables = 'all', $connectionName = 'propel')
Browse code
| $tables |
name or names of tables to dump (or all to dump all tables)
|
| $connectionName |
connection name
|
Returns data from one or more tables.
returns An array of database data
-
loadData ($directoryOrFile = null, $connectionName = 'propel')
Browse code
| $directoryOrFile |
A file or directory path or an array of files or directories
|
| $connectionName |
The Propel connection name, default 'propel'
|
Loads data from a file or directory into a Propel data source
throws Exception If the database throws an error, rollback transaction and rethrows exception
-
loadDataFromArray ($data)
Browse code
| $data |
The data to be loaded into the data source
|
Implements the abstract loadDataFromArray method and loads the data using
the generated data model.
throws Exception If data is unnamed.
-
loadMany2Many ((BaseObject) $obj, $middleTableName, $values)
Browse code
| $obj |
A Propel object
|
| $middleTableName |
The middle table name
|
| $values |
An array of values
|
Loads many to many objects.
-
Loads all map builders.
throws sfException If the class cannot be found
|