Development Doctrine
Doctrine
Doctrine the base class of Doctrine framework
Method Summary
| Returns | Name | Description |
|---|---|---|
| boolean | autoload | simple autoload function returns true if the class was loaded, otherwise false |
| string | classify | returns class name from table name |
| createDatabases | Creates databases for connections | |
| createTablesFromArray | Creates database tables for the models in the supplied array | |
| createTablesFromModels | Creates database tables for the models in the specified directory | |
| dropDatabases | Drops databases for connections | |
| dump | dumps a given variable | |
| dumpData | Dump data to a yaml fixtures file | |
| array | filterInvalidModels | 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. |
| generateMigrationClass | Generate new migration class skeleton | |
| generateMigrationsFromDb | ||
| generateMigrationsFromModels | ||
| boolean | generateModelsFromDb | method for importing existing schema to Doctrine_Entity classes |
| generateModelsFromYaml | Generate a yaml schema file from an existing directory of models | |
| string | generateSqlFromModels | |
| generateYamlFromDb | 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. | |
| generateYamlFromModels | Generate yaml schema file for the models in the specified directory | |
| getConnectionByTableName | Get the connection object for a table by the actual table name | |
| getLoadedModelFiles | ||
| array | getLoadedModels | 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_Entitys out of them. If you do not specify $classes it will return all of the currently l |
| string | getPath | |
| getPathModels | ||
| getTable | ||
| boolean | isValidModelClass | Checks if what is passed is a valid Doctrine_Entity Will load class in to memory in order to inflect it and find out information about the class |
| loadData | Load data from a yaml fixtures file. The output of dumpData can be fed to loadData | |
| array | loadModels | Recursively load all models from a directory or array of directories |
| locate | ||
| bool | migrate | Migrate database to specified $to version. Migrates from current to latest if you do not specify. |
| string | tableize | returns table name from class name |
| __construct |
Method Details
-
(boolean) autoload($className, $classname)
simple autoload function returns true if the class was loaded, otherwise false
-
(string) classify($tableName, $tablename)
returns class name from table name
-
$specifiedConnections Array of connections you wish to create the database for createDatabases($specifiedConnections = array())
Creates databases for connections
-
$array An array of models to be exported createTablesFromArray($array)
Creates database tables for the models in the supplied array
-
$directory Directory containing your models createTablesFromModels($directory = null)
Creates database tables for the models in the specified directory
-
$specifiedConnections Array of connections you wish to drop the database for dropDatabases($specifiedConnections = array())
Drops databases for connections
-
$var a variable of any type $output whether to output the content $indent indention string dump($var, $output = true, $indent = "")
dumps a given variable
-
$yamlPath Path to write the yaml data fixtures to $individualFiles Whether or not to dump data to individual fixtures files dumpData($yamlPath, $individualFiles = false)
Dump data to a yaml fixtures file
-
$classes Array of classes to filter through, otherwise uses get_declared_classes() (array) filterInvalidModels((classes) $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.
-
$className Name of the Migration class to generate $migrationsPath Path to directory which contains your migration classes generateMigrationClass($className, $migrationsPath)
Generate new migration class skeleton
-
generateMigrationsFromDb($migrationsPath)
throws new Doctrine_Migration_Exception
-
generateMigrationsFromModels($migrationsPath, $modelsPath = null)
-
$directory Directory to write your models to $databases Array of databases to generate models for (boolean) generateModelsFromDb($directory, $databases = array())
method for importing existing schema to Doctrine_Entity classes
throws Exception
-
$yamlPath Path to your yaml schema files $directory Directory to generate your models in $options Array of options to pass to the schema importer generateModelsFromYaml($yamlPath, $directory, $options = array())
Generate a yaml schema file from an existing directory of models
-
(string) generateSqlFromModels($directory = null)
Doctrine
-
$yamlPath Path to write oyur yaml schema file to generateYamlFromDb($yamlPath)
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.
-
$yamlPath Path to your yaml schema files $directory Directory to generate your models in generateYamlFromModels($yamlPath, $directory)
Generate yaml schema file for the models in the specified directory
-
getConnectionByTableName($tableName)
Get the connection object for a table by the actual table name
-
getLoadedModelFiles()
-
(array) getLoadedModels()
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_Entitys out of them. If you do not specify $classes it will return all of the currently l
-
(string) getPath()
getPath returns the doctrine root
-
getPathModels()
-
getTable($tableName)
-
$class Can be a string named after the class, an instance of the class, or an instance of the class reflected (boolean) isValidModelClass($class)
Checks if what is passed is a valid Doctrine_Entity Will load class in to memory in order to inflect it and find out information about the class
-
$yamlPath Path to your yaml data fixtures $append Whether or not to append the data loadData($yamlPath, $append = false)
Load data from a yaml fixtures file. The output of dumpData can be fed to loadData
-
$directory Path to directory of models or array of directory paths (array) loadModels($directory)
Recursively load all models from a directory or array of directories
-
locate($name)
-
$migrationsPath Path to migrations directory which contains your migration classes $to Version you wish to migrate to. (bool) migrate($migrationsPath, $to = null)
Migrate database to specified $to version. Migrates from current to latest if you do not specify.
Doctrine
throws new Doctrine_Migration_Exception
-
(string) tableize($className, $classname)
returns table name from class name
-
__construct()
throws Doctrine_Exception




Comments (0) [ add comment ]
No Comments
Add Comment