title: How to get an instance of a loaded library in codeigniter
body: <p>I am trying to get an instance of a loaded library in codeigniter, but am having difficulty. I have in my controller:</p>
  
  <pre><code>$arguments=array('login'=&gt;'***','pass'=&gt;'***');  ;                   
  $this-&gt;load-&gt;library('mailer', $arguments);
  </code></pre>
  
  <p>My constructors first line looks like:</p>
  
  <pre><code>public function __construct($arr)
  </code></pre>
  
  <p>This appears to work.</p>
  
  <p>When I add: the next line in my controller:</p>
  
  <pre><code>$phpmail = new Mailer;
  </code></pre>
  
  <p>I get the following:</p>
  
  <pre><code>Severity: Warning
  
  Message: Missing argument 1 for Mailer::__construct(),
  </code></pre>
  
  <p>How can I get a new instance of this library in my controller?</p>
  
  <p>Thanks in advance,</p>
  
  <p>Bill</p>