DB_DATAOBJECT_INT, 'padron' => DB_DATAOBJECT_INT, 'curso_id' => DB_DATAOBJECT_INT, 'mail' => DB_DATAOBJECT_STR, 'activo' => DB_DATAOBJECT_INT + DB_DATAOBJECT_BOOL, ); } // now define the keys. function keys() { return array('id'); } function getFrom($padron, $activo = true) { $this->padron = $padron; if (!is_null($activo)) $this->activo = $activo ? 1 : 0; return $this->find(true); } } ?>