1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214
|
; Example INI File
[DB]
;portability = 15
; if you are working with oracle (or plan to) - this will do things
; like force lowercase table names (see the PEAR DB manual
[DB_DataObject]
database = mysql://username:password@localhost/database
; the default database dsn see pear spec for more details
schema_location = /home/me/Projects/myapplication/DataObjects
;directory where the database ini files are..
; ini_{databaseName} = /path/to/ini/file.ini:/path/to_another_ini/file.ini
; you can also configure manually the ini_file location
; (and the links is expected to be in the
; same location) for each database by using the syntax
; use a PATH_SEPERATOR to load multiple files.
; BEST USED WITH database_{databasename} = dsn...
; links_{databaseName} = /path/to/databases/links.ini
; allows you to specify a specific links.ini file for a database
; or project.
class_location = /home/me/Projects/myapplication/DataObjects
; directory where the Table classes are..
; you can also use the format
; /home/me/Projects/myapplication/DataObjects_%s.php
; and %s gets replaced with the tablename.
; to use multiple search paths use the PATH_SEPERATOR
require_prefix = DataObjects/
; prefix for the 'require statement'
class_prefix = DataObjects_
; Prefix Mapping of table name to PHP Class
; to use multiple prefixes seperate them with PATH_SEPERATOR
;table_example = example
; use database example for table example
;database_example = mysql://username:password@host/database
; use this dsn for database example
;db_driver = DB
; can be set to MDB2 or DB
; uses MDB2 backend rather than PEAR DB
;disable_null_strings = false
; DataObjects will convert the text value 'null' to NULL when building queries
; this may cause problems! Setting to true will turn off this feature.
; you can use DB_DataObject_Cast::SQL('NULL'); in where you have to turn this off.
;
; can also be set to 'full' however - this may delete data quietly if properties are
; not fetched and are set *** Highly recommended not to use this..
; the generator settings (optional)
;extends_location =
; string added to php file for 'include('DB/DataObject');'
; usefull if you want to add an extra layer - eg. a table level auth scheme..
; optional :: default = DB/DataObject.php
; if set to empty, then no 'require_once' line will be added - usefull for
; autoloading.
;extends =
; string used in Table_XXX extends YYYY {
; usefull if you want to add an extra layer - eg. a table level auth scheme..
; optional :: default = DB_DataObject
;generator_class_rewrite =
; alter the extends field when updating a class (defaults to only replacing DB_DataObject)
; use ANY to will replace all extends with either DB_DataObject or the value of extends (above)
; use specific_name to replace 'specific_name' with either DB_DataObject or the value of extends (above)
;generator_novars =
; (True) prevents writing of private/var's so you can overload get/set
; note: this has the downside of making code less clear... (alot of magic!!)
;generator_var_keyword = 'var'
; var|public - (or private if you want to break things)
; The variable prefix that is used when class properties are created
; the default is public for PHP5, and var for PHP4
;generator_add_validate_stubs =
; (True) will insert / (or add to existing files) stubs for validate methods
;generator_no_ini =
; (True) will generate the methods table() ,keys(), sequenceKeys() and defaults()
; methods in the generated classes
; and not generate any ini file to describe the table.
;generator_add_defaults =
; (True) will generate defaults() method in generated classes
; returning an array of the defaults column values for the table.
;generator_omit_database_var
; (false) will prevent generation of $database line in generated files
;generate_links = false
; (true) will create the links.ini from the table definition
; Only available with mysql / mysqli / postgres at present.
;generate_link_methods = false
; (true) will create the wrappers around link()
; => function($k) { return $k; } // to munge the column name into a method name.
; Only available with mysql / mysqli / postgres at present.
;generate_setters = false
; (true) will generate setXXXX() methods for you.
;generate_getters = false
; (true) will generate getXXXX() methods for you.
debug = 0
; default debugging level
debug_ignore_updates = 0
; behaviour changed in > 0.10 so that you have to manually turn of updates
; rather than it automatically being done by setting debug to > 1
dont_die = 0
; if you set this to true or 1, then dataobjects will not die
; on major errors like database connection etc. or programming errors
; - you probably want to do this on a live server - and
; write a pear error handler.. - to send you an email!
;quote_identifiers = 0
; Quote table and column names when building queries - this relies on the
; quoteIdentifier method being available in PEAR::DB (it should be introduced in 1.5 final or 1.6)
;quote_identifiers_tableinfo = 0
; Quote table and column names when generator sends tableinfo to request schema
; Note - this can be on for most databases, but must be off for Oracle (see bug #10112)
;keep_query_after_fetch = 0
; From 1.4 on the query building will be cleared after a fetch(1.5), or find(1.4)
; To disable this behavior set this to 1
dont_use_pear_sequences = 0
; If a table does not have a Native (autoincrement etc.) - and it has a primary
; key, it is assumed that the table should use pear's getNextID to
; emulate sequences.. - if this is not required set this to 1
;generator_include_regex = /^FOO_.*/i
;generator_exclude_regex = /^tmp_.*/i
; include and exclude tables from being read by the generator
build_views = 0
;for postgres, you can build dataobjects for views as well
; you can set this to 'schema.views' to extract views with schema information
; I believe it postgres also supports updating on views (nice feature)
; *** NOTE *** You will have to manually define keys() / sequenceKeys()
; As the generator can not recognize these automatically
;generator_strip_schema = 1
; postgres has a wierd concept of schema's which end up prefixed to
; the list of tables. - this makes a mess of class/schema generation
; setting this to 1, makes the generator strip the schema from the table name.
; now supports regex (if you set it to a regex it will strip schema of matched names)
; for example '/^public\./'
;generator_secondary_key_match = primary|unique
; set to false to prevent generation of any unique or primary keys that are not autoincrement/nextval()
; portability = 0
; similar to DB's portability setting,
; currently it only lowercases the tablename when you call tableName()
; ---------- DEPRECIATED --------------
;ignore_sequence_keys =
; THIS IS DEPRECIATED NOW - define the method sequenceKey() to return array(false,false)
; to stop useage of sequence keys.
; see sequenceKey Manual page for more details.
;sequence_{tablename} = {column}
; THIS IS DEPRECIATED NOW - define the method sequenceKey() to return array(false,false)
; specify which column is autoincremented/nextval'd
;sequence_{tablename} = {column}:{sequence_name}
; THIS IS DEPRECIATED NOW - define the method sequenceKey() to return array(false,false)
; specify which column is nextval'd, and the sequence name to use for the column.
|