Pt_BR En Ja De Fr 
You are currently viewing the Development branch api documentation. Switch to 0.11 or 1.0

Development Doctrine

Doctrine

Doctrine the base class of Doctrine framework

Method Details

  • (string) generateSqlFromModels($directory = null)

    Doctrine


  • $var a variable of any type
    $output whether to output the content
    $indent indention string

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

    dumps a given variable


  • $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


  • (string) classify($tableName, $tablename)

    returns class name from table name


  • $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


  • generateMigrationsFromDb($migrationsPath)

    throws new Doctrine_Migration_Exception


  • getConnectionByTableName($tableName)

    Get the connection object for a table by the actual table name


  • (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


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

    createDatabases($specifiedConnections = array())

    Creates databases for connections


  • (boolean) autoload($className, $classname)

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


  • (string) tableize($className, $classname)

    returns table name from class name


  • $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.


  • generateMigrationsFromModels($migrationsPath, $modelsPath = null)


  • getTable($tableName)


  • __construct()

    throws Doctrine_Exception


  • (string) getPath()

    getPath returns the doctrine root


  • getLoadedModelFiles()


  • $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


  • $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


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

    dropDatabases($specifiedConnections = array())

    Drops databases for connections


  • $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


  • $array An array of models to be exported

    createTablesFromArray($array)

    Creates database tables for the models in the supplied array


  • $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


  • $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.


  • $directory Directory containing your models

    createTablesFromModels($directory = null)

    Creates database tables for the models in the specified directory


  • getPathModels()


  • $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


  • locate($name)


  • $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


Comments (0) [ add comment ]

 No Comments

Add Comment

Add New Comment
Please enter follow the doctrine