title: How to properly pass settings to component in CakePHP
body: <p>I'm using CakePhp 2.2.3 and I'm making a component.</p>
  
  <p>Component:</p>
  
  <pre><code>App::uses('Component', 'Controller');
  class ExampleComponent extends Component {
  
  public $settings = array();
  
  protected $_defaults = array(
      'a1' =&gt; null,
      'a2' =&gt; 2
  );
  
  public function __construct(ComponentCollection $collection, $settings = array()) {
  
      $settings = array_merge($this-&gt;_defaults, $settings);
      $this-&gt;settings = $settings;
  
  }
  
  public function sum() {
      $sum = $this-&gt;settings['a1'] + $this-&gt;settings['a2'];
      return $sum;
  }
  
  }
  </code></pre>
  
  <p>Controller:</p>
  
  <pre><code>class ExampleController extends AppController {
  public $components = array('Example');
  
  public function index () {
      $this-&gt;set('sum', $this-&gt;Example-&gt;sum(array('a1' =&gt; 2, 'a2' =&gt; 3)));
  }
  }
  </code></pre>
  
  <p>I got back (int) 2 as the result. But I think it should be 5.
  What I do wrong?</p>