Changeset 4306
- Timestamp:
- 04/30/08 15:38:31 (14 months ago)
- Files:
-
- 1 modified
-
branches/0.11/lib/Doctrine.php (modified) (34 diffs)
Legend:
- Unmodified
- Added
- Removed
-
branches/0.11/lib/Doctrine.php
r4301 r4306 446 446 447 447 /** 448 * Path 448 * Path to Doctrine root 449 449 * 450 450 * @var string $path doctrine root directory … … 453 453 454 454 /** 455 * Debug 456 * 457 * Bool true/false 455 * Debug bool true/false option 458 456 * 459 457 * @var boolean $_debug … … 462 460 463 461 /** 464 * _loadedModelFiles465 *466 462 * Array of all the loaded models and the path to each one for autoloading 467 463 * … … 471 467 472 468 /** 473 * _validators474 *475 469 * Array of all the loaded validators 470 * 476 471 * @var array 477 472 */ … … 490 485 491 486 /** 492 * getLoadedModelFiles493 *494 487 * Returns an array of all the loaded models and the path where each of them exists 495 488 * … … 502 495 503 496 /** 504 * debug497 * Turn on/off the debugging setting 505 498 * 506 499 * @param string $bool … … 517 510 518 511 /** 519 * getPath 520 * returns the doctrine root 512 * Get the root path to Doctrine 521 513 * 522 514 * @return string … … 532 524 533 525 /** 534 * loadModel535 * 536 * @ package default526 * Load an individual model name and path in to the model loading registry 527 * 528 * @return null 537 529 */ 538 530 public static function loadModel($className, $path = null) … … 542 534 543 535 /** 544 * loadModels545 *546 536 * Recursively load all models from a directory or array of directories 547 537 * … … 601 591 602 592 /** 603 * getLoadedModels604 *605 593 * Get all the loaded models, you can provide an array of classes or it will use get_declared_classes() 606 594 * … … 622 610 623 611 /** 624 * initializeModels625 *626 612 * Initialize all models so everything is present and loaded in to memory 627 613 * This will also inheritently initialize any model behaviors and add … … 654 640 655 641 /** 656 * filterInvalidModels657 *658 642 * Filter through an array of classes and return all the classes that are valid models. 659 643 * This will inflect the class, causing it to be loaded in to memory. … … 676 660 677 661 /** 678 * isValidModelClass679 *680 662 * Checks if what is passed is a valid Doctrine_Record 681 663 * Will load class in to memory in order to inflect it and find out information about the class … … 708 690 709 691 /** 710 * getConnectionByTableName711 *712 692 * Get the connection object for a table by the actual table name 693 * FIXME: I think this method is flawed because a individual connections could have the same table name 713 694 * 714 695 * @param string $tableName … … 731 712 732 713 /** 733 * generateModelsFromDb 734 * 735 * method for importing existing schema to Doctrine_Record classes 714 * Method for importing existing schema to Doctrine_Record classes 736 715 * 737 716 * @param string $directory Directory to write your models to … … 747 726 748 727 /** 749 * generateYamlFromDb750 *751 728 * Generates models from database to temporary location then uses those models to generate a yaml schema file. 752 729 * This should probably be fixed. We should write something to generate a yaml schema file directly from the database. … … 777 754 778 755 /** 779 * generateModelsFromYaml780 *781 756 * Generate a yaml schema file from an existing directory of models 782 757 * … … 795 770 796 771 /** 797 * createTablesFromModels798 *799 772 * Creates database tables for the models in the specified directory 800 773 * … … 808 781 809 782 /** 810 * createTablesFromArray811 *812 783 * Creates database tables for the models in the supplied array 813 784 * … … 821 792 822 793 /** 823 * generateSqlFromArray824 * 825 * @param string$array826 * @return void794 * Generate a array of sql for the passed array of models 795 * 796 * @param array $array 797 * @return array $sql 827 798 */ 828 799 public static function generateSqlFromArray($array) … … 832 803 833 804 /** 834 * generateSqlFromModels 835 * 836 * @param string $directory 805 * Generate a sql string to create the tables from all loaded models 806 * or the models found in the passed directory. 807 * 808 * @param string $directory 837 809 * @return string $build String of sql queries. One query per line 838 810 */ … … 850 822 851 823 /** 852 * generateYamlFromModels853 *854 824 * Generate yaml schema file for the models in the specified directory 855 825 * … … 866 836 867 837 /** 868 * createDatabases869 *870 838 * Creates databases for connections 871 839 * … … 879 847 880 848 /** 881 * dropDatabases882 *883 849 * Drops databases for connections 884 850 * … … 892 858 893 859 /** 894 * dumpData895 *896 860 * Dump data to a yaml fixtures file 897 861 * … … 908 872 909 873 /** 910 * loadData911 *912 874 * Load data from a yaml fixtures file. 913 875 * The output of dumpData can be fed to loadData … … 929 891 930 892 /** 931 * migrate932 *933 893 * Migrate database to specified $to version. Migrates from current to latest if you do not specify. 934 894 * … … 946 906 947 907 /** 948 * generateMigrationClass949 *950 908 * Generate new migration class skeleton 951 909 * … … 961 919 962 920 /** 963 * generateMigrationsFromDb921 * Generate a set of migration classes from an existing database 964 922 * 965 923 * @param string $migrationsPath … … 975 933 976 934 /** 977 * generateMigrationsFromModels935 * Generate a set of migration classes from an existing set of models 978 936 * 979 937 * @param string $migrationsPath Path to your Doctrine migration classes … … 990 948 991 949 /** 992 * getTable950 * Get the Doctrine_Table object for the passed model 993 951 * 994 952 * @param string $tableName … … 1001 959 1002 960 /** 1003 * compile 1004 * 1005 * method for making a single file of most used doctrine runtime components 961 * Method for making a single file of most used doctrine runtime components 1006 962 * including the compiled file instead of multiple files (in worst 1007 963 * cases dozens of files) can improve performance by an order of magnitude … … 1018 974 1019 975 /** 1020 * autoload1021 *1022 976 * simple autoload function 1023 977 * returns true if the class was loaded, otherwise false … … 1052 1006 1053 1007 /** 1054 * dump1055 *1056 1008 * dumps a given variable 1057 1009 *