当前位置: 首页>>代码示例>>PHP>>正文


PHP JLoader::load方法代码示例

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


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

示例1: fetchElement

 /**
  * Fetch custom Element view.
  *
  * @param   string  $name          Field Name.
  * @param   mixed   $value         Field value.
  * @param   mixed   $node          Field node.
  * @param   mixed   $control_name  Field control_name/Id.
  *
  * @since   2.2
  * @return   null
  */
 public function fetchElement($name, $value, $node, $control_name)
 {
     $db = JFactory::getDBO();
     $user = JFactory::getUser();
     // While edit: get profile store id
     $app = JFactory::getApplication();
     $jinput = $app->input;
     $id = $jinput->get('id');
     $defaultStore_id = 0;
     // Load tax helper.
     $path = JPATH_SITE . DS . "components" . DS . "com_quick2cart" . DS . 'helpers' . DS . "taxHelper.php";
     if (!class_exists('taxHelper')) {
         JLoader::register('taxHelper', $path);
         JLoader::load('taxHelper');
     }
     $taxHelper = new taxHelper();
     if ($id) {
         $defaultStore_id = $taxHelper->getTaxProfileStoreId($id);
     }
     $storeList = $taxHelper->getStoreListForTaxprofile();
     $options = array();
     foreach ($storeList as $store) {
         $storename = ucfirst($store['title']);
         $options[] = JHtml::_('select.option', $store['store_id'], $storename);
     }
     $fieldName = $name;
     return JHtml::_('select.genericlist', $options, $fieldName, 'class="inputbox required"  size="1"  ', 'value', 'text', $defaultStore_id, $control_name);
 }
开发者ID:BetterBetterBetter,项目名称:B3App,代码行数:39,代码来源:taxprofilestorelist.php

示例2: autoload

 public static function autoload($className)
 {
     Doctrine::autoload($className);
     Doctrine::modelsAutoload($className);
     JLoader::load($className);
     return true;
 }
开发者ID:eliasrosa,项目名称:eJoomla,代码行数:7,代码来源:conexao.php

示例3: fetchElement

 /**
  * Fetch custom Element view.
  *
  * @param   string  $name          Field Name.
  * @param   mixed   $value         Field value.
  * @param   mixed   $node          Field node.
  * @param   mixed   $control_name  Field control_name/Id.
  *
  * @since   2.2
  * @return   null
  */
 public function fetchElement($name, $value, $node, $control_name)
 {
     $db = JFactory::getDBO();
     $user = JFactory::getUser();
     $comquick2cartHelper = new comquick2cartHelper();
     // Getting user accessible store ids
     $storeList = $comquick2cartHelper->getStoreIds();
     $options = array();
     $app = JFactory::getApplication();
     $jinput = $app->input;
     $zone_id = $jinput->get('id');
     $defaultSstore_id = 0;
     if ($zone_id) {
         // Load Zone helper.
         $path = JPATH_SITE . DS . "components" . DS . "com_quick2cart" . DS . 'helpers' . DS . "zoneHelper.php";
         if (!class_exists('zoneHelper')) {
             JLoader::register('zoneHelper', $path);
             JLoader::load('zoneHelper');
         }
         $zoneHelper = new zoneHelper();
         $defaultSstore_id = $zoneHelper->getZoneStoreId($zone_id);
     }
     foreach ($storeList as $store) {
         $storename = ucfirst($store['title']);
         $options[] = JHtml::_('select.option', $store['store_id'], $storename);
     }
     $fieldName = $name;
     return JHtml::_('select.genericlist', $options, $fieldName, 'class="inputbox required"  size="1"  ', 'value', 'text', $defaultSstore_id, $control_name);
 }
开发者ID:BetterBetterBetter,项目名称:B3App,代码行数:40,代码来源:zonestorelist.php

示例4: StoreAllAttribute

 function StoreAllAttribute($item_id, $allAttrib, $sku, $client)
 {
     // get  attributeid list FROM POST
     $attIdList = array();
     foreach ($allAttrib as $attributes) {
         if (!empty($attributes['attri_id'])) {
             $attIdList[] = $attributes['attri_id'];
         }
     }
     // DEL EXTRA ATTRIBUTES
     if (!class_exists('productHelper')) {
         // require while called from backend
         JLoader::register('productHelper', JPATH_SITE . DS . 'components' . DS . 'com_quick2cart' . DS . 'helpers' . DS . 'product.php');
         JLoader::load('productHelper');
     }
     //THIS  DELETE db attributes which is not present now or removed
     $productHelper = new productHelper();
     $productHelper->deleteExtaAttribute($item_id, $attIdList);
     if (!class_exists('quick2cartModelAttributes')) {
         // require while called from backend
         JLoader::register('quick2cartModelAttributes', JPATH_SITE . DS . 'components' . DS . 'com_quick2cart' . DS . 'models' . DS . 'attributes.php');
         JLoader::load('quick2cartModelAttributes');
     }
     $quick2cartModelAttributes = new quick2cartModelAttributes();
     foreach ($allAttrib as $key => $attr) {
         $attr['sku'] = $sku;
         $attr['client'] = $client;
         $attr['item_id'] = $item_id;
         // Dont consider empty attributes
         if (!empty($attr['attri_name'])) {
             $quick2cartModelAttributes->store($attr);
         }
     }
 }
开发者ID:BetterBetterBetter,项目名称:B3App,代码行数:34,代码来源:product.php

示例5: __construct

 public function __construct()
 {
     parent::__construct();
     // Load all required helpers.
     $component_path = JPATH_ROOT . DS . 'components' . DS . 'com_jticketing';
     if (!file_exists($component_path)) {
         return;
     }
     $jticketingmainhelperPath = JPATH_ROOT . DS . 'components' . DS . 'com_jticketing' . DS . 'helpers' . DS . 'main.php';
     if (!class_exists('jticketingmainhelper')) {
         JLoader::register('jticketingmainhelper', $jticketingmainhelperPath);
         JLoader::load('jticketingmainhelper');
     }
     $jticketingfrontendhelper = JPATH_ROOT . DS . 'components' . DS . 'com_jticketing' . DS . 'helpers' . DS . 'frontendhelper.php';
     if (!class_exists('jticketingfrontendhelper')) {
         JLoader::register('jticketingfrontendhelper', $jticketingfrontendhelper);
         JLoader::load('jticketingfrontendhelper');
     }
     $jteventHelperPath = JPATH_ROOT . DS . 'components' . DS . 'com_jticketing' . DS . 'helpers' . DS . 'event.php';
     if (!class_exists('jteventHelper')) {
         JLoader::register('jteventHelper', $jteventHelperPath);
         JLoader::load('jteventHelper');
     }
     ApiResource::addIncludePath(dirname(__FILE__) . '/jticket');
 }
开发者ID:yalive,项目名称:com_api-plugins,代码行数:25,代码来源:jticket.php

示例6: getApiInstance

 /**
  * Internal service functions
  *
  * @return	object
  */
 protected function getApiInstance()
 {
     if (!$this->gplusClient) {
         JLoader::load('Google_Client');
         JLoader::load('Google_PlusService');
         $this->gplusClient = new google_api\Google_Client();
         $sitename = JFactory::getConfig()->get('sitename');
         $this->gplusClient->setApplicationName($sitename);
         $this->gplusClient->setClientId($this->client_id);
         $this->gplusClient->setClientSecret($this->client_secret);
         $requestVisibleActions = array('http://schemas.google.com/AddActivity');
         $this->gplusClient->setRequestVisibleActions($requestVisibleActions);
         if (isset($this->channel->id) && $this->channel->id) {
             require_once dirname(__FILE__) . '/../../controllers/gpluschannels.php';
             $url = AutotweetControllerGplusChannels::getCallbackUrl($this->channel->id);
             $this->gplusClient->setRedirectUri($url);
         }
         $access_token = $this->getAccessToken();
         if (empty($access_token)) {
             $this->gplusClient->setDeveloperKey($this->developer_key);
         } else {
             $this->gplusClient->setAccessToken($access_token);
         }
         $this->gplus = new google_api\Google_PlusService($this->gplusClient);
     }
     return $this->gplusClient;
 }
开发者ID:johngrange,项目名称:wookeyholeweb,代码行数:32,代码来源:gplus.php

示例7: fetchElement

 /**
  * Fetch custom Element view.
  *
  * @param   string  $name          Field Name.
  * @param   mixed   $value         Field value.
  * @param   mixed   $node          Field node.
  * @param   mixed   $control_name  Field control_name/Id.
  *
  * @since   2.2
  * @return   null
  */
 public function fetchElement($name, $value, $node, $control_name)
 {
     $db = JFactory::getDBO();
     $user = JFactory::getUser();
     // Load Zone helper.
     $path = JPATH_SITE . DS . "components" . DS . "com_quick2cart" . DS . 'helpers' . DS . "zoneHelper.php";
     JLoader::register('zoneHelper', $path);
     JLoader::load('zoneHelper');
     $zoneHelper = new zoneHelper();
     // Get user's accessible zone list
     $zoneList = $zoneHelper->getUserZoneList('', array(1));
     $options = array();
     $app = JFactory::getApplication();
     $jinput = $app->input;
     $taxrate_id = $jinput->get('id');
     $defaultZoneid = "";
     if ($taxrate_id) {
         $defaultZoneid = $zoneHelper->getZoneFromTaxRateId($taxrate_id);
     }
     foreach ($zoneList as $zone) {
         $zoneName = ucfirst($zone['name']);
         $options[] = JHtml::_('select.option', $zone['id'], $zoneName);
     }
     $fieldName = $name;
     return JHtml::_('select.genericlist', $options, $fieldName, 'class="inputbox required"  size="1"  ', 'value', 'text', $defaultZoneid, $control_name);
 }
开发者ID:BetterBetterBetter,项目名称:B3App,代码行数:37,代码来源:zonelist.php

示例8: createChannel

 /**
  * createChannel
  *
  * @param   F0FTable  &$channel  Param
  *
  * @return	object
  */
 protected function createChannel(&$channel)
 {
     $channeltype = F0FModel::getTmpInstance('Channeltypes', 'AutoTweetModel');
     $classname = $channeltype->getChannelClass($channel->channeltype_id);
     JLoader::load($classname);
     if (!class_exists($classname)) {
         throw new Exception('Unable to load channel type (' . $channel->channeltype_id . ')');
     }
     return new $classname($channel);
 }
开发者ID:johngrange,项目名称:wookeyholeweb,代码行数:17,代码来源:channelfactory.php

示例9: loadHelper

 private static function loadHelper($class, $path, $prefix = null)
 {
     if (empty($prefix)) {
         global $ext_prefix;
         $prefix = $ext_prefix;
     }
     $class = $prefix . ucfirst($class);
     JLoader::register($class, $path);
     JLoader::load($class);
 }
开发者ID:JexyRu,项目名称:Ksenmart,代码行数:10,代码来源:helper.php

示例10: getInstance

 /**
  * getInstance
  *
  * @param   array  $data  Param
  *
  * @return	object
  */
 public static function getInstance($data)
 {
     JLoader::register('AutotweetIsgdService', dirname(__FILE__) . '/autotweetisgd.php');
     JLoader::register('AutotweetBitlyService', dirname(__FILE__) . '/autotweetbitly.php');
     JLoader::register('AutotweetTinyurlcomService', dirname(__FILE__) . '/autotweettinyurlcom.php');
     JLoader::register('AutotweetYourlsService', dirname(__FILE__) . '/autotweetyourls.php');
     $classname = 'AutoTweet' . $data['type'] . 'Service';
     JLoader::load($classname);
     return new $classname($data);
 }
开发者ID:johngrange,项目名称:wookeyholeweb,代码行数:17,代码来源:autotweeturlshortservicefactory.php

示例11: getVersion

 function getVersion()
 {
     if (!class_exists('comquick2cartHelper')) {
         $path = JPATH_SITE . DS . 'components' . DS . 'com_quick2cart' . DS . 'helper.php';
         JLoader::register('comquick2cartHelper', $path);
         JLoader::load('comquick2cartHelper');
     }
     $helperobj = new comquick2cartHelper();
     echo $latestversion = $helperobj->getVersion();
     jexit();
 }
开发者ID:BetterBetterBetter,项目名称:B3App,代码行数:11,代码来源:dashboard.php

示例12: getApiInstance

 /**
  * getApiInstance
  *
  * @return	object
  */
 protected function getApiInstance()
 {
     if (!$this->linkedin) {
         $API_CONFIG = array('appKey' => $this->get('api_key'), 'appSecret' => $this->get('secret_key'), 'callbackUrl' => null);
         JLoader::load('LinkedIn');
         $this->linkedin = new SimpleLinkedIn\LinkedIn($API_CONFIG);
         $ACCESS_TOKEN = array('oauth_token' => $this->get('oauth_user_token'), 'oauth_token_secret' => $this->get('oauth_user_secret'));
         $this->linkedin->setTokenAccess($ACCESS_TOKEN);
     }
     return $this->linkedin;
 }
开发者ID:johngrange,项目名称:wookeyholeweb,代码行数:16,代码来源:linkedinbase.php

示例13: getPaymentVars

 function getPaymentVars($pg_plugin, $order_id)
 {
     if (!class_exists('socialadsModelpayment')) {
         //require_once $path;
         JLoader::register('socialadsModelpayment', JPATH_SITE . DS . 'components' . DS . 'com_socialads' . DS . 'models' . DS . 'payment.php');
         JLoader::load('socialadsModelpayment');
     }
     $socialadsModelpayment = new socialadsModelpayment();
     return $socialadsModelpayment->getPaymentVars($pg_plugin, $order_id, $payPerAd = 1);
     /*
     		require(JPATH_SITE.DS."administrator".DS."components".DS."com_socialads".DS."config".DS."config.php");
     		$orderdata = $this->getdetails($order_id);
     			$pg_plugin=$orderdata['pg_plugin'];
     			$vars = new stdclass;
     			$vars->order_id=$orderdata['order_id'];
     			$socialadshelper= new socialadshelper();
     			$orderdata['ad_title']=$socialadshelper->getAdInfo($orderdata['adid'],'ad_title');
     			if(!empty($orderdata['payment_type']))
     			$vars->payment_type=$orderdata['payment_type'];
     			else
     			$vars->payment_type="";
     			$vars->user_id=JFactory::getUser()->id;
     			$vars->user_name=JFactory::getUser()->name;
     			$vars->user_firstname=JFactory::getUser()->name;
     			$vars->user_email=JFactory::getUser()->email;
     			$vars->item_name = JText::_('ADVERTISEMENT').$orderdata['ad_title']['0']->ad_title;
     			$msg_fail=JText::_( 'ERROR_SAVE' );
     			$vars->return = JRoute::_(JUri::root()."index.php?option=com_socialads&view=managead&layout=list");
     			$vars->submiturl = JRoute::_("index.php?option=com_socialads&controller=showad&task=confirmpayment&processor={$pg_plugin}");
     			$vars->cancel_return = JRoute::_(JUri::root()."index.php?option=com_socialads&view=managead&layout=list&processor={$pg_plugin}",$msg_fail);
     			$vars->url=$vars->notify_url= JRoute::_(JUri::root()."?option=com_socialads&controller=showad&task=processpayment&pg_nm={$pg_plugin}&pg_action=onTP_Processpayment&order_id=".$orderdata['order_id']);
     			$vars->currency_code = $socialads_config['currency'];
     			$vars->amount = $orderdata['amount'];
     			$vars->client="socialads";
     			$vars->success_message = $orderdata['success_message'];
     			if($vars->payment_type=='recurring')
     			{
     				$vars->notify_url= $vars->url=$vars->url."&payment_type=recurring";
     				$vars->recurring_startdate=$orderdata['recurring_startdate'];
     				$vars->recurring_payment_interval_unit="days";
     				$vars->recurring_payment_interval_totaloccurances=$orderdata['recurring_payment_interval_totaloccurances'];
     				$vars->recurring_payment_interval_length=$orderdata['recurring_payment_interval_length'];
     
     
     			}
     			return $vars;
     			* */
 }
开发者ID:politik86,项目名称:test2,代码行数:48,代码来源:showad.php

示例14: onAfterInitialise

	public function onAfterInitialise() {
		
		$key = $this->params->get('apiKey');

		if(strlen($key)) {
			if(FMSTS_JVERSION == '16') {
				$path = JPATH_ROOT . DS . 'plugins' . DS . 'system' . DS . 'fmsts' .DS. 'fmsts' .DS . 'mail.php';
			} else {
				$path = JPATH_ROOT . DS . 'plugins' . DS . 'system' . DS . 'fmsts' .DS . 'mail.php';
			}
			
			JLoader::register('JMail', $path );
			JLoader::load('JMail');

		} else {
			return JError::raiseWarning( 500, JText::_('NO_APIKEY_SPECIFIED_FOR_MAILCHIMP_STS_PLUGIN') );
		}	
	}
开发者ID:srbsnkr,项目名称:sellingonlinemadesimple,代码行数:18,代码来源:fmsts.php

示例15: doAutoload

 /**
  * Finds path to file containing requested class
  * according to sh404sef naming conventions
  * Feed that filename to JLoader so that
  * it gets loaded next
  *
  * Can be
  *       PrefixControllerSuffix
  *       PrefixModelSuffix
  *       PrefixHelperSuffix
  *       PrefixTableSuffix
  *       PrefixElementSuffix
  *       PrefixViewHelperSuffix
  *       PrefixClassSuffix
  *       PrefixAdapterSuffix
  *       PrefixExceptionSuffix
  *       PrefixFactory
  * with Prefix = 'Sh404sef'
  *
  * Classes are aways stored in backend, in Sh404sef folder
  * file is in controllers subdir (resp views, models, helpers)
  * file is named suffix.php
  *
  * @param string $class the class to load
  */
 public static function doAutoload($class)
 {
     // check if not already there
     if (class_exists($class)) {
         return true;
     }
     // check if not ours
     if (substr($class, 0, 8) != self::$_prefix) {
         return false;
     }
     // root path for including files
     $basePath = JPATH_ADMINISTRATOR . DS . 'components' . DS . 'com_sh404sef';
     // easy : is it our factory ?
     if ($class == self::$_prefix . 'Factory') {
         $classes = JLoader::register($class, $basePath . DS . strtolower($class) . '.php');
         $loaded = JLoader::load($class);
         return $loaded;
     }
     // if not our factory
     $types = array('Controller', 'Model', 'Helper', 'ViewHelper', 'Table', 'Element', 'Class', 'Adapter', 'Exception');
     foreach ($types as $type) {
         $suffix = self::matchClassName(self::$_prefix, $type, $class);
         if ($suffix) {
             // we found a class name that matches our pattern,
             // make JLoader find it, with a special case for view helpers
             if ($type == 'ViewHelper') {
                 $fileName = $basePath . DS . 'views' . DS . strtolower($suffix) . DS . 'helpers.php';
             } else {
                 // simplistic pluralization
                 $plural = strtolower($type) . (strtolower(substr($type, -1)) == 's' ? 'es' : 's');
                 $fileName = $basePath . DS . $plural . DS . strtolower($suffix) . '.php';
             }
             $classes = JLoader::register($class, $fileName);
             // go straight to exit
             break;
         }
     }
     // we must call explicitely Jloadeer::load. We could simply return false
     // so that it's called automatically later on, but that would fail
     // if several extensions use the same system, as __autoload (hence JLoader)
     // can be fired before one of the copies of our autoloader
     $loaded = JLoader::load($class);
     return $loaded;
 }
开发者ID:justinlyon,项目名称:scc,代码行数:69,代码来源:autoloader.php


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