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


PHP Setting::remove方法代码示例

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


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

示例1: up

 public function up()
 {
     $this->createTable('p_user', array('id' => 'pk', 'email' => 'string NOT NULL', 'username' => 'string NOT NULL', 'password' => 'string NOT NULL', 'email' => 'string NOT NULL', 'last_login' => 'datetime', 'is_deleted' => 'boolean'));
     $this->addAutoIncrement('p_user', 'id');
     $this->insert('p_user', ['email' => "dev@company.com", 'username' => 'dev', 'password' => Setting::get('devInstallPassword'), 'last_login' => null, 'is_deleted' => 0]);
     Setting::remove("devInstallPassword");
 }
开发者ID:rizabudi,项目名称:plansys,代码行数:7,代码来源:m160112_125146_p_user.php

示例2: actionIndex

 public function actionIndex($force = false)
 {
     $isPMRunning = null;
     while (true) {
         if (!$force) {
             $isPMRunning = ProcessHelper::isPMRunning();
         }
         if (!$isPMRunning) {
             break;
         }
         $cmds = Setting::get('process', null, true);
         foreach ($cmds as $id => $cmd) {
             $curTime = time();
             $isStillRunning = false;
             # Getting PID of previous process.
             if (isset($cmd['pid'])) {
                 $isStillRunning = ProcessHelper::findRunningProcess($cmd['pid']);
             }
             # Remove one task kill process from Process Manager List
             if ($cmd['runOnce'] && !$isStillRunning) {
                 Setting::remove('process.' . $id);
             }
             if ($cmd['runOnce']) {
                 echo $cmd['name'] . "\n";
                 continue;
             }
             $isStarted = $cmd['isStarted'];
             # Running periodic process continously
             if ((!isset($cmd['lastRun']) || abs($curTime - $cmd['lastRun']) % $cmd['periodCount'] == 0) && !$isStillRunning && $isStarted && !$cmd['runOnce']) {
                 chdir(Yii::getPathOfAlias('application'));
                 exec("process run yiic " . $cmd['command'], $pid);
                 $cmd['lastRun'] = $curTime;
                 $cmd['pid'] = $pid[0];
                 Setting::set('process.' . $id, $cmd);
                 // Logging
                 // echo "[".date('d-m-Y H:i:s')."] ".$cmd['name']." is running\n";
             }
         }
         sleep(1);
     }
 }
开发者ID:balitax,项目名称:plansys,代码行数:41,代码来源:PMCommand.php

示例3: actionDelete

 public function actionDelete($id = null)
 {
     if (isset($id)) {
         Setting::remove('process.' . $id);
     }
     $this->redirect(['/dev/processManager/']);
 }
开发者ID:alfhan,项目名称:plansys,代码行数:7,代码来源:ServiceController.php

示例4: setSettings

 public function setSettings($data)
 {
     #App
     Setting::set('app.name', $data['appName'], false);
     Setting::set('app.mode', $data['appMode'], false);
     Setting::set('app.passEncrypt', $data['appPassEncrypt'], false);
     #Database
     Setting::set('db.driver', $data['dbSys'], false);
     Setting::set('db.dbname', $data['dbName'], false);
     Setting::set('db.password', $data['dbPass'], false);
     Setting::set('db.host', $data['dbHost'], false);
     Setting::set('db.username', $data['dbUser'], false);
     #Repo
     Setting::set('repo.path', $data['repoPath'], false);
     #Notif
     $enableNotif = true;
     $enableNotifEmail = true;
     if ($data['notifEnable'] != 'ON') {
         $enableNotif = false;
         $data['notifWithEmail'] = false;
     }
     if ($data['notifWithEmail'] != 'ON') {
         $enableNotifEmail = false;
     }
     Setting::set('notif.enable', $enableNotif, false);
     Setting::set('notif.email', $enableNotifEmail, false);
     #Audit Trail
     $enableAudit = true;
     if ($data['auditEnable'] != 'ON') {
         $enableAudit = false;
     }
     Setting::set("auditTrail.enable", $enableAudit, false);
     if ($enableAudit) {
         Setting::set("auditTrail.track", $data['auditTrack'], false);
     } else {
         Setting::set("auditTrail.track", null, false);
     }
     #Email
     Setting::remove("email.transport");
     if ($data['emailService'] == 'ses') {
         Setting::set("email.transport.auth.accessKeyId", $data['emailAccessKeyId'], false);
         Setting::set("email.transport.auth.secretAccessKey", $data['emailSecretAccessKey'], false);
         Setting::set("email.transport.auth.rateLimit", $data['emailRateLimit'], false);
         Setting::set("email.transport.auth.region", $data['emailRegion'], false);
     } elseif ($data['emailService'] == 'gmail') {
         Setting::set("email.transport.auth.user", $data['emailUser'], false);
         Setting::set("email.transport.auth.pass", $data['emailPass'], false);
     } elseif ($data['emailService'] == 'smtp') {
         Setting::set("email.transport.auth.user", $data['emailUser'], false);
         Setting::set("email.transport.auth.pass", $data['emailPass'], false);
         Setting::set("email.transport.host", $data['emailHost'], false);
         Setting::set("email.transport.port", $data['emailPort'], false);
     }
     if ($data['emailService'] != 'none') {
         Setting::set("email.from", $data['emailSender'], false);
     } else {
         Setting::set("email.from", null, false);
     }
     if ($data['emailService'] == 'smtp') {
         Setting::set("email.transport.service", null, false);
     } elseif ($data['emailService'] == 'none') {
         Setting::set("email.transport.service", 'none', false);
     } else {
         Setting::set("email.transport.service", $data['emailService'], false);
     }
     #LDAP
     if ($data['ldapEnable'] === 'ON') {
         Setting::set("ldap.enable", true, false);
         Setting::set("ldap.ad_port", $data['ldapAdPort'], false);
         Setting::set("ldap.account_suffix", $data['ldapAccountSuffix'], false);
         Setting::set("ldap.base_dn", $data['ldapBaseDn'], false);
         Setting::set("ldap.domain_controllers", $data['ldapDomainControllers'], false);
         Setting::set("ldap.admin_password", $data['ldapPassword'], false);
         Setting::set("ldap.admin_username", $data['ldapUsername'], false);
     } else {
         Setting::remove("ldap.ad_port");
         Setting::remove("ldap.account_suffix");
         Setting::remove("ldap.base_dn");
         Setting::remove("ldap.domain_controllers");
         Setting::remove("ldap.admin_password");
         Setting::remove("ldap.admin_username");
         Setting::set("ldap.enable", false, false);
     }
     Setting::write();
     return true;
 }
开发者ID:reggi49,项目名称:plansys,代码行数:86,代码来源:DevSettings.php

示例5: actionDelete

 public function actionDelete($m)
 {
     Setting::remove('services.list.' . $m);
 }
开发者ID:rizabudi,项目名称:plansys,代码行数:4,代码来源:ServiceController.php


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