https://www.mediawiki.org/wiki/Special:Code/MediaWiki/109662

Revision: 109662
Author:   jeroendedauw
Date:     2012-01-20 23:47:19 +0000 (Fri, 20 Jan 2012)
Log Message:
-----------
added some docs

Modified Paths:
--------------
    trunk/extensions/EducationProgram/includes/EPDBObject.php

Modified: trunk/extensions/EducationProgram/includes/EPDBObject.php
===================================================================
--- trunk/extensions/EducationProgram/includes/EPDBObject.php   2012-01-20 
23:18:17 UTC (rev 109661)
+++ trunk/extensions/EducationProgram/includes/EPDBObject.php   2012-01-20 
23:47:19 UTC (rev 109662)
@@ -2,15 +2,24 @@
 
 /**
  * Abstract base class for representing objects that are stored in some DB 
table.
+ * This is basically an ORM-like wrapper around rows in database tables that
+ * aims to be both simple and very flexible. It is centered around an 
associative
+ * array of fields and various methods to do common interaction with the 
database.
  *
  * These methods must be implemented in deriving classes:
- * * getDBTable
- * * getFieldPrefix
  * * getFieldTypes
  *
  * These methods are likely candidates for overriding:
  * * getDefaults
+ * * removeFromDB
+ * * insertIntoDB
+ * * updateInDB
+ * * loadSummaryFields
  *
+ * Deriving classes must register their table and field prefix in 
$egEPDBObjects.
+ * Syntax: $egEPDBObjects['DrivingClassName'] = array( 'table' => 
'table_name', 'prefix' => 'fieldprefix_' );
+ * Example: $egEPDBObjects['EPOrg'] = array( 'table' => 'ep_orgs', 'prefix' => 
'org_' );
+ *
  * @since 0.1
  *
  * @file EPDBObject.php
@@ -43,6 +52,7 @@
 
        /**
         * If the object should log changes.
+        * Can be changed via disableLogging and enableLogging.
         *
         * @since 0.1
         * @var bool
@@ -51,6 +61,7 @@
 
        /**
         * The database connection to use for read operations.
+        * Can be changed via @see setReadDb.
         *
         * @since 0.2
         * @var integer DB_ enum


_______________________________________________
MediaWiki-CVS mailing list
[email protected]
https://lists.wikimedia.org/mailman/listinfo/mediawiki-cvs

Reply via email to