Posts: 71
Threads: 16
Joined: Jul 2017
Reputation:
0
Can I extend the ci4 db classes??
Posts: 1,284
Threads: 65
Joined: Oct 2014
Reputation:
82
Theoretically, yes, though it could get pretty tricky now that I think about it. What are you trying to do?
Posts: 71
Threads: 16
Joined: Jul 2017
Reputation:
0
I want alert the aggregator methods and also add new methods to suit my project.
Posts: 1,284
Threads: 65
Joined: Oct 2014
Reputation:
82
Adding methods is probably better done in a new base Model class, I would think.
As for anything more complex, I think you'll basically have to setup an entire set of Handlers, like you were setting up a new database the system knew about. That would include Builder, Connection, Forge, PreparedQuery, and Result classes. Each of those would just extend the MySQLi or Postgre files, per your need. This is needed, unfortunately, due to the way that class files are loaded within the database system. Kind of a pain, and probably something that needs to be looked into at some point.
Posts: 71
Threads: 16
Joined: Jul 2017
Reputation:
0
??? what I intend, is not expected to be restrictive to model only. And an entirely new handler, that's pained. I would have to modify session class and others where db is used..