Пример #1
0
 /**
  * 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);
 }
Пример #2
0
 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;
 }
Пример #3
0
 public function __construct()
 {
     parent::__construct('user', '\\Shibboleth\\User', 'user_id');
 }
Пример #4
0
 public function __construct()
 {
     parent::__construct('admin', '\\Shibboleth\\Admin', 'user_id');
 }
Пример #5
0
 public function __construct($session)
 {
     parent::__construct($session, "SpacesStore");
 }
Пример #6
0
 function __construct($db)
 {
     parent::__construct($db);
 }