[eluser]jjDeveloper[/eluser]
Codeigniter uses the MVC design pattern so study up on the principles of that pattern then read how it applies to CI in the documentation.
here is a subclass in ci
Code:
class YourController extends CI_Controller {
public function __construct() {
parent::__construct();
$this->load->library('your-document-class-name');
$this->load->library('your-email-class-name');
}
public function Index() {
$this->your-document-class-name->classFunction($someData);
$this->your-email-class-name->classFunction($someData);
}
}
or put the class in the core folder and extend CI_Controller
Code:
class someController extends MY_YourDocumentClassName {
public function Index() {
$this->subclassFuntion($someData);
}
}
I would suggest going over the documentation thoroughly as it is jam packed with information regarding this.