public function __construct(ComponentCollection $collection, $settings = array())
{
parent::__construct($collection, $settings);
// initialize callback urls
$router = new Router();
$baseurl = $router->url('/', true);
$this->controller = $collection->getController();
$this->http = new Client();
// Load in PHP extension ZIP...?
if (extension_loaded('zip') == true) {
$this->zip = new ZipArchive();
$this->Controller = $collection->getController();
} else {
throw new MissingComponentException(__('Error: Not Load extension "ZIP" in PHP.INI!!'));
}
$this->controller->loadModel('EmailTemplates');
$this->EmailTemplates = $this->controller->EmailTemplates;
/*
// prefetch partner details
$this->Partners = $this->controller->Partners;
$this->partner_id = $this->controller->Auth->user('partner_id');
$this->partner = $this->Partners->get($this->partner_id);
// end prefetch
*/
}