Show
Ignore:
Timestamp:
10/11/07 05:23:00 (15 months ago)
Author:
jwage
Message:

Documentation.

Files:
1 modified

Legend:

Unmodified
Added
Removed
  • trunk/lib/Doctrine.php

    r2809 r2813  
    421421     * @param string $directory Path to directory of models or array of directory paths 
    422422     * @return void 
    423      * @author Jonathan H. Wage 
    424423     */ 
    425424    public static function loadModels($directory) 
     
    450449     * Get all the loaded models, you can provide an array of classes or it will use get_declared_classes() 
    451450     *  
    452      * @package default 
    453      * @author Jonathan H. Wage 
     451     * @param $classes Array of classes to filter through, otherwise uses get_declared_classes() 
     452     * @return void 
    454453     */ 
    455454    public static function getLoadedModels($classes = null) 
     
    490489     * @param string $tableName  
    491490     * @return void 
    492      * @author Jonathan H. Wage 
    493491     */ 
    494492    public static function getConnectionByTableName($tableName) 
     
    509507     * method for importing existing schema to Doctrine_Record classes 
    510508     * 
    511      * @param string $directory 
    512      * @param array $info 
     509     * @param string $directory Directory to write your models to 
     510     * @param array $databases Array of databases to generate models for 
    513511     * @return boolean 
    514512     */ 
     
    522520     * Generate your model definitions from an existing database 
    523521     * 
    524      * @param string $directory  
    525      * @param string $array  
     522     * @param string $directory Directory to write your models to 
     523     * @param string $databases Array of databases to generate models for 
    526524     * @return void 
    527525     */ 
     
    536534     * This should probably be fixed. We should write something to generate a yaml schema file directly from the database. 
    537535     * 
    538      * @param string $yamlPath  
     536     * @param string $yamlPath Path to write oyur yaml schema file to 
    539537     * @return void 
    540538     */ 
     
    554552     * Generate a yaml schema file from an existing directory of models 
    555553     * 
    556      * @param string $yamlPath  
    557      * @param string $directory  
     554     * @param string $yamlPath Path to your yaml schema files 
     555     * @param string $directory Directory to generate your models in 
    558556     * @return void 
    559557     */ 
     
    568566     * method for exporting Doctrine_Record classes to a schema 
    569567     * 
    570      * @param string $directory 
     568     * @param string $directory Directory containing your models 
     569     * @return void 
    571570     */ 
    572571    public static function exportSchema($directory = null) 
     
    579578     * Creates database tables for the models in the specified directory 
    580579     * 
    581      * @param string $directory  
     580     * @param string $directory Directory containing your models 
    582581     * @return void 
    583582     */ 
     
    591590     * Generate yaml schema file for the models in the specified directory 
    592591     * 
    593      * @param string $yamlPath  
    594      * @param string $directory  
     592     * @param string $yamlPath Path to your yaml schema files 
     593     * @param string $directory Directory to generate your models in 
    595594     * @return void 
    596595     */ 
     
    606605     * Creates databases for connections 
    607606     * 
    608      * @param string $specifiedConnections  
     607     * @param string $specifiedConnections Array of connections you wish to create the database for 
    609608     * @return void 
    610609     */ 
     
    630629     * Drops databases for connections 
    631630     * 
    632      * @param string $specifiedConnections  
     631     * @param string $specifiedConnections Array of connections you wish to drop the database for 
    633632     * @return void 
    634633     */ 
     
    654653     * Dump data to a yaml fixtures file 
    655654     * 
    656      * @param string $yamlPath  
    657      * @param string $individualFiles  
     655     * @param string $yamlPath Path to write the yaml data fixtures to 
     656     * @param string $individualFiles Whether or not to dump data to individual fixtures files 
    658657     * @return void 
    659658     */ 
     
    670669     * The output of dumpData can be fed to loadData 
    671670     * 
    672      * @param string $yamlPath  
    673      * @param string $append  
     671     * @param string $yamlPath Path to your yaml data fixtures 
     672     * @param string $append Whether or not to append the data 
    674673     * @return void 
    675674     */ 
     
    699698     * Populdate your models with dummy data 
    700699     * 
    701      * @param string $append  
    702      * @param string $num  
     700     * @param string $append Whether or not to append the data 
     701     * @param string $num Number of records to populate 
    703702     * @return void 
    704703     */ 
     
    723722        return $data->importDummyData($num); 
    724723    } 
    725      
     724    /** 
     725     * migrate 
     726     *  
     727     * Migrate database to specified $to version. Migrates from current to latest if you do not specify. 
     728     * 
     729     * @param string $directory Directory which contains your migration classes 
     730     * @param string $to Version you wish to migrate to. 
     731     * @return void 
     732     */ 
    726733    public static function migrate($directory, $to = null) 
    727734    { 
     
    730737        return $migration->migrate($to); 
    731738    } 
    732      
     739    /** 
     740     * generateMigrationClass 
     741     * 
     742     * Generate new migration class skeleton 
     743     * 
     744     * @param string $className Name of the Migration class to generate 
     745     * @param string $directory Directory which contains your migration classes 
     746     * @package default 
     747     */ 
    733748    public static function generateMigrationClass($className, $directory) 
    734749    {