當前位置: 首頁>>代碼示例>>PHP>>正文


PHP DatabaseManager::settingsValueForKey方法代碼示例

本文整理匯總了PHP中DatabaseManager::settingsValueForKey方法的典型用法代碼示例。如果您正苦於以下問題:PHP DatabaseManager::settingsValueForKey方法的具體用法?PHP DatabaseManager::settingsValueForKey怎麽用?PHP DatabaseManager::settingsValueForKey使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在DatabaseManager的用法示例。


在下文中一共展示了DatabaseManager::settingsValueForKey方法的2個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的PHP代碼示例。

示例1: DatabaseManager



<?php 
require_once $_SERVER['DOCUMENT_ROOT'] . "/database.class.php";
$manager = new DatabaseManager();
if ($_SERVER['REQUEST_METHOD'] === 'POST') {
    // They have submitted changes to the keychain
    foreach ($_POST as $key => $value) {
        if (!empty($key) && !empty($value)) {
            $manager->settingsSetValueForKey($key, $value);
        }
    }
    echo "Changes Saved!";
}
// They are requesting to see the editor webpage
$foursquareToken = $manager->settingsValueForKey("foursquare_token");
$instagramId = $manager->settingsValueForKey("instagram_id");
$instagramSecret = $manager->settingsValueForKey("instagram_secret");
$instagramUrl = $manager->settingsValueForKey("instagram_url");
$instagramUri = $manager->settingsValueForKey("instagram_uri");
$password = $manager->settingsValueForKey("password");
$printing = $manager->settingsValueForKey("printing");
$checked = $printing == 1 ? "checked='checked'" : "";
echo "<input name='foursquare_token' type='text' placeholder='Foursquare Token' value='{$foursquareToken}'>";
echo "<input name='instagram_id' type='text' placeholder='Instagram Client Id' value='{$instagramId}'>";
echo "<input name='instagram_secret' type='text' placeholder='Instagram Client Secret' value='{$instagramSecret}'>";
echo "<input name='instagram_url' type='text' placeholder='Instagram Callback Url' value='{$instagramUrl}'>";
echo "<input name='instagram_uri' type='text' placeholder='Instagram Oauth Callback' value='{$instagramUri}'>";
echo "<input name='password' type='text' placeholder='Password' value='{$password}'>";
echo "<input name='printing' type='checkbox' {$checked}>";
?>
開發者ID:Boldsie,項目名稱:Instagram-Printer-Server,代碼行數:29,代碼來源:settings.php

示例2: getInstagramRedirectUri

 public function getInstagramRedirectUri()
 {
     $manager = new DatabaseManager();
     $credentials = $this->getInstagramCredentials();
     return $manager->settingsValueForKey("instagram_uri");
 }
開發者ID:Boldsie,項目名稱:Instagram-Printer-Server,代碼行數:6,代碼來源:keychain.php


注:本文中的DatabaseManager::settingsValueForKey方法示例由純淨天空整理自Github/MSDocs等開源代碼及文檔管理平台,相關代碼片段篩選自各路編程大神貢獻的開源項目,源碼版權歸原作者所有,傳播和使用請參考對應項目的License;未經允許,請勿轉載。