0.10 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 |
| compile | 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 | |
| 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 | |
| debug | ||
| dropDatabases | Drops databases for connections | |
| dump | dumps a given variable | |
| dumpData | Dump data to a yaml fixtures file | |
| fileFinder | ||
| 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_Record classes |
| generateModelsFromYaml | Generate a yaml schema file from an existing directory of models | |
| generateSqlFromArray | ||
| 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 | |
| array | getLoadedModelFiles | Returns an array of all the loaded models and the path where each of them exists |
| 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_Records out of them. If you do not specify $classes it will return all of the currently l |
| string | getPath | |
| getTable | ||
| array | initializeModels | 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 |
| boolean | isValidClassname | checks for valid class name (uses camel case and underscores) |
| boolean | isValidModelClass | 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 |
| loadData | Load data from a yaml fixtures file. The output of dumpData can be fed to loadData | |
| loadModel | ||
| loadModels | Recursively load all models from a directory or array of directories | |
| makeDirectories | Makes the directories for a path recursively | |
| bool | migrate | Migrate database to specified $to version. Migrates from current to latest if you do not specify. |
| removeDirectories | ||
| 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
-
compile($target = null, $includedDrivers = array())
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
throws Doctrine_Exception
-
$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
-
debug($bool = null)
-
$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
-
fileFinder($type)
-
$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
-
$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 generateMigrationsFromModels($migrationsPath, $modelsPath = null, $modelLoading = null)
-
$directory Directory to write your models to $databases Array of databases to generate models for $options Array of options (boolean) generateModelsFromDb($directory, $databases = array(), $options = array())
method for importing existing schema to Doctrine_Record 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
-
generateSqlFromArray($array)
-
(string) generateSqlFromModels($directory = null)
Doctrine
-
$yamlPath Path to write oyur yaml schema file to $options Array of options generateYamlFromDb($yamlPath, $databases = array(), $options = array())
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
-
(array) getLoadedModelFiles()
Returns an array of all the loaded models and the path where each of them exists
-
$classes Array of classes to filter through, otherwise uses get_declared_classes() (array) getLoadedModels((classes) $classes = null)
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 l
-
(string) getPath()
getPath returns the doctrine root
-
getTable($tableName)
-
(array) initializeModels($models)
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
-
(boolean) isValidClassname($className, $classname)
isValidClassName
checks for valid class name (uses camel case and underscores)
-
$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_Record 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
-
loadModel($className, $path = null)
-
$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 loadModels($directory, $modelLoading = null)
Recursively load all models from a directory or array of directories
-
makeDirectories($path, $mode = 0777)
Makes the directories for a path recursively
-
$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
-
removeDirectories($folderPath)
-
(string) tableize($className, $classname)
returns table name from class name
-
__construct()
throws Doctrine_Exception




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