[eluser]upstream[/eluser]
Hi all,
Using code igniter. is it possibile to pass a value in a constructor's parameter? like this:
My_Email library
Quote:class My_Email extends CI_Email
{
private $CI;
private $email_account;
public function __construct($config_item = '')
{
$this->CI =& get_instance();
$this->email_account = $this->CI->config->item(($config_item=='' ? 'email_account' : $config_item));
I want to pass an optional config in the constructor so i can use other config item besides the default email_account.
Problem is. i dunno how to pass a value on my constructor in my model since ci load class via $this->load.
i do not want to add any addditional function since im just expanding this class a bit and other modules are already using this.
Please help ^^.
Thanks,
Rico