title: CakePHP Calling Component Constructor with argument
body: <p>I am using cakephp 2.1 version and created a component as GoogleApiComponent as follows.</p>
  
  <pre><code>class GoogleApiComponent extends Component {
    public $client;
    public $analytics;
    function __construct($prompt = null) {
        $this-&gt;client = new apiClient();
        $this-&gt;client-&gt;setApprovalPrompt($prompt);
        $this-&gt;analytics = new apiAnalyticsService($this-&gt;client);
    }
  </code></pre>
  
  <p>}</p>
  
  <p>Then in AppController, I included the above component.</p>
  
  <pre><code>public $components = array('GoogleApi');
  </code></pre>
  
  <p>After an user logs in, I have to check some conditions in beforeFilter() method of AppController and according to that conditions I have to change the argument of GoogleAPiComponent Constructor.
  So How this get it done? the work is more appreciable.. </p>