1 <?php // vim: set binary noeol et sts=4 sw=4 :
4 require_once 'DB/DataObject.php';
6 class T_DBO_Docente extends DB_DataObject
8 var $_database = 'taller';
9 var $__table = 'docente';
16 function staticGet($k, $v = NULL)
18 return DB_DataObject::staticGet('T_DBO_Docente', $k, $v);
21 // now define your table structure.
22 // key is column name, value is type
26 'id' => DB_DATAOBJECT_INT,
27 'nombre' => DB_DATAOBJECT_STR,
28 'mail' => DB_DATAOBJECT_STR,
29 'corrige' => DB_DATAOBJECT_INT + DB_DATAOBJECT_BOOL,
33 // now define the keys.
41 * @return array Cursos en los que está el docente.
43 function getCursos($activo = true)
45 $c = DB_DataObject::factory('curso');
49 $c->cuatrimestre = (date('n') < 8) ? 1 : 2; // Hasta agosto es 1er cuat
51 $cd = DB_DataObject::factory('curso_docente');
59 $c->get($cd->curso_id);