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


PHP Configuration::put方法代码示例

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


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

示例1: zcssleedmaker_plugin_update

function zcssleedmaker_plugin_update($_)
{
    if ($_['action'] == 'zcssleedmaker_update') {
        $configurationManager = new Configuration();
        $configurationManager->getAll();
        $configurationManager->put('plugin_cssLeedMaker_css', $_['plugin_cssLeedMaker_css']);
        $configurationManager->put('plugin_cssLeedMaker_addcss', rawurlencode($_['plugin_cssLeedMaker_addcss']));
        $_SESSION['configuration'] = null;
        header('location: settings.php#CSSLeedMaker');
    }
}
开发者ID:kraoc,项目名称:Leed-market,代码行数:11,代码来源:z_cssLeedMaker.plugin.disabled.php

示例2: testPut

 /**
  * @todo Implement testPut().
  */
 public function testPut()
 {
     $newServerAddress = 'http://test.server.com';
     Configuration::put('server-address', $newServerAddress);
     // check that server address is updated
     $serverAddress = Configuration::get('server-address');
     $this->assertNotNull($serverAddress);
     $this->assertEquals($newServerAddress, $serverAddress);
 }
开发者ID:usamurai,项目名称:swisolr,代码行数:12,代码来源:ConfigurationTest.php

示例3: leedHomeLink_plugin_update

function leedHomeLink_plugin_update($_)
{
    $configurationManager = new Configuration();
    $configurationManager->getAll();
    if ($_['action'] == 'leedHomeLink_update') {
        $configurationManager->put('plugin_leedHomeLink_1_name', $_['plugin_leedHomeLink_1_name']);
        $configurationManager->put('plugin_leedHomeLink_1_link', $_['plugin_leedHomeLink_1_link']);
        $configurationManager->put('plugin_leedHomeLink_2_name', $_['plugin_leedHomeLink_2_name']);
        $configurationManager->put('plugin_leedHomeLink_2_link', $_['plugin_leedHomeLink_2_link']);
        $configurationManager->put('plugin_leedHomeLink_3_name', $_['plugin_leedHomeLink_3_name']);
        $configurationManager->put('plugin_leedHomeLink_3_link', $_['plugin_leedHomeLink_3_link']);
        $configurationManager->put('plugin_leedHomeLink_4_name', $_['plugin_leedHomeLink_4_name']);
        $configurationManager->put('plugin_leedHomeLink_4_link', $_['plugin_leedHomeLink_4_link']);
        $configurationManager->put('plugin_leedHomeLink_5_name', $_['plugin_leedHomeLink_5_name']);
        $configurationManager->put('plugin_leedHomeLink_5_link', $_['plugin_leedHomeLink_5_link']);
        $_SESSION['configuration'] = null;
        header('location: settings.php#leedHomeLink');
    }
}
开发者ID:kraoc,项目名称:Leed-market,代码行数:19,代码来源:leedHomeLink.plugin.disabled.php

示例4: toggleEventContent_Update

function toggleEventContent_Update($_)
{
    if ($_['action'] == 'toggleEventContent_update') {
        $config = new Configuration();
        $config->getAll();
        $config->put('toggleEventContent_default', $_['toggleEventContent_default']);
        $_SESSION['configuration'] = null;
        //		header('location: settings.php#toggleEventContent');
        header('location: /');
    }
}
开发者ID:kraoc,项目名称:Leed-market,代码行数:11,代码来源:toggle-event-content.plugin.disabled.php

示例5: intheleed_plugin_update

function intheleed_plugin_update($_)
{
    $myUser = isset($_SESSION['currentUser']) ? unserialize($_SESSION['currentUser']) : false;
    if ($myUser === false) {
        exit(_t('P_INTHELEED_CONNECTION_ERROR'));
    }
    if ($_['action'] == 'intheleed_update') {
        $configurationManager = new Configuration();
        $configurationManager->put('plugin_poche_link', $_['plugin_poche_link']);
        $_SESSION['configuration'] = null;
        header('location: settings.php');
    }
}
开发者ID:kraoc,项目名称:Leed-market,代码行数:13,代码来源:intheleed.plugin.disabled.php

示例6: cacheListFeed_plugin_action

function cacheListFeed_plugin_action(&$_)
{
    if ($_['action'] == 'cacheListFeed') {
        $myUser = isset($_SESSION['currentUser']) ? unserialize($_SESSION['currentUser']) : false;
        if ($myUser == false) {
            exit;
        }
        $configurationManager = new Configuration();
        $configurationManager->getAll();
        $configurationManager->put('cacheListFeed', $_['cacher']);
    }
    if ($_['action'] == 'getCacheListFeed') {
        $myUser = isset($_SESSION['currentUser']) ? unserialize($_SESSION['currentUser']) : false;
        if ($myUser == false) {
            echo 1;
            exit;
        }
        $configurationManager = new Configuration();
        $configurationManager->getAll();
        echo $configurationManager->get('cacheListFeed');
    }
}
开发者ID:kraoc,项目名称:Leed-market,代码行数:22,代码来源:cacheListFeed.plugin.disabled.php

示例7: i18n_plugin_AddForm

function i18n_plugin_AddForm()
{
    $test = array();
    $configuration = new Configuration();
    $configuration->getAll();
    echo '<section id="i18n" name="i18n" class="i18n">
			<h2>' . _t('P_I18N_PREF_TITLE') . '</h2>';
    /* -------------------------------------------------------- */
    // Gestion des retours des formulaires
    /* -------------------------------------------------------- */
    // cas de changement de la langue de Leed
    if (isset($_POST['plugin_i18n_changeLngLeed'])) {
        $langue = substr(basename($_POST['plugin_i18n_changeLngLeed']), 0, 2);
        $configuration->put('language', $langue);
        $test['info'][] = _t('P_I18N_MSG_CHG_LNG_LEED');
    }
    // Cas validation de la création d'une langue sur Leed.
    $newLanguage = '';
    if (isset($_POST['plugin_i18n_newLanguage'])) {
        $newLanguage = $_POST['plugin_i18n_newLanguage'];
        if (is_file($newLanguage)) {
            $test['Erreur'][] = _t('P_I18N_NEW_LNG_FILE_EXIST') . $newLanguage;
        } else {
            file_put_contents($newLanguage, '');
            $test['Info'][] = _t('P_I18N_NEW_LNG_FILE_OK', array($newLanguage));
            $_POST['plugin_i18n_selectLanguage'] = $newLanguage;
        }
    }
    // Cas d'une copy de fichier
    if (isset($_POST['plugin_i18n_copyLanguage'])) {
        $copyLanguage = $_POST['plugin_i18n_copyLanguage'];
        $fileDest = $_POST['plugin_i18n_copyFileDest'];
        if (is_file($fileDest)) {
            $test['Erreur'][] = _t('P_I18N_NEW_LNG_FILE_EXIST') . $fileDest;
        } else {
            if (is_writable(dirname($fileDest))) {
                copy($copyLanguage, $fileDest);
                $test['Info'][] = _t('P_I18N_NEW_LNG_FILE_OK', array($fileDest));
                $_POST['plugin_i18n_selectLanguage'] = $fileDest;
            } else {
                $test['Erreur'][] = _t('P_I18N_VERIF_ERR1') . ' ' . $fileDest;
            }
        }
    }
    // Cas validation d'une MAJ d'un fichier de langue
    if (isset($_POST['0123456789MAJLanguage'])) {
        $_ = array_map('addslashes', array_merge($_GET, $_POST));
        ksort($_);
        $ModifLanguage = $_['0123456789MAJLanguage'];
        unset($_['0123456789MAJLanguage']);
        if (is_writable($ModifLanguage)) {
            file_put_contents($ModifLanguage, plugin_i18n_json_encode($_));
            $test['Info'][] = _t('P_I18N_UPD_LNG_FILE_OK', array($_POST['0123456789MAJLanguage']));
            $_POST['plugin_i18n_selectLanguage'] = $ModifLanguage;
        } else {
            $test['Erreur'][] = _t('P_I18N_UPD_LNG_FILE_ERR', array($_POST['0123456789MAJLanguage']));
        }
    }
    // Gestion des erreurs PHP possible permettant l'écriture de fichier dans les répertoires de Leed
    if (!is_writable('./locale/')) {
        $test['Erreur'][] = _t('P_I18N_VERIF_ERR1');
    }
    if (!@function_exists('file_get_contents')) {
        $test['Erreur'][] = _t('P_I18N_VERIF_ERR2');
    }
    if (!@function_exists('file_put_contents')) {
        $test['Erreur'][] = _t('P_I18N_VERIF_ERR2');
    }
    if (@version_compare(PHP_VERSION, '5.1.0') <= 0) {
        $test['Erreur'][] = _t('P_I18N_VERIF_ERR3', array(PHP_VERSION));
    }
    if (ini_get('safe_mode') && ini_get('max_execution_time') != 0) {
        $test['Erreur'][] = _t('P_I18N_VERIF_ERR4');
    }
    if (count($test) != 0) {
        echo '<div id="result_i18n" class="result_i18n">
                  <table>
                      <th class="i18n_border i18n_th">' . _t('P_I18N_MESSAGES') . '</th>';
        foreach ($test as $type => $messages) {
            echo '<tr>';
            foreach ($messages as $message) {
                echo '<td class="i18n_border ' . ($type == 'Erreur' ? 'i18n_warn' : 'i18n_info') . '">' . $message . '</td>';
            }
            echo '</tr>';
        }
        echo '    </table>
              </div>';
    }
    // Sélectionner la langue ou saisir une nouvelle langue
    echo '<h3>' . _t('P_I18N_MANAGE_LNG_TITLE') . '</h3>';
    echo '<form action="settings.php#i18n" method="POST">
              <select name="plugin_i18n_changeLngLeed">';
    $filesLeed = glob('./templates/' . $configuration->get('theme') . '/locale/*.json');
    foreach ($filesLeed as $file) {
        if ($file == './templates/' . $configuration->get('theme') . '/locale/' . $configuration->get('language') . '.json') {
            echo '<option selected=selected value="' . $file . '">' . $file . '</option>';
        } else {
            echo '<option value="' . $file . '">' . $file . '</option>';
        }
    }
//.........这里部分代码省略.........
开发者ID:kraoc,项目名称:Leed-market,代码行数:101,代码来源:i18n.plugin.disabled.php

示例8: KodiCmd

require_once 'KodiCmd.class.php';
$table = new KodiCmd();
$table->create();
$s1 = new Section();
$s1->setLabel('kodi');
$s1->save();
$r1 = new Right();
$r1->setSection($s1->getId());
$r1->setRead('1');
$r1->setDelete('1');
$r1->setCreate('1');
$r1->setUpdate('1');
$r1->setRank('1');
$r1->save();
$conf = new Configuration();
$conf->put('plugin_kodiCmd_api_url_kodi', 'http://192.168.1.107:85/jsonrpc');
$conf->put('plugin_kodiCmd_api_timeout_kodi', 5);
$conf->put('plugin_kodiCmd_api_recognition_status', '');
$ro = new Room();
$ro->setName('KODI');
$ro->setDescription('De la bonne zic, un bon p\'tit film....');
$ro->save();
$roomManager = new Room();
$rooms = $roomManager->populate();
foreach ($rooms as $room) {
    if ($room->getName() == "KODI") {
        $kodiRoomId = $room->getId();
    }
}
$id = 0;
$kodi = new KodiCmd();
开发者ID:eflye,项目名称:yana-plugins,代码行数:31,代码来源:install.php

示例9: User

 $user = new User();
 $configuration = new Configuration();
 $right = new Right();
 $rank = new Rank();
 $section = new Section();
 $event = new Event();
 $client = new Client();
 //Création des tables SQL
 $configuration->create();
 $user->create();
 $right->create();
 $rank->create();
 $section->create();
 $event->create();
 $client->create();
 $configuration->put('UPDATE_URL', 'http://update.idleman.fr/yana?callback=?');
 $configuration->put('DEFAULT_THEME', 'default');
 $configuration->put('COOKIE_NAME', 'yana');
 $configuration->put('COOKIE_LIFETIME', '7');
 $configuration->put('VOCAL_ENTITY_NAME', 'YANA');
 $configuration->put('PROGRAM_VERSION', '3.0.6');
 $configuration->put('HOME_PAGE', 'index.php');
 $configuration->put('VOCAL_SENSITIVITY', '0.0');
 //Création du rang admin
 $rank = new Rank();
 $rank->setLabel('admin');
 $rank->save();
 //Déclaration des sections du programme
 $sections = array('event', 'vocal', 'user', 'plugin', 'configuration', 'admin');
 //Création des sections déclarées et attribution de tous les droits sur toutes ces sections pour l'admin
 foreach ($sections as $sectionName) {
开发者ID:thib3113,项目名称:yana-server,代码行数:31,代码来源:install.php

示例10: plugin_leedUpdateSource_messageAccueil

function plugin_leedUpdateSource_messageAccueil()
{
    $configurationManager = new Configuration();
    $configurationManager->getAll();
    // afin de ne pas intéroger cinquante fois par jour et bouffer du temps de réponse, une recherche par jour est suffisante.
    if ($configurationManager->get('plugin_leedUpdateSource_date') == date('Ymd')) {
        echo '';
    } else {
        $configurationManager->put('plugin_leedUpdateSource_date', date('Ymd'));
        $message = plugin_leedUpdateSource_message('plugin_leedUpdateSource_source');
        if ($message == '') {
            $message = plugin_leedUpdateSource_message('plugin_leedUpdateSource_sourcePlugin');
        }
        $message == '' ? $return = '' : ($return = '<aside>Une mise à jour est disponible - <a href="settings.php#leedUpdateSource">Go !!!</a></aside>');
        echo $return;
    }
}
开发者ID:kraoc,项目名称:Leed-market,代码行数:17,代码来源:leedUpdateSource.plugin.disabled.php

示例11: epub_plugin_update_settings

function epub_plugin_update_settings(&$_)
{
    if ($_['action'] == 'epub_plugin_update') {
        $myUser = isset($_SESSION['currentUser']) ? unserialize($_SESSION['currentUser']) : false;
        if ($myUser === false) {
            exit(_t('P_EPUB_NOTLOGGED_ERROR_MODIFY_SETTINGS'));
        }
        $configManager = new Configuration();
        $configManager->getAll();
        $configManager->put('epub_version', $_['epub_version']);
        $configManager->put('epub_menu', isset($_['epub_menu']) ? $_['epub_menu'] === 'on' ? 1 : 0 : 0);
        $configManager->put('epub_menu_unread', isset($_['epub_menu_unread']) ? $_['epub_menu_unread'] === 'on' ? 1 : 0 : 0);
        $configManager->put('epub_menu_favorites', isset($_['epub_menu_favorites']) ? $_['epub_menu_favorites'] === 'on' ? 1 : 0 : 0);
        $_SESSION['configuration'] = null;
        header('location: settings.php#epub');
    }
}
开发者ID:kraoc,项目名称:Leed-market,代码行数:17,代码来源:epub.plugin.disabled.php

示例12: header

     $feed = $feed->getById($_['idFeed']);
     $feed->setIsverbose($_['displayFeedIsVerbose'] == "0" ? 1 : 0);
     $feed->save();
     break;
 case 'optionFeedIsVerbose':
     if ($myUser == false) {
         $response_array['status'] = 'noconnect';
         $response_array['texte'] = _t('YOU_MUST_BE_CONNECTED_ACTION');
         header('Content-type: application/json');
         echo json_encode($response_array);
         exit;
     }
     // changement du statut de l'option
     $configurationManager = new Configuration();
     $conf = $configurationManager->getAll();
     $configurationManager->put('optionFeedIsVerbose', $_['optionFeedIsVerbose'] == "0" ? 0 : 1);
     break;
 case 'articleDisplayMode':
     if ($myUser == false) {
         $response_array['status'] = 'noconnect';
         $response_array['texte'] = _t('YOU_MUST_BE_CONNECTED_ACTION');
         header('Content-type: application/json');
         echo json_encode($response_array);
         exit;
     }
     // chargement du content de l'article souhaité
     $newEvent = new Event();
     $event = $newEvent->getById($_['event_id']);
     if ($_['articleDisplayMode'] == 'content') {
         //error_log(print_r($_SESSION['events'],true));
         $content = $event->getContent();
开发者ID:Chouchen,项目名称:Leed,代码行数:31,代码来源:action.php

示例13: Configuration

<?php

$conf = new Configuration();
$conf->put('ip', 'localhost', 'transmission');
$conf->put('port', '9091', 'transmission');
开发者ID:eflye,项目名称:yana-plugins,代码行数:5,代码来源:install.php

示例14: Sensor

require_once 'Sensor.class.php';
$table = new Sensor();
$table->create();
require_once 'SensorType.class.php';
$table2 = new SensorType();
$table2->create();
$s1 = new Section();
$s1->setLabel('sensor');
$s1->save();
$s2 = new Section();
$s2->setLabel('sensortypes');
$s2->save();
$r1 = new Right();
$r1->setSection($s1->getId());
$r1->setRead('1');
$r1->setDelete('1');
$r1->setCreate('1');
$r1->setUpdate('1');
$r1->setRank('1');
$r1->save();
$r2 = new Right();
$r2->setSection($s2->getId());
$r2->setRead('1');
$r2->setDelete('1');
$r2->setCreate('1');
$r2->setUpdate('1');
$r2->setRank('1');
$r2->save();
$conf = new Configuration();
$conf->put('plugin_sensor_receptor_pin', '0');
开发者ID:sachaw0lf,项目名称:yana-sensor-plugin,代码行数:30,代码来源:install.php

示例15: Event

$eventManager = new Event();
$folderManager = new Folder();
$configurationManager = new Configuration();
$conf = $configurationManager->getAll();
$language = $configurationManager->get('language');
//@todo requis pour la MAJ mais pourra être supprimé.
if (empty($language)) {
    // On tente de récupérer la valeur issue de 'constant.php'
    if (defined('LANGUAGE')) {
        $language = LANGUAGE;
    } elseif (defined('LANGAGE')) {
        $language = LANGAGE;
    } else {
        $language = Translation::DEFAULT_LANGUAGE;
    }
    $configurationManager->put('language', $language);
}
// Faut-il supprimer la variable /langu?age/ de 'constant.php'?
$theme = $configurationManager->get('theme');
//Instanciation du template
$tpl = new RainTPL();
//Definition des dossiers de template
raintpl::configure("base_url", null);
raintpl::configure("tpl_dir", './templates/' . $theme . '/');
raintpl::configure("cache_dir", "./cache/tmp/");
i18n_init($language, dirname(__FILE__) . '/templates/' . $theme . '/');
if ($resultUpdate) {
    die(_t('LEED_UPDATE_MESSAGE'));
}
$view = '';
$tpl->assign('myUser', $myUser);
开发者ID:Chouchen,项目名称:Leed,代码行数:31,代码来源:common.php


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