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


PHP jApp::appConfigPath方法代码示例

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


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

示例1: getConfigPaths

 static function getConfigPaths()
 {
     $paths = array('base' => __DIR__ . '/config.php');
     if (file_exists(\jApp::appConfigPath('minifyGroupsConfig.php'))) {
         $paths['groups'] = \jApp::appConfigPath('minifyGroupsConfig.php');
     }
     return $paths;
 }
开发者ID:jelix,项目名称:minify-module,代码行数:8,代码来源:MinifySetup.php

示例2: install

 function install()
 {
     // configure the entry point
     $entrypoint = $this->getParameter('entrypoint');
     if (!$entrypoint) {
         $entrypoint = 'soap';
     }
     if (!file_exists(jApp::wwwPath($entrypoint . '.php'))) {
         $this->copyFile('files/soap.php', jApp::wwwPath($entrypoint . '.php'));
     }
     // setup the configuration
     if (!file_exists(jApp::appConfigPath($entrypoint . '/config.ini.php'))) {
         $this->copyFile('files/config.ini.php', jApp::appConfigPath($entrypoint . '/config.ini.php'));
     }
     if ($this->entryPoint->getMainConfigIni()->getValue('soap', 'responses') === null) {
         $this->entryPoint->getMainConfigIni()->setValue('soap', "jsoap~jResponseSoap", "responses");
     }
     $this->declareNewEntryPoint($entrypoint, 'soap', $entrypoint . '/config.ini.php');
 }
开发者ID:jelix,项目名称:soap-server-module,代码行数:19,代码来源:install.php

示例3: install

 function install()
 {
     if (!$this->firstExec('config')) {
         return;
     }
     $config = $this->entryPoint->getMainConfigIni();
     $plugins = $config->getValue('plugins', 'jResponseHtml');
     if (strpos($plugins, 'minify') === false) {
         $plugins .= ',minify';
         $config->setValue('plugins', $plugins, 'jResponseHtml', null, true);
     }
     if (null == $config->getValue('minifyCSS', 'jResponseHtml', null, true)) {
         $config->setValue('minifyCSS', 'off', 'jResponseHtml', null, true);
     }
     if (null == $config->getValue('minifyJS', 'jResponseHtml', null, true)) {
         $config->setValue('minifyJS', 'on', 'jResponseHtml', null, true);
     }
     if (null == $config->getValue('minifyExcludeCSS', 'jResponseHtml', null, true)) {
         $config->setValue('minifyExcludeCSS', '', 'jResponseHtml', null, true);
     }
     if (null == $config->getValue('minifyExcludeJS', 'jResponseHtml', null, true)) {
         $config->setValue('minifyExcludeJS', 'jelix/wymeditor/jquery.wymeditor.js', 'jResponseHtml', null, true);
     }
     $entrypoint = $config->getValue('minifyEntryPoint', 'jResponseHtml', null, true);
     if ($entrypoint === null) {
         $config->setValue('minifyEntryPoint', 'minify.php', 'jResponseHtml', null, true);
         $entrypoint = 'minify.php';
     }
     if (!file_exists(jApp::wwwPath($entrypoint))) {
         $this->copyFile('files/minify.php', jApp::wwwPath($entrypoint));
     }
     if (!file_exists(jApp::appConfigPath('minifyConfig.php'))) {
         $this->copyFile('files/minifyConfig.php', jApp::appConfigPath('minifyConfig.php'));
     }
     if (!file_exists(jApp::appConfigPath('minifyGroupsConfig.php'))) {
         $this->copyFile('files/minifyGroupsConfig.php', jApp::appConfigPath('minifyGroupsConfig.php'));
     }
 }
开发者ID:jelix,项目名称:minify-module,代码行数:38,代码来源:install.php

示例4:

<?php

require MINIFY_MIN_DIR . '/config.php';
if (file_exists(\jApp::appConfigPath('minifyConfig.php'))) {
    require \jApp::appConfigPath('minifyConfig.php');
}
\Jelix\Minify\MinifySetup::initOptions();
开发者ID:jelix,项目名称:minify-module,代码行数:7,代码来源:config.php

示例5: _execute

 protected function _execute(InputInterface $input, OutputInterface $output)
 {
     $entrypoint = $input->getArgument('entrypoint');
     if (($p = strpos($entrypoint, '.php')) !== false) {
         $entrypoint = substr($entrypoint, 0, $p);
     }
     $ep = $this->getEntryPointInfo($entrypoint);
     if ($ep == null) {
         try {
             $options = array('entrypoint' => $entrypoint);
             $this->executeSubCommand('app:createentrypoint', $options, $output);
             $this->appInfos = null;
             $ep = $this->getEntryPointInfo($entrypoint);
         } catch (\Exception $e) {
             throw new \Exception("The entrypoint has not been created because of this error: " . $e->getMessage() . ". No other files have been created.\n");
         }
     }
     $installConfig = new \Jelix\IniFile\IniModifier(App::configPath('installer.ini.php'));
     $inifile = new \Jelix\IniFile\MultiIniModifier(App::mainConfigFile(), App::appConfigPath($ep['config']));
     $params = array();
     $this->createFile(App::appPath('app/responses/adminHtmlResponse.class.php'), 'app/responses/adminHtmlResponse.class.php.tpl', $params, "Response for admin interface");
     $this->createFile(App::appPath('app/responses/adminLoginHtmlResponse.class.php'), 'app/responses/adminLoginHtmlResponse.class.php.tpl', $params, "Response for login page");
     $inifile->setValue('html', 'adminHtmlResponse', 'responses');
     $inifile->setValue('htmlauth', 'adminLoginHtmlResponse', 'responses');
     $repositoryPath = \jFile::parseJelixPath('lib:jelix-admin-modules');
     $this->registerModulesDir('lib:jelix-admin-modules', $repositoryPath);
     $installConfig->setValue('jacl.installed', '0', $entrypoint);
     $inifile->setValue('jacl.access', '0', 'modules');
     $installConfig->setValue('jacldb.installed', '0', $entrypoint);
     $inifile->setValue('jacldb.access', '0', 'modules');
     $inifile->save();
     $urlsFile = jApp::appConfigPath($inifile->getValue('significantFile', 'urlengine'));
     $xmlMap = new \Jelix\Routing\UrlMapping\XmlMapModifier($urlsFile, true);
     $xmlEp = $xmlMap->getEntryPoint($entrypoint);
     $xmlEp->addUrlAction('/', 'master_admin', 'default:index', null, null, array('default' => true));
     $xmlEp->addUrlModule('', 'master_admin');
     $xmlEp->addUrlInclude('/admin/acl', 'jacl2db_admin', 'urls.xml');
     $xmlEp->addUrlInclude('/admin/auth', 'jauthdb_admin', 'urls.xml');
     $xmlEp->addUrlInclude('/admin/pref', 'jpref_admin', 'urls.xml');
     $xmlEp->addUrlInclude('/auth', 'jauth', 'urls.xml');
     $xmlMap->save();
     $reporter = new \Jelix\Installer\Reporter\Console($output->isVerbose() ? 'notice' : 'warning');
     $installer = new \Jelix\Installer\Installer($reporter);
     $installer->installModules(array('jauth', 'master_admin'), $entrypoint . '.php');
     $authini = new \Jelix\IniFile\IniModifier(App::configPath($entrypoint . '/auth.coord.ini.php'));
     $authini->setValue('after_login', 'master_admin~default:index');
     $authini->setValue('timeout', '30');
     $authini->save();
     $profile = $input->getOption('profile');
     if (!$input->getOption('noauthdb')) {
         if ($profile != '') {
             $authini->setValue('profile', $profile, 'Db');
         }
         $authini->save();
         $installer->setModuleParameters('jauthdb', array('defaultuser' => true));
         $installer->installModules(array('jauthdb', 'jauthdb_admin'), $entrypoint . '.php');
     } else {
         $installConfig->setValue('jauthdb_admin.installed', '0', $entrypoint);
         $installConfig->save();
         $inifile->setValue('jauthdb_admin.access', '0', 'modules');
         $inifile->save();
     }
     if (!$input->getOption('noacl2db')) {
         if ($profile != '') {
             $dbini = new \Jelix\IniFile\IniModifier(App::configPath('profiles.ini.php'));
             $dbini->setValue('jacl2_profile', $profile, 'jdb');
             $dbini->save();
         }
         $installer = new \Jelix\Installer\Installer($reporter);
         $installer->setModuleParameters('jacl2db', array('defaultuser' => true));
         $installer->installModules(array('jacl2db', 'jacl2db_admin'), $entrypoint . '.php');
     } else {
         $installConfig->setValue('jacl2db_admin.installed', '0', $entrypoint);
         $installConfig->save();
         $inifile->setValue('jacl2db_admin.access', '0', 'modules');
         $inifile->save();
     }
     $installer->installModules(array('jpref_admin'), $entrypoint . '.php');
 }
开发者ID:mdouchin,项目名称:jelix,代码行数:79,代码来源:InitAdmin.php


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