本文整理汇总了PHP中Helper::__construct方法的典型用法代码示例。如果您正苦于以下问题:PHP Helper::__construct方法的具体用法?PHP Helper::__construct怎么用?PHP Helper::__construct使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类Helper
的用法示例。
在下文中一共展示了Helper::__construct方法的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: __construct
public function __construct(View $view, $settings = array())
{
parent::__construct($view, $settings);
foreach ($this->uses as $model) {
$this->{$model} = ClassRegistry::init($model);
}
}
示例2: __construct
public function __construct(View $View, $settings = array())
{
parent::__construct($View, $settings);
$View->element('Pannel.blocks/title');
$View->element('Pannel.blocks/user');
$View->element('Pannel.blocks/menu');
}
示例3: __construct
public function __construct($client, $resource_type, $path, $hash = null)
{
Helper::__construct();
$that =& $this;
// fix exceptional resource types
if (array_key_exists($singular = self::get_singular($resource_type), $this->INCONSISTENT_RESOURCE_TYPES)) {
$resource_type = $this->INCONSISTENT_RESOURCE_TYPES[$singular];
}
$this->client = $client;
$this->resource_type = $resource_type;
$this->path = $path;
$this->resources = array();
$this->methods->index = function ($params = null) use(&$that, &$client, $resource_type, $path) {
if ($resource_type == "session") {
list($resource_type, $path, $hash) = $client->do_get($path, $params);
return new ResourceDetail($client, $resource_type, $path, $hash);
}
list($resource_type, $path, $hash) = $client->do_get($path, $params);
$that->resources = Resource::process($client, $resource_type, $path, $hash);
return $that;
};
$this->methods->create = function ($params = null) use(&$client, $path) {
return $client->do_post($path, $params);
};
if (isset($this->RESOURCE_SPECIAL_ACTIONS[$resource_type])) {
foreach ($this->RESOURCE_SPECIAL_ACTIONS[$resource_type] as $meth => $action) {
$action_path = Helper::insert_in_path($path, $meth);
$this->methods->{$meth} = function ($params = null) use(&$client, $action, $action_path) {
return $client->{$action}($action_path, $params);
};
}
}
}
示例4: __construct
public function __construct(View $view, $settings = array())
{
parent::__construct($view, $settings);
$this->appKey = Configure::read('Pusher.credentials.appKey');
$this->Js->buffer('var pusher = new Pusher(\'' . $this->appKey . '\');');
$this->Js->buffer('Pusher.channel_auth_endpoint = \'' . $this->url(Configure::read('Pusher.channelAuthEndpoint')) . '\'');
}
示例5:
function __construct($params = "")
{
parent::__construct($params);
/**
* Salva configurações desta paginação
*/
}
示例6: __construct
public function __construct($obj)
{
parent::__construct($obj);
$this->fc = FrontController::getInstance();
$this->error = '';
$this->isLoggedIn = $this->isLoggingOut = false;
}
示例7: __construct
public function __construct($View = null, $settings = array())
{
if (class_exists('Packages')) {
Packages::initialize($this, __CLASS__);
}
parent::__construct($View, $settings);
}
示例8: __construct
public function __construct($databasename)
{
try {
parent::__construct($databasename);
} catch (Exception $e) {
echo $e->errorMessage();
}
}
示例9: __construct
/**
* Constructor.
*
* @return void
* @access public
*/
public function __construct(View $View, $settings = array())
{
parent::__construct($View, $settings);
if (get_class($this) == 'BcHtmlHelper' || get_class($this) == 'HtmlHelper') {
$this->_tags['checkboxmultiple'] = '<input type="checkbox" name="%s[]"%s /> ';
$this->_tags['hiddenmultiple'] = '<input type="hidden" name="%s[]" %s />';
}
}
示例10:
/**
* The constructor at this point initializes the
* all the required code for Wiki Help initialization.
*/
function __construct()
{
$this->isHelpInitialized = false;
$this->localizationdata = NULL;
$this->back_params = NULL;
$this->script = NULL;
parent::__construct();
}
示例11: __construct
/**
* Constructor
*/
public function __construct(View $View, $settings = array())
{
$settings = Hash::merge(array('pathWhitelist' => $this->_pathWhitelist), $settings);
parent::__construct($View, $settings);
$plugin = Configure::read('Site.acl_plugin');
App::uses('AclPermission', $plugin . '.Model');
$this->AclPermission = ClassRegistry::init($plugin . '.AclPermission');
}
示例12: __construct
/**
* construct
*
* @param View $View
*/
public function __construct(View $View)
{
parent::__construct($View);
if (ClassRegistry::isKeySet('Page')) {
$this->Page = ClassRegistry::getObject('Page');
} else {
$this->Page = ClassRegistry::init('Page', 'Model');
}
}
示例13: __construct
public function __construct($label, $iso_lang, $country, $ps_version)
{
parent::__construct();
$this->base_folder = 'helpers/help_access/';
$this->tpl = $this->createTemplate('button.tpl');
$this->label = $label;
$this->iso_lang = $iso_lang;
$this->country = $country;
$this->ps_version = $ps_version;
}
示例14: __construct
public function __construct(View $View, $settings = array())
{
parent::__construct($View, $settings);
if (array_key_exists('defaultTheme', $settings) && in_array($settings['defaultTheme'], $this->themes)) {
$this->defaultTheme = $settings['defaultTheme'];
}
if (array_key_exists('secure', $settings)) {
$this->secure = filter_var($secure, FILTER_VALIDATE_BOOLEAN, FILTER_NULL_ON_FAILURE);
}
}
示例15: strtolower
function __construct()
{
parent::__construct();
if (Configure::read('UrlCache.pageFiles')) {
$view =& ClassRegistry::getObject('view');
$path = $view->here;
if ($this->here == '/') {
$path = 'home';
}
$this->_key = '_' . strtolower(Inflector::slug($path));
}
$this->_key = 'url_map' . $this->_key;
$this->_cache = Cache::read($this->_key, '_cake_core_');
}