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


PHP Store::__construct方法代码示例

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


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

示例1: __construct

 /**
  * Constructor
  *
  * @param   array  $options  Optional parameters.
  * @return  void
  */
 public function __construct($options = array())
 {
     if (!self::isAvailable()) {
         throw new Exception(\Lang::txt('JLIB_SESSION_REDIS_EXTENSION_NOT_AVAILABLE'));
     }
     if (!array_key_exists('redis_key_prefix', $options)) {
         $options['redis_key_prefix'] = array();
     }
     $prefixes = $options['redis_key_prefix'];
     if (isset($prefixes['session'])) {
         $this->prefix = $prefixes['session'];
     }
     parent::__construct($options);
 }
开发者ID:mined-gatech,项目名称:framework,代码行数:20,代码来源:Redis.php

示例2: switch

 function __construct()
 {
     $num = func_num_args();
     switch ($num) {
         case 1:
             parent::__construct();
             $this->store_id = func_get_arg(0)->store_id;
             $this->carrefour_store_uid = func_get_arg(0)->carrefour_store_uid;
             $this->name = func_get_arg(0)->name;
             $this->address = func_get_arg(0)->address;
             $this->zipcode = func_get_arg(0)->zipcode;
             $this->city = func_get_arg(0)->city;
             $this->typology_id = func_get_arg(0)->typology_id;
             $this->typology_name = func_get_arg(0)->typology_name;
             $this->code_anabel_store = func_get_arg(0)->code_anabel_store;
             $this->nb_item = 1;
             $this->contact_phone = func_get_arg(0)->contact_phone;
             if (!empty(func_get_arg(0)->image_uri)) {
                 $this->image = func_get_arg(0)->image_uri;
             } else {
                 $this->image = null;
             }
             $this->position = new Point(func_get_arg(0)->gps_latitude, func_get_arg(0)->gps_longitude);
             $this->clean_url = func_get_arg(0)->clean_url;
             static $drive_service_stores = array();
             static $drive_service_default_url = '';
             if (!count($drive_service_stores)) {
                 $drive_service = variable_get('storelocator_services_drive', '');
                 $serviceObj = entity_load('service', array($drive_service));
                 $drive_service_default_url = $serviceObj[$drive_service]->service_url;
                 $results = db_query('SELECT carrefour_store_uid, service_url FROM {carrefour_store_service} WHERE carrefour_service_code = :carrefour_service_code', array('carrefour_service_code' => $serviceObj[$drive_service]->carrefour_service_code));
                 foreach ($results as $result) {
                     $drive_service_stores[$result->carrefour_store_uid] = $result->service_url;
                 }
             }
             $this->carrefour_store_uid = func_get_arg(0)->carrefour_store_uid;
             if (isset($drive_service_stores[$this->carrefour_store_uid])) {
                 if (!empty($drive_service_stores[$this->carrefour_store_uid])) {
                     $this->service_url = $drive_service_stores[$this->carrefour_store_uid];
                 } else {
                     $this->service_url = $drive_service_default_url;
                 }
             } else {
                 $this->service_url = '';
             }
             break;
         case 2:
             $point = new Point(func_get_arg(0), func_get_arg(1));
             $this->position = $point;
             $this->typology_id = 0;
             $this->typology_name = 'NONE';
             $this->gps_latitude = $point->lat;
             $this->gps_longitude = $point->lng;
             break;
         default:
     }
     $this->altitude_mode = "absolute";
     $this->altitude = 0;
 }
开发者ID:singhneeraj,项目名称:fr-store,代码行数:59,代码来源:gmaps-api.class.php

示例3: __construct

 public function __construct()
 {
     parent::__construct('user', '\\Shibboleth\\User', 'user_id');
 }
开发者ID:omaoibrahim,项目名称:chamilo-lms,代码行数:4,代码来源:user.class.php

示例4: __construct

 public function __construct($session)
 {
     parent::__construct($session, "SpacesStore");
 }
开发者ID:negabaro,项目名称:alfresco,代码行数:4,代码来源:SpacesStore.php

示例5:

 function __construct($db)
 {
     parent::__construct($db);
 }
开发者ID:nacho,项目名称:tareas,代码行数:4,代码来源:DebtStore.class.php


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