• 设为首页
  • 点击收藏
  • 手机版
    手机扫一扫访问
    迪恩网络手机版
  • 关注官方公众号
    微信扫一扫关注
    迪恩网络公众号

PHP AppHelper类代码示例

原作者: [db:作者] 来自: [db:来源] 收藏 邀请

本文整理汇总了PHP中AppHelper的典型用法代码示例。如果您正苦于以下问题:PHP AppHelper类的具体用法?PHP AppHelper怎么用?PHP AppHelper使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。



在下文中一共展示了AppHelper类的20个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的PHP代码示例。

示例1: create

 public static function create()
 {
     self::$urls = \Config::get('panel.panelControllers');
     $config = \Serverfireteam\Panel\Link::allCached();
     $dashboard = array();
     $appHelper = new AppHelper();
     // Make Dashboard Items
     foreach ($config as $value) {
         $modelName = $value['url'];
         if (in_array($modelName, self::$urls)) {
             $model = "Serverfireteam\\Panel\\" . $modelName;
         } else {
             $model = $appHelper->getNameSpace() . $modelName;
         }
         //if (class_exists($value)) {
         if ($value['show_menu']) {
             $user = \Auth::guard('panel')->user();
             if (!$user->hasRole('super')) {
                 if (!\Auth::guard('panel')->user()->hasPermission($modelName . 'all')) {
                     continue;
                 }
             }
             $dashboard[] = array('modelName' => $modelName, 'title' => $value['display'], 'count' => $model::count(), 'showListUrl' => 'panel/' . $modelName . '/all', 'addUrl' => 'panel/' . $modelName . '/edit');
         }
     }
     return $dashboard;
 }
开发者ID:serverfireteam,项目名称:panel,代码行数:27,代码来源:dashboard.php


示例2: __construct

 /**
  * Initializes context.
  * Every scenario gets its own context object.
  */
 public function __construct()
 {
     $this->doctrineHelper = new DoctrineHelper();
     $appHelper = new AppHelper();
     $appHelper->initApp();
     $appBuilderFactory = new TestAppBuilderFactory();
     $appBuilder = $appBuilderFactory->createAppBuilder("Web", ".");
     $appBuilder->buildApp();
     $this->container = $appBuilder->getContainer();
     $this->passwordHasher = $this->container->resolve('Conpago\\Helpers\\Contract\\IPasswordHasher');
     $this->jar = new CookieJar();
     $this->client = new Client();
 }
开发者ID:bartoszgolek,项目名称:PHPers,代码行数:17,代码来源:Context+.php


示例3: testRead

 /**
  * @depends testWrite
  */
 public function testRead()
 {
     $help = AppHelper::Instance();
     $drive = new File_d();
     $key = "testFile";
     $this->assertTrue($drive->enabled(), "is drive ok?(testRead)");
     $this->assertTrue($drive->Info() == $drive->Info(), "is drive ok?(testRead)");
     $this->assertEquals($this->_val, $drive->get($key), "get the cache with the key:" . $key);
     //传入参数
     $options = array("prefix" => "newCache");
     $drive = new File_d($options);
     $this->assertEquals($this->_val . "newCache", $drive->get($key), "get the newCache with the key:" . $key);
     //关闭校验和
     $this->assertEquals($this->_val, $drive->get($key . "noCheck"), "get the newCache with the key: noCheck" . $key);
     //关闭压缩
     $this->assertEquals($this->_val, $drive->get($key . "noCompress"), "get the newCache with the key: noCompress" . $key);
     //都关闭
     $this->assertEquals($this->_val, $drive->get($key . "noAll"), "get the newCache with the key: noAll" . $key);
     //校验出错
     $options = array("temp" => __DIR__ . "/Md5");
     $drive = new File_d($options);
     //传入时间,1秒,保证过期
     $drive->set($key . "expire", $this->_val, 1);
     sleep(2);
     //传入时间,1秒,保证过期
     $this->assertEquals(false, $drive->get($key . "expire"), "the key will be out of time ");
     //校验码出错
     $this->assertEquals(false, $drive->get($key . "testMd5"), "md5 error" . $key);
     //不存在的键
     $this->assertEquals(false, $drive->get($key), "the key not exist:" . $key);
     //TODO:
     \Registers\Driver::getInstance();
 }
开发者ID:BPing,项目名称:PHPCbping,代码行数:36,代码来源:File_dTest.php


示例4: passLayout

 public static function passLayout()
 {
     $id = AppHelper::getLayoutId();
     $layout = Layout::find($id);
     //return $layout->full_layout;
     eval('?' . '>' . $layout->full_layout);
 }
开发者ID:BDMADE,项目名称:laracms,代码行数:7,代码来源:AdminLayoutController.php


示例5: 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();
 }
开发者ID:ranium,项目名称:CakePHP-Paypal-IPN-Plugin,代码行数:42,代码来源:paypal.php


示例6: beforeLayout

 public function beforeLayout($viewFile)
 {
     parent::beforeLayout($viewFile);
     $js = array('/high_charts/js/highcharts');
     $theme = $this->_getTheme($this->chart_name);
     $exportingEnabled = $this->_checkExporting($this->chart_name);
     if ($exportingEnabled) {
         $js[] = '/high_charts/js/modules/exporting';
     }
     switch ($theme) {
         case 'gray':
         case 'grid':
         case 'dark-blue':
         case 'dark-green':
         case 'skies':
             $js[] = '/high_charts/js/themes/' . $theme;
             break;
         default:
             // $js[] = '/high_charts/js/themes/highroller';
             break;
     }
     $this->Html->css('high_charts/css/highroller');
     $this->Html->script($js, FALSE);
     return true;
 }
开发者ID:galtech,项目名称:cakephp-highcharts-plugin,代码行数:25,代码来源:HighChartsHelper.php


示例7: __construct

 /**
  * 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);
 }
开发者ID:miznokruge,项目名称:base-cake,代码行数:11,代码来源:GravatarHelper.php


示例8: beforeLayout

 public function beforeLayout($viewFile)
 {
     parent::beforeLayout($viewFile);
     $js = array('/highcharts/js/highcharts', '/highcharts/js/highcharts-more');
     $theme = $this->_getTheme($this->chart_name);
     $exportingEnabled = $this->_checkExporting($this->chart_name);
     $options3dEnabled = $this->_checkOptions3d($this->chart_name);
     $drillDownEnabled = $this->_checkDrillDown($this->chart_name);
     if ($exportingEnabled) {
         $js[] = '/highcharts/js/modules/exporting';
     }
     if ($options3dEnabled) {
         $js[] = '/highcharts/js/highcharts-3d.js';
     }
     if ($drillDownEnabled) {
         array_push($js, '/highcharts/js/modules/drilldown');
     }
     switch ($theme) {
         case 'gray':
         case 'grid':
         case 'dark-blue':
         case 'dark-green':
         case 'skies':
             $js[] = '/highcharts/js/themes/' . $theme;
             break;
         default:
             // $js[] = '/highcharts/js/themes/highroller';
             break;
     }
     $this->Html->css('highcharts/css/highroller');
     $this->Html->script($js, false);
     return true;
 }
开发者ID:Mortex68,项目名称:ExtazCMS,代码行数:33,代码来源:HighchartsHelper.php


示例9: __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);
 }
开发者ID:kailIII,项目名称:Gawfa-Microfinance,代码行数:13,代码来源:TimeHelper.php


示例10: __construct

 /**
  * 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);
 }
开发者ID:burzum,项目名称:cakephp-bz-utils,代码行数:13,代码来源:TableHelper.php


示例11: array

 function __construct(View $view, $settings = array())
 {
     parent::__construct($view, $settings);
     foreach ($settings as $key => $value) {
         $this->{$key} = $value;
     }
 }
开发者ID:abhilashlohar,项目名称:Housingmatters,代码行数:7,代码来源:LinkedinHelper.php


示例12: __contruct

 /**
  * Constructor
  *
  * @access public
  */
 public function __contruct()
 {
     foreach ($this->config['full'] as $key => $value) {
         $this->{$key} = $value;
     }
     return parent::__construct();
 }
开发者ID:hiltongoncalves,项目名称:Comments,代码行数:12,代码来源:cleaner.php


示例13: __set

 public function __set($name, $val)
 {
     switch ($name) {
         default:
             return parent::__set($name, $val);
     }
 }
开发者ID:pdkhuong,项目名称:BBG,代码行数:7,代码来源:LayoutHelper.php


示例14: __construct

 /**
  * 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;
 }
开发者ID:JBZoo,项目名称:Zoo-Changelog,代码行数:12,代码来源:database.php


示例15: __construct

 /**
  * 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;
     }
 }
开发者ID:Adnan0703,项目名称:CakePHP-NiceAdmin,代码行数:12,代码来源:StatusLightsHelper.php


示例16: __construct

 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);
 }
开发者ID:arodu,项目名称:SearchComponent-cakephp,代码行数:7,代码来源:SearchHelper.php


示例17: __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);
	}
开发者ID:neterslandreau,项目名称:tubones,代码行数:11,代码来源:Cleaner.php


示例18: __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);
	}
开发者ID:renan,项目名称:asset_compress,代码行数:12,代码来源:AssetCompressHelper.php


示例19: __construct

 /**
 * 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);
 }
开发者ID:beckye67,项目名称:Icing,代码行数:14,代码来源:ShareHelper.php


示例20: __construct

 /**
  * __construct method
  */
 public function __construct(View $view, $settings = array())
 {
     parent::__construct($view, $settings);
     App::import("Model", 'Book');
     $Book = new Book();
     $this->calibrePath = $Book->getCalibrePath();
 }
开发者ID:cc2i,项目名称:calibrephp,代码行数:10,代码来源:ImageHelper.php



注:本文中的AppHelper类示例整理自Github/MSDocs等源码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。


鲜花

握手

雷人

路过

鸡蛋
该文章已有0人参与评论

请发表评论

全部评论

专题导读
上一篇:
PHP AppKernel类代码示例发布时间:2022-05-23
下一篇:
PHP AppDocument类代码示例发布时间:2022-05-23
热门推荐
阅读排行榜

扫描微信二维码

查看手机版网站

随时了解更新最新资讯

139-2527-9053

在线客服(服务时间 9:00~18:00)

在线QQ客服
地址:深圳市南山区西丽大学城创智工业园
电邮:jeky_zhao#qq.com
移动电话:139-2527-9053

Powered by 互联科技 X3.4© 2001-2213 极客世界.|Sitemap