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


PHP LuLu::getAlias方法代码示例

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


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

示例1: loadActiveModules

 public function loadActiveModules($isAdmin)
 {
     $moduleManager = LuLu::getService('modularityService');
     
     $this->activeModules = $moduleManager->getActiveModules($isAdmin);
     
     $module = $isAdmin ? 'AdminModule' : 'HomeModule';
     foreach ($this->activeModules as $m)
     {
         $moduleId = $m['id'];
         $moduleDir = $m['dir'];
         $ModuleClassName = $m['dir_class'];
         
         $this->setModule($moduleId, [
             'class' => 'source\modules\\' . $moduleDir . '\\' . $module
         ]);
         
         
         $serviceFile= LuLu::getAlias('@source').'\modules\\' .$moduleDir.'\\'.$ModuleClassName.'Service.php';
         
         if(FileHelper::exist($serviceFile))
         {
             $serviceClass = 'source\modules\\' .$moduleDir.'\\'.$ModuleClassName.'Service.php';
             $serviceInstance = new $serviceClass();
             $this->set($serviceInstance->getServiceId(), $serviceInstance);
         }
     }
 }
开发者ID:huasxin,项目名称:lulucms2,代码行数:28,代码来源:BaseApplication.php

示例2: getThemeUrl

 public static function getThemeUrl($url = null)
 {
     $currentTheme = LuLu::getAppParam('homeTheme');
     $ret = LuLu::getAlias('@web/static/themes/' . $currentTheme);
     if ($url != null) {
         return $ret . $url;
     }
     return $ret;
 }
开发者ID:merlinxie,项目名称:lulublog,代码行数:9,代码来源:Resource.php

示例3: loadAllModules

 private function loadAllModules()
 {
     if ($this->allModules !== null) {
         return $this->allModules;
     }
     $this->allModules = [];
     $moduleRootPath = LuLu::getAlias('@source') . '/modules';
     if ($moduleRootDir = @dir($moduleRootPath)) {
         while (($moduleFolder = $moduleRootDir->read()) !== false) {
             $modulePath = $moduleRootPath . '/' . $moduleFolder;
             if (preg_match('|^\\.+$|', $moduleFolder) || !is_dir($modulePath)) {
                 continue;
             }
             if ($moduleDir = @dir($modulePath)) {
                 $moduleClassName = ucwords($moduleFolder);
                 $class = null;
                 $instance = null;
                 $has_admin = false;
                 $has_home = false;
                 while (($item = $moduleDir->read()) !== false) {
                     $itemPath = $moduleRootPath . '/' . $moduleFolder . '/' . $item;
                     if (preg_match('|^\\.+$|', $item) || is_dir($itemPath)) {
                         continue;
                     }
                     if ($item === $moduleClassName . 'Info.php') {
                         $class = 'source\\modules\\' . $moduleFolder . '\\' . $moduleClassName . 'Info';
                     }
                     if ($item === 'AdminModule.php') {
                         $has_admin = true;
                     }
                     if ($item === 'HomeModule.php') {
                         $has_home = true;
                     }
                 }
                 if ($class !== null) {
                     try {
                         // $moduleObj = LuLu::createObject($class);
                         $instance = new $class();
                         if (empty($instance->id)) {
                             $instance->id = $moduleFolder;
                         }
                         if (empty($instance->name)) {
                             $instance->name = $moduleFolder;
                         }
                     } catch (Exception $e) {
                         // $instance=$e;
                     }
                 }
                 if ($instance !== null) {
                     $this->allModules[$instance->id] = ['id' => $instance->id, 'dir' => $moduleFolder, 'dir_class' => $moduleClassName, 'class' => $class, 'instance' => $instance, 'can_install' => true, 'can_uninstall' => true, 'has_admin' => $has_admin, 'has_home' => $has_home, 'can_active_admin' => false, 'can_active_home' => false];
                 }
             }
         }
     }
     return $this->allModules;
 }
开发者ID:snowbai,项目名称:lulucms2,代码行数:56,代码来源:ModularitySerivce.php

示例4: actionIndex

 public function actionIndex()
 {
     $model = new CacheForm();
     if (LuLu::$app->request->isPost && $model->load(LuLu::$app->request->post())) {
         if ($model->cache) {
             LuLu::flushCache();
             LuLu::$app->schemaCache->flush();
         }
         if ($model->asset) {
             $assetDir = LuLu::getAlias('@statics/assets');
             FileHelper::removeDirectoryContent($assetDir);
         }
         return $this->redirect(['index']);
     }
     return $this->render('index', ['model' => $model]);
 }
开发者ID:hucongyang,项目名称:lulucms2,代码行数:16,代码来源:CacheController.php

示例5: loadAllModules

 private function loadAllModules()
 {
     $ret = [];
     $moduleRootPath = LuLu::getAlias('@source') . '/modules';
     if ($moduleRootDir = @dir($moduleRootPath)) {
         while (($moduleFile = $moduleRootDir->read()) !== false) {
             $modulePath = $moduleRootPath . '/' . $moduleFile;
             if (preg_match('|^\\.+$|', $moduleFile) || !is_dir($modulePath)) {
                 continue;
             }
             if ($moduleDir = @dir($modulePath)) {
                 $moduleInfo = str_replace(' ', '', ucwords(implode(' ', explode('-', $moduleFile))));
                 $class = null;
                 $instance = null;
                 $can_active_admin = null;
                 $can_active_home = null;
                 while (($item = $moduleDir->read()) !== false) {
                     $itemPath = $moduleRootPath . '/' . $moduleFile . '/' . $item;
                     if (preg_match('|^\\.+$|', $item) || is_dir($itemPath)) {
                         continue;
                     }
                     if ($item === $moduleInfo . 'Module.php') {
                         $class = 'source\\modules\\' . $moduleFile . '\\' . $moduleInfo . 'Module';
                     }
                 }
                 if ($class !== null) {
                     try {
                         // $moduleObj = LuLu::createObject($class);
                         $instance = new $class();
                         if (empty($instance->name)) {
                             $instance->name = $moduleFile;
                         }
                     } catch (Exception $e) {
                         // $instance=$e;
                     }
                 }
                 $ret[$moduleFile] = ['id' => $moduleFile, 'class' => $class, 'instance' => $instance, 'can_install' => true, 'can_uninstall' => true, 'can_active_admin' => false, 'can_active_home' => false];
             }
         }
     }
     return $ret;
 }
开发者ID:merlinxie,项目名称:lulublog,代码行数:42,代码来源:ModuleManager.php

示例6: checkHomeThemeFile

 public static function checkHomeThemeFile($fileName, $checkDefault = true)
 {
     $currentTheme = Resource::getHomeTheme();
     $path = LuLu::getAlias('statics') . '/themes/' . $currentTheme . $fileName . '.php';
     if (!FileHelper::exist($path) && $checkDefault) {
         $currentTheme = 'd';
         $path = LuLu::getAlias('statics') . '/themes/' . $currentTheme . $fileName . '.php';
     } else {
         return $currentTheme;
     }
     if (!FileHelper::exist($path)) {
         return false;
     }
     return $currentTheme;
 }
开发者ID:phpsong,项目名称:lulucms2,代码行数:15,代码来源:Resource.php

示例7:

?>
/images/pp.jpg" alt="" />
                            </div>
                            <div id="da-user-info">
                                <?php 
echo LuLu::$app->user->identity->username;
?>
                            </div>
                            <ul class="da-header-dropdown">
                                <li class="da-dropdown-caret">
                                    <span class="caret-outer"></span>
                                    <span class="caret-inner"></span>
                                </li>
                                <li class="da-dropdown-divider"></li>
                                <li><a href="<?php 
echo LuLu::getAlias('@web') . '/index.php';
?>
" target="_blank">站点首页</a></li>
                            </ul>
                            
                        </div>
                        <div id="da-header-button-container">
                            <ul>
                                <li class="da-header-button logout">
                                    <?php 
echo Html::a('退出', ['/site/logout']);
?>
                                </li>
                            </ul>
                        </div>
                    </div>
开发者ID:shunzi250,项目名称:lulucms2,代码行数:31,代码来源:container.php

示例8: reloadAdmin

 public function reloadAdmin()
 {
     $url = LuLu::getAlias('@web') . '/admin.php';
     exit('<script>top.location.href="' . $url . '"</script>');
 }
开发者ID:shunzi250,项目名称:lulucms2,代码行数:5,代码来源:BackController.php

示例9:

<?php $this->beginPage() ?>
<!DOCTYPE HTML>
<html>

<head>
<meta charset="utf-8" />
<meta name="renderer" content="webkit" />
<meta http-equiv="X-UA-Compatible" content="IE=edge,Chrome=1" />
<meta name="viewport" content="width=device-width,initial-scale=1,maximum-scale=1" />
<meta name="apple-mobile-web-app-capable" content="yes" />
<meta name="apple-mobile-web-app-status-bar-style" content="blank" />
<meta name="format-detection" content="telephone=no" />
<title>登录——LuLu CMS 管理中心</title>

<base href="<?php echo LuLu::getAlias('@web');?>" />
<?php Resource::registerAdmin('/css/bootstrap.css?v=20150409');?>
    
    <?php Resource::registerAdmin('/css/icon.css?v=20150409');?>
    <?php Resource::registerAdmin('/css/login.css?v=20150409');?>
    
<script type="text/javascript">
    var G_INDEX_SCRIPT = "?/";
    var G_BASE_URL = "";
    var G_USER_ID = "1";
    var G_POST_HASH = "";
</script>
    <?php Resource::registerAdmin('/css/common.css?v=20150409');?>

    <?php Resource::registerAdmin('/js/jquery.2.js?v=20150409');?>
    <?php Resource::registerAdmin('/js/aws_admin.js?v=20150409');?>
开发者ID:huasxin,项目名称:lulucms2,代码行数:30,代码来源:login.php

示例10:

?>
<!DOCTYPE HTML>
<html>

<head>
    <meta charset="utf-8" />
    <meta name="renderer" content="webkit" />
    <meta http-equiv="X-UA-Compatible" content="IE=edge,Chrome=1" />
    <meta name="viewport" content="width=device-width,initial-scale=1,maximum-scale=1" />
    <meta name="apple-mobile-web-app-capable" content="yes" />
    <meta name="apple-mobile-web-app-status-bar-style" content="blank" />
    <meta name="format-detection" content="telephone=no" />
    <title>登录——LuLu CMS 管理中心</title>

    <base href="<?php 
echo LuLu::getAlias('@web');
?>
" />
    <?php 
Resource::registerAdmin('/css/bootstrap.css?v=20150409');
?>

    <?php 
Resource::registerAdmin('/css/icon.css?v=20150409');
?>
    <?php 
Resource::registerAdmin('/css/login.css?v=20150409');
?>

    <script type="text/javascript">
        var G_INDEX_SCRIPT = "?/";
开发者ID:ruzuojun,项目名称:lulucms2,代码行数:31,代码来源:CopyOflogin.php

示例11: getThemeUrl

 public static function getThemeUrl($url = null)
 {
     $currentTheme = self::getHomeTheme();
     $ret = LuLu::getAlias('@web/statics/themes/' . $currentTheme);
     if ($url != null) {
         return $ret . $url;
     }
     return $ret;
 }
开发者ID:hucongyang,项目名称:lulucms2,代码行数:9,代码来源:Resource.php

示例12:

                        </li>
                        -->
                    </ul>
                </div>


                <div id="info">
                    <ul>
                        <li>您好,<?php echo LuLu::$app->user->identity->username?>
                        </li>
                        <li>
                            <?php echo Html::a('退出',['/site/logout'])?>
                        </li>

                        <li>
                            <a href="<?php echo LuLu::getAlias('@web').'/index.php';?>" target="_blank">站点首页</a>
                        </li>

                    </ul>
                </div>
            </td>
        </tr>
        <tr>
            <td valign="top" id="leftContent">
                <div id="leftMenu">
                    <ul class="mod-bar" id="home">
                        <li>
                            <?php echo Html::a('<span>欢迎中心</span>',['/site/welcome'],['class'=>'active','target'=>'mainFrame'])?>
                        </li>
                    </ul>
开发者ID:huasxin,项目名称:lulucms2,代码行数:30,代码来源:container.php

示例13:

                <li style="float:right;">
                    <div class="toggle-search"><i class="fa fa-search"></i></div>
                    <div class="search-expand" style="display: none;"><div class="search-expand-inner"><form method="get" class="searchform themeform"  action="/"><div> <input type="ext" class="search" name="s" onblur="if(this.value=='')this.value='search...';" onfocus="if(this.value=='search...')this.value='';" value="search..."></div></form></div></div>
                </li>
            </ul>
        </div>
        
    </header>
   
   <section class="container" style="padding-top: 10px;height:100%;">
    <?php echo $content;?>
   </section>
   
    <footer class="footer">
        <div class="footer-inner">
            <div class="copyright pull-left">
                <a href="<?php echo LuLu::getAlias('@web')?>" >LuLu CMS</a> 保留一切权利 ·   © 2011-2015
            </div>
            <div class="trackcode pull-right">
              
                
            </div>
        </div>
    </footer>

      统计代码  <?php echo $this->getConfigValue('sys_stat');?>
<?php $this->endBody() ?>
</body>
</html>

<?php $this->endPage() ?>
开发者ID:huasxin,项目名称:lulucms2,代码行数:31,代码来源:main.php

示例14: getInstallUrl

 public static function getInstallUrl($url = null)
 {
     $ret = LuLu::getAlias('@web/statics/install');
     if ($url != null) {
         return $ret . $url;
     }
     return $ret;
 }
开发者ID:sym660,项目名称:lulucms2,代码行数:8,代码来源:Resource.php

示例15: getEnvData

 private function getEnvData()
 {
     $isWritable = [['系统临时文件(data/runtime)', true, FileHelper::canWrite(LuLu::getAlias('@data/runtime')), '系统核心', '必须可读写'], ['附件上传目录(data/attachment)', false, FileHelper::canWrite(LuLu::getAlias('@data/attachment')), '附件上传', '若无附件上传可不用写权限'], ['数据备份目录(data/backup)', false, FileHelper::canWrite(LuLu::getAlias('@data/backup')), '数据库备份', '若不备份数据库可不用写权限'], ['配置文件目录(data/config)', false, FileHelper::canWrite(LuLu::getAlias('@data/attachment')), '安装程序', '若手动安装系统写可不用写权限'], ['公共资源文件(statics/assets)', true, FileHelper::canWrite(LuLu::getAlias('@statics/assets')), '系统核心', '必须可读写']];
     $requirements = array(['PHP版本', true, version_compare(PHP_VERSION, "5.4.0", ">="), '系统核心', 'PHP 5.4.0 或更高版本是必须的.'], ['$_SERVER 服务器变量', true, 'ok' === ($message = Utility::checkServerVar()), '系统核心', $message], ['Reflection 扩展模块', true, class_exists('Reflection', false), '系统核心', ''], ['PCRE 扩展模块', true, extension_loaded("pcre"), '系统核心', ''], ['SPL 扩展模块', true, extension_loaded("SPL"), '系统核心', ''], ['PDO 扩展模块', true, extension_loaded('pdo'), '所有和使用PDO数据库连接相关的类', ''], ['PDO MySQL 扩展模块', true, extension_loaded('pdo_mysql'), 'MySql数据库', '使用MySql数据库必须支持'], ['OpenSSL 扩展模块', true, extension_loaded('openssl'), 'Security', '加密和解密方法'], ['GD 扩展模块', false, 'ok' === ($message = Utility::checkCaptchaSupport()), 'CaptchaAction', $message]);
     $requireResult = 1;
     foreach ($requirements as $i => $requirement) {
         if ($requirement[1] && !$requirement[2]) {
             $requireResult = 0;
         } else {
             if ($requireResult > 0 && !$requirement[1] && !$requirement[2]) {
                 $requireResult = -1;
             }
         }
         if ($requirement[4] === '') {
             $requirements[$i][4] = '&nbsp;';
         }
     }
     $writeableResult = 1;
     foreach ($isWritable as $k => $val) {
         if ($val[1] && !$val[2]) {
             $writeableResult = 0;
         } else {
             if ($requireResult > 0 && !$val[1] && !$val[2]) {
                 $writeableResult = -1;
             }
         }
         if ($val[4] === '') {
             $isWritable[$i][4] = '&nbsp;';
         }
     }
     $data = ['isWritable' => $isWritable, 'writeableResult' => $writeableResult, 'requireResult' => $requireResult, 'requirements' => $requirements];
     return $data;
 }
开发者ID:sym660,项目名称:lulucms2,代码行数:33,代码来源:SiteController.php


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