本文整理汇总了PHP中AppHelper::__construct方法的典型用法代码示例。如果您正苦于以下问题:PHP AppHelper::__construct方法的具体用法?PHP AppHelper::__construct怎么用?PHP AppHelper::__construct使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类AppHelper
的用法示例。
在下文中一共展示了AppHelper::__construct方法的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: array
/**
* 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: __construct
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: __construct
/**
* 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: __construct
/**
* @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: __construct
/**
* 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: __construct
/**
* 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: __construct
/**
* 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: array
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: __construct
/**
* 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: __construct
/**
* 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: __construct
public function __construct($app)
{
// call parent constructor
parent::__construct($app);
// set params as DATA class
$this->params = $this->app->data->create(array());
}
示例12: __construct
/**
* @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: __construct
/**
* Constructor
*
*/
public function __construct(View $View, $settings = array())
{
foreach ($this->config['full'] as $key => $value) {
$this->{$key} = $value;
}
return parent::__construct($View, $settings);
}
示例14: __construct
public function __construct($app)
{
parent::__construct($app);
$this->userhelper = $this->app->user;
$this->_user = $this->userhelper->get();
$this->application = $this->app->zoo->getApplication();
}
示例15:
function __construct()
{
parent::__construct();
$this->_cssDir = WWW_ROOT . 'css' . DS;
$this->_jsDir = WWW_ROOT . 'js' . DS;
$this->_rootDir = WWW_ROOT;
}