コード例 #1
1
 /**
  * Setup the config based on either the Configure::read() values
  * or the PaypalIpnConfig in config/paypal_ipn_config.php
  *
  * Will attempt to read configuration in the following order:
  *   Configure::read('PaypalIpn')
  *   App::import() of config/paypal_ipn_config.php
  *   App::import() of plugin's config/paypal_ipn_config.php
  */
 function __construct()
 {
     $this->config = Configure::read('PaypalIpn');
     if (empty($this->config)) {
         $importConfig = array('type' => 'File', 'name' => 'PaypalIpn.PaypalIpnConfig', 'file' => CONFIGS . 'paypal_ipn_config.php');
         if (!class_exists('PaypalIpnConfig')) {
             App::import($importConfig);
         }
         if (!class_exists('PaypalIpnConfig')) {
             // Import from paypal plugin configuration
             $importConfig['file'] = 'config' . DS . 'paypal_ipn_config.php';
             App::import($importConfig);
         }
         if (!class_exists('PaypalIpnConfig')) {
             trigger_error(__d('paypal_ipn', 'PaypalIpnConfig: The configuration could not be loaded.', true), E_USER_ERROR);
         }
         if (!PHP5) {
             $config =& new PaypalIpnConfig();
         } else {
             $config = new PaypalIpnConfig();
         }
         $vars = get_object_vars($config);
         foreach ($vars as $property => $configuration) {
             if (strpos($property, 'encryption_') === 0) {
                 $name = substr($property, 11);
                 $this->encryption[$name] = $configuration;
             } else {
                 $this->config[$property] = $configuration;
             }
         }
     }
     parent::__construct();
 }
コード例 #2
0
ファイル: merchant.php プロジェクト: camigreen/ttop
 public function __construct($app)
 {
     parent::__construct($app);
     $application = $this->app->zoo->getApplication();
     $this->params = $this->app->store->get()->params;
     $this->testMode = $this->app->store->merchantTestMode();
 }
コード例 #3
0
 /**
  * Constructor
  *
  * @param View $View the view object the helper is attached to.
  * @param array $settings Settings array Settings array
  */
 public function __construct(View $View, $settings = array())
 {
     if (isset($settings['niceFormat'])) {
         $this->niceFormat = $settings['niceFormat'];
     }
     parent::__construct($View, $settings);
 }
コード例 #4
0
ファイル: jbmigratecart.php プロジェクト: alexmixaylov/real
 /**
  * @param App $app
  */
 public function __construct($app)
 {
     parent::__construct($app);
     $this->_migrate = $this->app->jbmigrate;
     $this->_element = $this->app->jbcartelement;
     $this->_confModel = JBModelConfig::model();
 }
コード例 #5
0
ファイル: archive.php プロジェクト: NavaINT1876/ccustoms
 /**
  * Class constructor
  *
  * @param string $app App instance.
  * @since 2.0
  */
 public function __construct($app)
 {
     parent::__construct($app);
     // increase memory limit
     @ini_set('memory_limit', '256M');
     $app->loader->register('PclZip', 'libraries:pcl/pclzip.lib.php');
 }
コード例 #6
0
ファイル: menu.php プロジェクト: JBZoo/Zoo-Changelog
 /**
  * Class constructor
  *
  * @param string $app App instance.
  * @since 2.0
  */
 public function __construct($app)
 {
     parent::__construct($app);
     // load class
     $this->app->loader->register('AppTree', 'classes:tree.php');
     $this->app->loader->register('AppMenu', 'classes:menu.php');
 }
コード例 #7
0
ファイル: Cleaner.php プロジェクト: neterslandreau/tubones
/**
 * Constructor
 *
 */
	public function __construct($View = null) {
		$this->View = $View;
		foreach ($this->config['full'] as $key => $value) {
			$this->{$key} = $value;
		}
		return parent::__construct($this->View);
	}
コード例 #8
0
ファイル: CommentsHelper.php プロジェクト: cepedag14/phkondo
 function __construct(View $view, $settings = array())
 {
     parent::__construct($view, $settings);
     if (!empty($this->request->params['models'])) {
         $this->_defaultOptions['model'] = key($this->request->params['models']);
     }
 }
コード例 #9
0
/**
 * Constructor - finds and parses the ini file the plugin uses.
 *
 * @return void
 */
	public function __construct(View $View, $settings = array()) {
		if (empty($settings['noconfig'])) {
			$config = AssetConfig::buildFromIniFile();
			$this->config($config);
		}
		parent::__construct($View, $settings);
	}
コード例 #10
0
ファイル: jbevent.php プロジェクト: alexmixaylov/real
 /**
  * Class constructor
  * @param App $app
  */
 public function __construct($app)
 {
     parent::__construct($app);
     $this->_event = $this->app->event;
     $this->_position = $this->app->jbcartposition;
     $this->_element = $this->app->jbcartelement;
 }
コード例 #11
0
ファイル: environment.php プロジェクト: knigherrant/decopatio
 public function __construct($app)
 {
     // call parent constructor
     parent::__construct($app);
     // set params as DATA class
     $this->params = $this->app->data->create(array());
 }
コード例 #12
0
ファイル: jbimport.php プロジェクト: alexmixaylov/real
 /**
  * @param App $app
  */
 public function __construct($app)
 {
     parent::__construct($app);
     // make sure the line endings are recognized irrespective of the OS
     $this->app->jbenv->maxPerformance();
     ini_set('auto_detect_line_endings', true);
 }
コード例 #13
0
 /**
  * Constructor
  *
  */
 public function __construct(View $View, $settings = array())
 {
     foreach ($this->config['full'] as $key => $value) {
         $this->{$key} = $value;
     }
     return parent::__construct($View, $settings);
 }
コード例 #14
0
ファイル: customer.php プロジェクト: camigreen/ttop
 public function __construct($app)
 {
     parent::__construct($app);
     $this->userhelper = $this->app->user;
     $this->_user = $this->userhelper->get();
     $this->application = $this->app->zoo->getApplication();
 }
コード例 #15
0
ファイル: packager.php プロジェクト: uuking/wildflower
 function __construct()
 {
     parent::__construct();
     $this->_cssDir = WWW_ROOT . 'css' . DS;
     $this->_jsDir = WWW_ROOT . 'js' . DS;
     $this->_rootDir = WWW_ROOT;
 }
コード例 #16
0
ファイル: transifex.php プロジェクト: unrealprojects/journal
 public function __construct($app)
 {
     // call parent constructor
     parent::__construct($app);
     // set cache
     $this->cache = $this->app->cache->create($this->app->path->path('cache:') . '/zoolanders/transifex/data', true, '3600', 'apc');
 }
コード例 #17
0
 /**
  * Constructor, initiallizes the FileUpload Component
  * and sets the default options.
  */
 function __construct(View $View, $settings = array())
 {
     parent::__construct($View, $settings);
     $this->FileUploadSettings = new FileUploadSettings();
     //setup settings
     $this->settings = array_merge($this->FileUploadSettings->defaults, $settings, $this->options);
 }
コード例 #18
0
ファイル: cupcake.php プロジェクト: BlinKy/forum
 /**
  * Load forum settings
  * @access public
  * @return void
  */
 public function __construct()
 {
     parent::__construct();
     $Config = ForumConfig::getInstance();
     $this->version = $Config->version;
     $this->settings = $Config->settings;
 }
コード例 #19
0
 /**
  * Constructor
  *
  */
 public function __construct($View = null, $config = array())
 {
     $config += $this->_defaultConfig;
     // Default the secure option to match the current URL.
     $config['secure'] = env('HTTPS');
     parent::__construct($View, $config);
 }
コード例 #20
0
 public function __construct(View $View, $settings = array())
 {
     $this->_prefix = isset($settings['prefix']) ? $settings['prefix'] : $this->_prefix;
     $this->_View = $View;
     $this->request = $View->request;
     parent::__construct($View, $settings);
 }
コード例 #21
0
ファイル: ShareHelper.php プロジェクト: beckye67/Icing
 /**
 * Add settings.
 * @example
 	public $helpers = array('Icing.Share' => array(
 		'popup' => false,
 	));
 */
 public function __construct(View $View, $settings = array())
 {
     if (empty($settings)) {
         $settings = $this->defaults;
     }
     return parent::__construct($View, $settings);
 }
コード例 #22
0
 /**
  * Construct the helper and assign the passed settings
  * @param View $view
  * @param array $settings
  */
 public function __construct(View $view, $settings = array())
 {
     parent::__construct($view, $settings);
     if (!empty($settings)) {
         $this->settings = $settings;
     }
 }
コード例 #23
0
 /**
  * Default Constructor
  *
  * @param View $View The View this helper is being attached to.
  * @param array $settings Configuration settings for the helper.
  */
 public function __construct(View $View, $settings = array())
 {
     $defaults = array('chaining' => true);
     $settings = array_merge($defaults, $settings);
     $this->chaining = $settings['chaining'];
     parent::__construct($View, $settings);
 }
コード例 #24
0
ファイル: database.php プロジェクト: JBZoo/Zoo-Changelog
 /**
  * Class Constructor
  *
  * @param App $app A reference to the global app object
  */
 public function __construct($app)
 {
     parent::__construct($app);
     // set database
     $this->_database = $this->app->system->dbo;
     $this->name = $this->_database->name;
 }
コード例 #25
0
 function __construct(View $view, $settings = array())
 {
     parent::__construct($view, $settings);
     foreach ($settings as $key => $value) {
         $this->{$key} = $value;
     }
 }
コード例 #26
0
ファイル: cleaner.php プロジェクト: hiltongoncalves/Comments
 /**
  * Constructor
  *
  * @access public
  */
 public function __contruct()
 {
     foreach ($this->config['full'] as $key => $value) {
         $this->{$key} = $value;
     }
     return parent::__construct();
 }
コード例 #27
0
 /**
  * @constructor
  */
 public function __construct(View $View, $settings = array())
 {
     parent::__construct($View, $settings);
     $this->mapper = $this->parseLangHeaders();
     $this->langCode = $this->findLangCode();
     $this->countryCode = $this->findCountryCode();
 }
コード例 #28
0
ファイル: ImageHelper.php プロジェクト: cc2i/calibrephp
 /**
  * __construct method
  */
 public function __construct(View $view, $settings = array())
 {
     parent::__construct($view, $settings);
     App::import("Model", 'Book');
     $Book = new Book();
     $this->calibrePath = $Book->getCalibrePath();
 }
コード例 #29
0
 /**
  *  http://www.paypalobjects.com/de_DE/html/IntegrationCenter/ic_std-variable-reference.html
  *  Setup the config based on Config settings
  */
 public function __construct(View $View, $settings = array())
 {
     $this->settings = $this->_defaults;
     if ($x = Configure::read('Localization.decimalPoint')) {
         $this->settings['dec'] = $x;
     }
     if ($x = Configure::read('Localization.thousandsSeparator')) {
         $this->settings['sep'] = $x;
     }
     $this->settings = array_merge($this->settings, (array) Configure::read('PayPal'));
     if ($this->settings['live']) {
         $this->formOptions['server'] = 'https://www.paypal.com';
     } else {
         $this->formOptions['server'] = 'https://www.sandbox.paypal.com';
     }
     $data = array('HTTP_HOST' => HTTP_HOST, 'HTTP_BASE' => HTTP_BASE);
     $this->formOptions['notify_url'] = String::insert($this->settings['notify_url'], $data, array('before' => '{', 'after' => '}', 'clean' => true));
     $this->formOptions['business'] = $this->settings['email'];
     $this->formOptions['lc'] = $this->settings['locale'];
     $this->formOptions['amount'] = $this->settings['amount'];
     $this->formOptions['no_shipping'] = (int) (!$this->settings['shipping']);
     $this->formOptions['currency_code'] = $this->settings['currency_code'];
     if ($this->settings['cancel_return']) {
         $this->formOptions['cancel_return'] = Router::url(null, true);
     }
     //pr($this->formOptions); die();
     parent::__construct($View, $settings);
 }
コード例 #30
0
/**
 * Construct the helper and make the backend helper.
 *
 * @param string $options
 * @return void
 */
	public function __construct($View, $options = array()) {

		$this->_myName = strtolower(get_class($this));
		$this->settings = array_merge($this->settings, $options);

		if ($this->_myName !== 'toolbarhelper') {
			parent::__construct($View, $options);
			return;
		}

		if (!isset($options['output'])) {
			$options['output'] = 'DebugKit.HtmlToolbar';
		}
		App::import('Helper', $options['output']);
		$className = $options['output'];
		if (strpos($options['output'], '.') !== false) {
			list($plugin, $className) = explode('.', $options['output']);
		}
		$this->_backEndClassName = $className;
		$this->helpers[$options['output']] = $options;
		if (isset($options['cacheKey']) && isset($options['cacheConfig'])) {
			$this->_cacheKey = $options['cacheKey'];
			$this->_cacheConfig = $options['cacheConfig'];
			$this->_cacheEnabled = true;
		}

		parent::__construct($View, $options);

	}