; 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.. require_prefix = DataObjects/ ; prefix for the 'require statement' class_prefix = DataObjects_ ; Prefix Mapping of table name to PHP Class ;table_example = example ; use database example for table example ;database_example = mysql://username:password@host/database ; use this dsn for database example ; 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 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) 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) ;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 ; 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. ; ignore_sequence_keys = ; THIS IS DEPRECIATED NOW - define the method sequenceKey() to return array(false,false) ;sequence_{tablename} = {column} ; specify which column is autoincremented/nextval'd ;sequence_{tablename} = {column}:{sequence_name} ; specify which column is nextval'd, and the sequence name to use for the column. 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 ; 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