Skip to content

Commit 868fae5

Browse files
authored
fixes #1
1 parent c540d61 commit 868fae5

File tree

1 file changed

+10
-1
lines changed

1 file changed

+10
-1
lines changed

src/Model.php

Lines changed: 10 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -109,6 +109,15 @@ public static function set_db($db) {
109109

110110
return self::_error('db is not valid');
111111
}
112+
113+
/**
114+
* Get the DB object from the base Model
115+
*
116+
* @return DB
117+
*/
118+
public static function get_db() {
119+
return self::$db;
120+
}
112121

113122
/**
114123
* Register a model for the base class to use proper property data types and some other preps in the future
@@ -433,4 +442,4 @@ public function to_array($get_fields = null) {
433442
}
434443
}
435444

436-
?>
445+
?>

0 commit comments

Comments
 (0)