|
Doctrine 1.2.4
|
Inherits Doctrine_Data.
Public Member Functions | |
| __construct ($directory=null) | |
| doImport ($append=false) | |
| doParsing () | |
| exportData ($directory, $format= 'yml', $models=array(), $_exportIndividualFiles=false) | |
| exportIndividualFiles ($bool=null) | |
| getDirectory () | |
| getFormat () | |
| getFormats () | |
| getModels () | |
| importData ($directory, $format= 'yml', $models=array(), $append=false) | |
| isRelation (Doctrine_Record $record, $fieldName) | |
| purge ($models=null) | |
| setDirectory ($directory) | |
| setFormat ($format) | |
| setModels ($models) | |
Protected Member Functions | |
| _buildNestedSetRows ($className, $data) | |
| _buildRows ($className, $data) | |
| _getImportedObject ($rowKey, Doctrine_Record $record, $relationName, $referringRowKey) | |
| _getRowKeyPrefix (Doctrine_Table $table) | |
| _hasNaturalNestedSetFormat ($className, array &$data) | |
| _loadData (array $array) | |
| _loadNestedSetData ($model, $nestedSetData, $parent=null) | |
| _processRow ($rowKey, $row) | |
Definition at line 33 of file Import.php.
| Doctrine_Data_Import::__construct | ( | $directory = null | ) |
Optionally pass the directory/path to the yaml for importing
| string | $directory |
Definition at line 55 of file Import.php.
|
protected |
Build the rows for nested set models
Definition at line 162 of file Import.php.
|
protected |
Recursively loop over all data fixtures and build the array of className rows
Definition at line 126 of file Import.php.
|
protected |
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
| string | $rowKey | |
| Doctrine_Record | $record | |
| string | $relationName | |
| string | $referringRowKey |
| Doctrine_Data_Exception |
Definition at line 184 of file Import.php.
|
protected |
Returns the prefix to use when indexing an object from the supplied table.
| Doctrine_Table | $table |
Definition at line 398 of file Import.php.
|
protected |
NestedSet fixtures may come in a 'natural' format with nested children listed under a 'children' key or in a raw, non-nested format with lft/rgt values.
This method returns true if the given $data is a nested set in 'natural' form.
| $className | |
| $data |
Definition at line 272 of file Import.php.
|
protected |
Perform the loading of the data from the passed array
| string | $array |
Definition at line 293 of file Import.php.
|
protected |
Load nested set data for models with nested set enabled
| string | $model | |
| string | $nestedSetData | |
| string | $parent |
Definition at line 361 of file Import.php.
|
protected |
Process a row and make all the appropriate relations between the imported data
| string | $rowKey | |
| string | $row |
Definition at line 215 of file Import.php.
| Doctrine_Data_Import::doImport | ( | $append = false | ) |
Do the importing of the data parsed from the fixtures
Definition at line 110 of file Import.php.
| Doctrine_Data_Import::doParsing | ( | ) |
Do the parsing of the yaml files and return the final parsed array
Definition at line 67 of file Import.php.
|
inherited |
exportData
Interface for exporting data to fixtures files from Doctrine models
| string | $directory | |
| string | $format | |
| string | $models | |
| string | $_exportIndividualFiles |
Definition at line 196 of file Data.php.
|
inherited |
|
inherited |
|
inherited |
|
inherited |
|
inherited |
|
inherited |
importData
Interface for importing data from fixture files to Doctrine models
| string | $directory | |
| string | $format | |
| string | $models |
Definition at line 216 of file Data.php.
|
inherited |
isRelation
Check if a fieldName on a Doctrine_Record is a relation, if it is we return that relationData
| string | $Doctrine_Record | |
| string | $fieldName |
Definition at line 234 of file Data.php.
|
inherited |
purge
Purge all data for loaded models or for the passed array of Doctrine_Records
| string | $models |
Definition at line 258 of file Data.php.
|
inherited |
|
inherited |
|
inherited |