Hello
I have a problem with extending the method of existing model.
Here is the example. The user model located in the file:
/application/model/subscriptions_model.php :
Code:
class Subscriptions_model extends App_Model {
public function __construct() {
parent::__construct();
}
public function get_child_invoices($id) {
return $child;
}}
I'd like to extend method of the model in the new file `
/application/model/my_subscriptions_model.php`.
Code:
class My_subscriptions_model extends Subscriptions_model {
public function __construct() {
parent::__construct();
}
public get_child_invoices($id) {
return $child;
}}
The goal is to rewrite existing method
get_child_invoices of
Subscriptions_model .
Is it possible to resolve this issue?
Or as a way to expand the subscription controller
Subscriptions (/application/controllers/subscription.php) and call the another module.
Thank you.