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


PHP Engine::getConfig方法代码示例

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


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

示例1: run

 public function run($template)
 {
     if (file_exists(TEMP_CONFIG_FILE)) {
         Engine::getConfig()->setConfigFilename(TEMP_CONFIG_FILE);
         Engine::getConfig()->open();
     }
 }
开发者ID:shaungeorge,项目名称:facebook_analyser,代码行数:7,代码来源:SetupDialog.php

示例2: onLoad

 public function onLoad()
 {
     $this->config = Engine::getConfig();
     $this->config->setConfigFilename(TEMP_CONFIG_FILE);
     $this->config->open();
     //If it has been done already & we can connect, ignore.
     if ($this->try_connect($this->config->DB_HOST, $this->config->DB_USERNAME, $this->config->DB_PASSWORD, $this->config->DB_NAME) === true) {
         $this->setEnabled(false);
     }
 }
开发者ID:shaungeorge,项目名称:facebook_analyser,代码行数:10,代码来源:DatabaseSetup.php

示例3: onSubmit

 public function onSubmit()
 {
     ErrorHandler::stop();
     $config = Engine::getConfig();
     $config->setConfigFilename(TEMP_CONFIG_FILE);
     $done_config = $config->save(true);
     $done_htaccess = file_put_contents($this->htaccessFilename, "Options -Indexes\r\nRewriteEngine On\r\n#RewriteBase /\r\n#RewriteCond %{HTTPS} !on\r\n#RewriteRule (.*) https://%{HTTP_HOST}%{REQUEST_URI} [L,R=301]\r\n\r\nRewriteCond %{REQUEST_FILENAME} -f\r\nRewriteRule \\.(jp[e]?g|gif|png|css|js|ttf|woff|ico|bmp|pdf|doc[x]?)\$ - [L]\r\n\r\n#Redirect all files not match index.php\r\nRewriteCond %{REQUEST_FILENAME} !(.*)/index\\.php\$\r\nRewriteRule ^.*\$ index.php?current_engine_page=\$0 [L,NC,QSA]");
     if (!$done_htaccess || !$done_config || !in_array('mod_rewrite', apache_get_modules())) {
         $this->sendStatus(true, array($this->addName('write-error')));
     }
 }
开发者ID:shaungeorge,项目名称:facebook_analyser,代码行数:11,代码来源:ConfigSetup.php

示例4: onSubmit

 public function onSubmit()
 {
     $templateName = $_POST[$this->addName("options")];
     if ($this->testTemplate($templateName) === true) {
         $config = Engine::getConfig();
         $config->setConfigFilename(TEMP_CONFIG_FILE);
         $config->TEMPLATE = $templateName;
         $template = (include Engine::getTemplate($templateName));
         if (!$template instanceof Template) {
             $this->sendStatus(true, array($this->addName("error")));
         } else {
             $template->configure($this);
             $config->save(true);
         }
     } else {
         $this->sendStatus(true, array($this->addName("error")));
     }
 }
开发者ID:shaungeorge,项目名称:facebook_analyser,代码行数:18,代码来源:TemplateSetup.php

示例5: test_getConfig

 public function test_getConfig()
 {
     //Make sure that what we get from the engine, gives us the actual config class and an instantiated object
     $this->assertEquals(true, Engine::getConfig() !== null && Engine::getConfig() instanceof Config);
 }
开发者ID:shaungeorge,项目名称:facebook_analyser,代码行数:5,代码来源:EngineTest.php


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