title: loadModel() throws unexpected error in Cakephp 3
body: <p>I am struggling with trying to load a model into a component. </p>
  
  <p>I am integrating Stripe subscription-handling into a Cakephp 3.3 app, and am currently working on capturing and dealing with webhooks. Most of what I am doing is working well, however I run into trouble when I try to load the 'Users' and 'Plans' models in the SubscriptionComponent.</p>
  
  <p>Here is the error message returned to Stripe by the app when I send a test webhook:</p>
  
  <pre><code>&lt;response&gt;
    &lt;message&gt;Call to undefined method App\Controller\Component\SubscriptionComponent::loadModel()&lt;/message&gt;
    &lt;url&gt;/subscriptions/stripeHook&lt;/url&gt;
    &lt;code&gt;500&lt;/code&gt;
  &lt;/response&gt;
  </code></pre>
  
  <p>This is an abbreviated version of the SubscriptionsController:</p>
  
  <pre><code>namespace App\Controller;
  
  use App\Controller\AppController;
  use App\Controller\Component;
  use App\Controller\Users;
  use App\Model\Table\PlansTable;
  use App\Model\Table\UsersTable;
  use App\Model\Entity\Plan;
  use App\Model\Entity\User;
  use Cake\Core\Configure;
  use Cake\Event\Event;
  use Cake\Mailer\MailerAwareTrait;
  use Cake\ORM\TableRegistry;
  use Cake\Utility\Inflector;
  
  class SubscriptionsController extends AppController
  {
  use MailerAwareTrait;
  
  public function beforeFilter(Event $event)
  {
      parent::beforeFilter($event);
      // allow access to stripeHook without needing a user to be logged in
      $this-&gt;Auth-&gt;allow(['stripeHook']);
  
      // $this-&gt;viewBuilder()-&gt;layoutPath('App')-&gt;layout('default');
  }
  
  public function stripeHook()
  {
      if ($this-&gt;request-&gt;is('post')) 
      {
          \Stripe\Stripe::setApiKey(Configure::read('Stripe.secret'));
          $this-&gt;autoRender = false;
          $input = @file_get_contents('php://input');
          $event = json_decode($input);
          try 
          { // Check against Stripe to confirm that the ID is valid
              $event = \Stripe\Event::retrieve($event-&gt;id);
              $handlerName = Inflector::variable(str_replace(".", "_", $event-&gt;type)) . "Hook";
              if (method_exists($this, $handlerName))
              {
                  $status = $this-&gt;$handlerName($event);
                  $log_message = 'StripeHOOK: ' . $status . var_export($event);
                  $this-&gt;log($log_message,'info');
                  echo var_dump($status);
              }
              else 
              {
                  echo 'Not interested: ' . $handlerName;
              }
          } 
          catch (Exception $e) 
          {
              $log_message = 'StripeHOOK - No event found for: ' . $event-&gt;id; 
              $this-&gt;log($log_message,'info');
          }
      }
      http_response_code(200); 
  }
  
  public function customerSubscriptionCreatedHook($event)
  {
      return $this-&gt;customerSubscriptionUpdatedHook($event);
  }
  
  public function customerSubscriptionUpdatedHook($event)
  {
      $this-&gt;loadComponent('Subscription');
      $status = false;
      $result = $this-&gt;Subscription-&gt;updateSubscription($event-&gt;data-&gt;object);
      return $status;
  }
  </code></pre>
  
  <p>This is the (also abbreviated) SubscriptionComponent:</p>
  
  <pre><code>namespace App\Controller\Component;
  
  use App\Model\Table\PlansTable;
  use App\Model\Table\UsersTable;
  use Cake\Controller\Component;
  use Cake\Controller\ComponentRegistry;
  
  class SubscriptionComponent extends Component
  {
  protected $_defaultConfig = [];
  
  public function updateSubscription($stripePlan)
  {
      //
      // @NOTE: This appears to be where the error is raised
      //
      $this-&gt;loadModel('Plans');
      $this-&gt;loadModel('Users');
      $status = false;
      $customer = $stripePlan-&gt;customer;
      $plan = $stripePlan-&gt;plan-&gt;id;
      $user = $this-&gt;Users-&gt;find('all', ['conditions' =&gt; ['User.stripe_id' =&gt; $customer]]);
      $user = $user-&gt;first();
      $plan = $this-&gt;Plans-&gt;find('all', ['conditions' =&gt; ['Plan.stripe_id' =&gt; $plan]]);
      $plan = $plan-&gt;first();
      return $status;
  }   
  }
  </code></pre>
  
  <p>I'm still learning CakePhp, so please be patient with me:-) I'm sure this is something simple - just not obvious to me yet.</p>
  
  <p>Any help at all will be greatly appreciated! Thx</p>