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


PHP Settings::getSettings方法代码示例

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


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

示例1: get

function get()
{
    $settings = new Settings();
    $atlantis = array('lat' => doubleval($settings->getSettings('Atlantis', 'lat')), 'long' => doubleval($settings->getSettings('Atlantis', 'long')));
    $bdd = getBDD();
    $req = $bdd->query('SELECT arr.*, IFNULL(arr2.nom, at_users.nom) nom FROM (SELECT t1.* FROM at_geo t1 LEFT JOIN at_geo t2 ON (t1.mac = t2.mac AND t1.timestamp < t2.timestamp) WHERE t2.timestamp IS NULL AND t1.date = CURDATE()) AS arr LEFT JOIN (SELECT at_devices.mac, at_users.nom FROM at_devices INNER JOIN at_users ON at_devices.username = at_users.id) AS arr2 ON arr.mac = arr2.mac LEFT JOIN at_users ON arr.mac = at_users.cle');
    $result = $req->fetchAll(PDO::FETCH_ASSOC);
    $req->closeCursor();
    http_response_code(202);
    $output = array('atlantis' => $atlantis, 'positions' => $result);
    return $output;
}
开发者ID:nawrasg,项目名称:Atlantis,代码行数:12,代码来源:at_geo.php

示例2: Settings

 function __construct()
 {
     $settings = new Settings();
     $this->oc = $settings->getSettings('ownCloud', 'path');
     $this->admin_username = $settings->getSettings('ownCloud', 'username');
     $this->admin_password = $settings->getSettings('ownCloud', 'password');
 }
开发者ID:nawrasg,项目名称:Atlantis,代码行数:7,代码来源:Owncloud.php

示例3: get

function get()
{
    $pid = (new Settings())->getSettings('Daemon', 'pid');
    if ($pid == -1) {
        $daemon = false;
    } else {
        exec("ps -p {$pid}", $result);
        if (count($result) > 1) {
            $result = $result[1];
            $result = preg_replace("/\\s+/", " ", $result);
            $data = explode(" ", $result);
            if ($data[count($data) - 1] == 'php') {
                $daemon = true;
            } else {
                $daemon = false;
            }
        } else {
            $daemon = false;
        }
    }
    $free_disk = disk_free_space('/') / disk_total_space('/');
    $settings = new Settings();
    $output = array('daemon' => $daemon, 'free_hdd' => $free_disk, 'nightFrom' => $settings->getSettings('Mode', 'nightFrom'), 'nightTo' => $settings->getSettings('Mode', 'nightTo'), 'nightAuto' => $settings->getSettings('Mode', 'nightAuto'));
    return $output;
}
开发者ID:nawrasg,项目名称:Atlantis,代码行数:25,代码来源:at_system.php

示例4: __construct

 public function __construct($local = null)
 {
     $settings = new Settings();
     $this->url = $settings->getSettings("Zwave", "IP");
     $this->port = $settings->getSettings("Zwave", "Port");
     $this->username = $settings->getSettings("Zwave", "username");
     $this->password = $settings->getSettings("Zwave", "password");
     if ($local == null) {
         $this->rawData = null;
     } else {
         $this->rawData = $this->loadRawData();
     }
 }
开发者ID:nawrasg,项目名称:Atlantis,代码行数:13,代码来源:Zwave.php

示例5: saveSettings

function saveSettings()
{
    global $error;
    global $obj_smarty;
    // add the checkbox fields here
    $arr_submit = array(array('show_description_field', 'string', false, 'off'), array('show_location_field', 'string', false, 'off'), array('show_phone_field', 'string', false, 'off'), array('show_url_field', 'string', false, 'off'), array('show_am_pm', 'string', false, 'off'), array('show_delete_confirm_dialog', 'string', false, 'off'), array('truncate_title', 'string', false, 'off'), array('show_notallowed_messages', 'string', false, 'off'), array('show_weeknumbers', 'string', false, 'off'), array('show_public_and_private_separately', 'string', false, 'off'));
    $int_user_id = $_POST['user_id'];
    foreach ($_POST as $key => $param) {
        if (!empty($key) && $key != 'save-settings' && $key != 'user_id') {
            $arr_submit[] = array($key, 'string', false, $param);
            $_REQUEST[$key] = $param;
        }
    }
    unset($_REQUEST['params']);
    $frm_submitted = validate_var($arr_submit);
    $arr_user = User::getUser();
    if (!$error) {
        if ($int_user_id == $arr_user['user_id']) {
            unset($frm_submitted['user_id']);
            Settings::saveSettings($frm_submitted, '', $arr_user['user_id']);
            $obj_smarty->assign('save_settings_success', 'Saved succesfully');
            //header('location: '.FULLCAL_URL.'/admin/settings');
            //exit;
        } else {
            $obj_smarty->assign('save_settings_error', 'NO rights to do that');
        }
    } else {
        $obj_smarty->assign('save_settings_error', $error);
    }
    $obj_smarty->assign('active', 'settings');
    $obj_smarty->assign('settings', Settings::getSettings($arr_user['user_id']));
    $obj_smarty->display(FULLCAL_DIR . '/view/user_panel.tpl');
    exit;
}
开发者ID:ramant15,项目名称:ektimo,代码行数:34,代码来源:index.php

示例6: getConfigurationEntries

 public function getConfigurationEntries($tprefix)
 {
     require_once 'Settings.php';
     $obj_sett = new Settings();
     $arr_config = $obj_sett->getSettings($tprefix);
     return $arr_config;
 }
开发者ID:E-SOFTinc,项目名称:UFlp-Back-Office,代码行数:7,代码来源:Calculation11WithOutProduct.php

示例7: get

 /**
  * @static
  * @return Connection
  */
 public static function get()
 {
     if (self::$inst == null) {
         self::$inst = new self(Settings::getSettings());
     }
     return self::$inst;
 }
开发者ID:ilukyanov,项目名称:btpapi,代码行数:11,代码来源:Connection.php

示例8: __construct

 /**
  * Constructor to create a new Template object
  * @param JPHPFramework $registry the frameworks registry
  */
 public function __construct()
 {
     $this->name = 'login';
     $this->version = 0.1;
     $this->author = 'José E. Villena';
     $this->translate = Settings::getSettings('DEFAULT_LANG');
     parent::__construct();
 }
开发者ID:kbrack1,项目名称:UptoBox,代码行数:12,代码来源:loginController.php

示例9: message

function message($arr)
{
    light_notification(false);
    $settings = new Settings();
    if ($settings->getSettings('CallNotifier', 'voice')) {
        (new Player())->sound(Player::NOTIFICATION);
        (new Player())->sound(Player::INCOMING_MESSAGE);
    }
}
开发者ID:nawrasg,项目名称:Atlantis,代码行数:9,代码来源:at_call_notifier.php

示例10: Settings

 function __construct($city = 'rennes')
 {
     $settings = new Settings();
     $this->city = $city;
     $this->appid = $settings->getSettings('Weather', 'appid');
     $result = $this->fetchURL($city, 7);
     if ($result->cod != null && $result->cod == '200') {
         $this->data = $result;
     }
 }
开发者ID:nawrasg,项目名称:Atlantis,代码行数:10,代码来源:Weather.php

示例11: init

 /**
  *
  */
 public static function init()
 {
     static::$settings = array('sorter' => array(), 'listing' => array(), 'translation' => array());
     if (class_exists('Chansig\\DirectoryIndex\\Settings')) {
         static::$settings = array_replace_recursive(static::$settings, Settings::getSettings());
     }
     Listing::setup(static::$settings['listing']);
     Sorter::setup(static::$settings['sorter']);
     Translation::setup(static::$settings['sorter']);
     Theme::setup(static::$settings['sorter']);
 }
开发者ID:chansig,项目名称:directoryindex,代码行数:14,代码来源:Main.php

示例12: __construct

 /**
  * Constructor to create a new Template object
  */
 public function __construct()
 {
     $this->moduleName = 'loginForm';
     $this->version = 1.0;
     $this->author = 'José E. Villena';
     $this->translate = Settings::getSettings('DEFAULT_LANG');
     self::setTranslateModule($this->translate, $this->moduleName);
     self::setMedia();
     self::setView();
     parent::__construct();
 }
开发者ID:kbrack1,项目名称:UptoBox,代码行数:14,代码来源:loginFormController.php

示例13: checkSMSStatus

 public function checkSMSStatus()
 {
     $flag = false;
     require_once 'Settings.php';
     $obj_settings = new Settings();
     $obj_arr = $obj_settings->getSettings();
     $status = $obj_arr["sms_status"];
     if ($status == "enabled") {
         $flag = true;
     } else {
         $this->obj_misc->alert('You are unable to Send SMS ,Please Contact Administrator');
     }
     return $flag;
 }
开发者ID:E-SOFTinc,项目名称:UFlp-Back-Office,代码行数:14,代码来源:SmsClass.php

示例14: plugins_loaded

 public function plugins_loaded()
 {
     $db = new Database(MARKETCHECK_DBNAME);
     $userManagement = new UserManagement($db);
     $fields = new Settings\Fields();
     $settings = new Settings($fields);
     $setup = new Setup\Setup(MARKETCHECK_DBNAME);
     $registerForm = new SignUp($userManagement);
     $currentDB = get_option('marketcheck_version');
     if ($currentDB != MARKETCHECK_DB_VERSION) {
         register_activation_hook(__FILE__, array($setup, 'install'));
         $setup->install();
         update_option("marketcheck_version", MARKETCHECK_DB_VERSION);
     }
     do_action("marketcheck/register-market", $fields, $settings->getSettings(), $registerForm, $db);
 }
开发者ID:zulfnore,项目名称:MarketCheck,代码行数:16,代码来源:MarketCheck.php

示例15: testNotFoundPageShowsCorrectCopyWhenVerboseErrorsDisabled

 public function testNotFoundPageShowsCorrectCopyWhenVerboseErrorsDisabled()
 {
     $original = Settings::getSettings();
     $settings = $original;
     $settings['errors']['verbose'] = false;
     Settings::setFromArray($settings);
     try {
         $this->request->dispatch("/notfound");
     } catch (Exception $e) {
         $handler = new ErrorHandler();
         $handler->setRequest($this->request);
         $handler->handleError($e);
         $this->assertResponseCode(404, $handler->getResponse());
         $this->assertBodyHasContents("Oops! That&rsquo;s a 404", $handler->getResponse());
         $this->assertBodyHasContents("It looks like the page you&rsquo;re after doesn&rsquo;t exist", $handler->getResponse());
     }
     Settings::setFromArray($original);
 }
开发者ID:Asedol,项目名称:paynedigital.com,代码行数:18,代码来源:DefaultControllerTest.php


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