本文整理汇总了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);
}
示例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;
}
示例3: __construct
public function __construct()
{
parent::__construct('user', '\\Shibboleth\\User', 'user_id');
}
示例4: __construct
public function __construct($session)
{
parent::__construct($session, "SpacesStore");
}
示例5:
function __construct($db)
{
parent::__construct($db);
}