public function init()
 {
     parent::init();
     // $this->products   = craft()->moltin_products;
     // $this->cart       = craft()->moltin_cart;
     // $this->currencies = craft()->moltin_currencies;
 }
 /**
  * Initializes the application component.
  *
  * @return null
  */
 public function init()
 {
     parent::init();
     // Import this here to ensure that libs like SimplePie are using our version of the class and not any server's
     // random version.
     require_once Craft::getPathOfAlias('app.vendor.simplepie.simplepie.idn.') . DIRECTORY_SEPARATOR . 'idna_convert.class.php';
 }
Example #3
0
 public function init()
 {
     parent::init();
     $this->mailers = Craft::app()->getComponent('sproutEmail_mailer');
     $this->entries = Craft::app()->getComponent('sproutEmail_entries');
     $this->campaigns = Craft::app()->getComponent('sproutEmail_campaigns');
     $this->notifications = Craft::app()->getComponent('sproutEmail_notifications');
 }
Example #4
0
 public function init()
 {
     parent::init();
     $this->link = Craft::app()->getComponent('sproutFields_linkField');
     $this->email = Craft::app()->getComponent('sproutFields_emailField');
     $this->emailSelect = Craft::app()->getComponent('sproutFields_emailSelectField');
     $this->phone = Craft::app()->getComponent('sproutFields_phoneField');
 }
Example #5
0
 /**
  * Do the ole' craft()->cache switcharoo.
  *
  * @return null
  */
 public function init()
 {
     switch (craft()->config->get('cacheMethod')) {
         case CacheMethod::APC:
             /** @var _cacheComponent ApcCache */
             $this->_cacheComponent = new ApcCache();
             $this->_cacheComponent->useApcu = craft()->config->get('useApcu', ConfigFile::ApcCache);
             break;
         case CacheMethod::Db:
             /** @var _cacheComponent DbCache */
             $this->_cacheComponent = new DbCache();
             $this->_cacheComponent->gCProbability = craft()->config->get('gcProbability', ConfigFile::DbCache);
             $this->_cacheComponent->cacheTableName = craft()->db->getNormalizedTablePrefix() . craft()->config->get('cacheTableName', ConfigFile::DbCache);
             $this->_cacheComponent->autoCreateCacheTable = true;
             break;
         case CacheMethod::EAccelerator:
             /** @var _cacheComponent EAcceleratorCache */
             $this->_cacheComponent = new EAcceleratorCache();
             break;
         case CacheMethod::File:
             /** @var _cacheComponent FileCache */
             $this->_cacheComponent = new FileCache();
             $this->_cacheComponent->cachePath = craft()->config->get('cachePath', ConfigFile::FileCache);
             $this->_cacheComponent->gCProbability = craft()->config->get('gcProbability', ConfigFile::FileCache);
             break;
         case CacheMethod::MemCache:
             /** @var _cacheComponent MemCache */
             $this->_cacheComponent = new MemCache();
             $this->_cacheComponent->servers = craft()->config->get('servers', ConfigFile::Memcache);
             $this->_cacheComponent->useMemcached = craft()->config->get('useMemcached', ConfigFile::Memcache);
             break;
         case CacheMethod::Redis:
             /** @var _cacheComponent RedisCache */
             $this->_cacheComponent = new RedisCache();
             $this->_cacheComponent->hostname = craft()->config->get('hostname', ConfigFile::RedisCache);
             $this->_cacheComponent->port = craft()->config->get('port', ConfigFile::RedisCache);
             $this->_cacheComponent->password = craft()->config->get('password', ConfigFile::RedisCache);
             $this->_cacheComponent->database = craft()->config->get('database', ConfigFile::RedisCache);
             $this->_cacheComponent->timeout = craft()->config->get('timeout', ConfigFile::RedisCache);
             break;
         case CacheMethod::WinCache:
             /** @var _cacheComponent WinCache */
             $this->_cacheComponent = new WinCache();
             break;
         case CacheMethod::XCache:
             /** @var _cacheComponent XCache */
             $this->_cacheComponent = new XCache();
             break;
         case CacheMethod::ZendData:
             /** @var _cacheComponent ZendDataCache */
             $this->_cacheComponent = new ZendDataCache();
             break;
     }
     // Init the cache component.
     $this->_cacheComponent->init();
     // Init the cache service.
     parent::init();
 }
 /**
  * Initialize service.
  *
  * @codeCoverageIgnore
  */
 public function init()
 {
     parent::init();
     // Also use html expressions for twig/json/atom/rss templates
     $this->_expressions['twig'] = $this->_expressions['html'];
     $this->_expressions['json'] = $this->_expressions['html'];
     $this->_expressions['atom'] = $this->_expressions['html'];
     $this->_expressions['rss'] = $this->_expressions['html'];
 }
 public function init()
 {
     parent::init();
     $this->entries = Craft::app()->getComponent('sproutForms_entries');
     $this->fields = Craft::app()->getComponent('sproutForms_fields');
     $this->forms = Craft::app()->getComponent('sproutForms_forms');
     $this->groups = Craft::app()->getComponent('sproutForms_groups');
     $this->settings = Craft::app()->getComponent('sproutForms_settings');
 }
 public function init()
 {
     parent::init();
     $this->meta = Craft::app()->getComponent('sproutSeo_meta');
     $this->defaults = Craft::app()->getComponent('sproutSeo_metaDefaults');
     $this->overrides = Craft::app()->getComponent('sproutSeo_metaOverrides');
     $this->sitemap = Craft::app()->getComponent('sproutSeo_sitemap');
     $this->settings = Craft::app()->getComponent('sproutSeo_settings');
     $this->redirects = Craft::app()->getComponent('sproutSeo_redirects');
 }
 public function init()
 {
     // Use the Multipass secret to derive two cryptographic keys,
     // one for encryption, one for signing
     parent::init();
     $settings = craft()->plugins->getPlugin('shopifyMultipass')->getSettings();
     $multipassSecret = $settings['multipassSecret'];
     $this->shopUrl = $settings['shopUrl'];
     $keyMaterial = hash('sha256', $multipassSecret, true);
     $this->encryptionKey = substr($keyMaterial, 0, 16);
     $this->signatureKey = substr($keyMaterial, 16, 16);
 }
Example #10
0
 /**
  * {@inheritdoc} CApplicationComponent::init()
  */
 public function init()
 {
     Craft::import('plugins.sitemap.library.*');
     parent::init();
 }
 /**
  *
  */
 function __construct()
 {
     parent::init();
     $this->_iterationCount = craft()->config->get('phpPass-iterationCount');
 }
Example #12
0
 /**
  * Init
  */
 public function init()
 {
     $this->plugin = craft()->plugins->getPlugin('social');
     parent::init();
 }
Example #13
0
 /**
  * During startup, fetch settings from our plugin / config
  *
  * @return Void
  */
 public function init()
 {
     parent::init();
     $this->initPluginSettings();
 }
Example #14
0
 public function init()
 {
     parent::init();
 }