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


PHP Wind::getRealDir方法代码示例

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


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

示例1: postHandle

 public function postHandle()
 {
     $this->runDesign();
     $this->updateOnline();
     $this->setOutput($this->runCron(), 'runCron');
     //门户管理模式 编译目录切换
     if ($this->getRequest()->getPost('design')) {
         $loginUser = Wekit::getLoginUser();
         $designPermission = $loginUser->getPermission('design_allow_manage.push');
         if ($designPermission > 0) {
             $dir = Wind::getRealDir('DATA:design.template');
             if (is_dir($dir)) {
                 WindFolder::rm($dir, true);
             }
             $this->forward->getWindView()->compileDir = 'DATA:design.template';
         }
     }
     // SEO settings
     Wekit::setGlobal(NEXT_VERSION . ' ' . NEXT_RELEASE, 'version');
     $seo = Wekit::V('seo');
     Wekit::setGlobal($seo ? $seo->getData() : array('title' => Wekit::C('site', 'info.name')), 'seo');
     $this->setOutput($this->getRequest()->getIsAjaxRequest() ? '1' : '0', '_ajax_');
     /*[设置给PwGlobalFilters需要的变量]*/
     $_var = array('current' => $this->forward->getWindView()->templateName, 'a' => $this->router->getAction(), 'c' => $this->router->getController(), 'm' => $this->router->getModule());
     $this->getResponse()->setData($_var, '_aCloud_');
 }
开发者ID:chendong0444,项目名称:phpwind,代码行数:26,代码来源:PwGlobalFilter.php

示例2: postHandle

 public function postHandle()
 {
     //门户管理模式 编译目录切换
     if ($this->getRequest()->getPost('design')) {
         $loginUser = Wekit::getLoginUser();
         $designPermission = $loginUser->getPermission('design_allow_manage.push');
         if ($designPermission > 0) {
             $dir = Wind::getRealDir('DATA:design.template');
             if (is_dir($dir)) {
                 WindFolder::rm($dir, true);
             }
             $this->forward->getWindView()->compileDir = 'DATA:design.template';
         }
     }
     // SEO settings
     Wind::import('SRV:seo.bo.PwSeoBo');
     $sitename = Wekit::C('site', 'info.name');
     PwSeoBo::set('{sitename}', $sitename);
     Wekit::setGlobal(NEXT_VERSION . ' ' . NEXT_RELEASE, 'version');
     Wekit::setGlobal(PwSeoBo::getData(), 'seo');
     $this->setOutput($this->getRequest()->getIsAjaxRequest() ? '1' : '0', '_ajax_');
     /*[设置给PwGlobalFilters需要的变量]*/
     $_var = array('current' => $this->forward->getWindView()->templateName, 'a' => $this->router->getAction(), 'c' => $this->router->getController(), 'm' => $this->router->getModule());
     $this->getResponse()->setData($_var, '_aCloud_');
     Wekit::load('APPS:appcenter.service.srv.PwDebugApplication')->compile();
 }
开发者ID:fanqimeng,项目名称:4tweb,代码行数:26,代码来源:PwFilter.php

示例3: __construct

 public function __construct($pageBo)
 {
     $this->pageid = $pageBo->pageid;
     $pageInfo = $pageBo->getPage();
     $this->folder = str_replace('/', '_', $pageInfo['page_router']);
     $this->dir = Wind::getRealDir('THEMES:portal.local.') . $pageBo->getTplPath() . '/';
 }
开发者ID:chendong0444,项目名称:phpwind,代码行数:7,代码来源:PwDesignExportZip.php

示例4: run

 public function run()
 {
     $this->project = new WindGenerateProject();
     $this->project->name = 'test';
     $this->project->dir = Wind::getRealDir('PROJ:' . $this->project->name);
     $this->project->setConfig($this->config);
     $r = $this->project->generate();
     if (!$r) {
         echo 'generate fail';
     } else {
         echo 'generate success';
     }
 }
开发者ID:jellycheng,项目名称:windframework,代码行数:13,代码来源:IndexController.php

示例5: _checkDir

 /**
  * 检测路径
  *
  * @param string $projName        	
  * @return string
  */
 private function _checkDir($projName)
 {
     static $dir = '', $name = '';
     $name = $projName;
     $dir = Wind::getRealDir('PROJ:' . $name);
     if (is_dir($dir)) {
         $r = $this->getLine("The Project Folder [{$dir}] Already Exist, Are you sure to override it?(Yes|No)");
         if (strtolower($r[0]) != 'y') {
             $name = $this->getLine('Please input the project name:');
             $this->_checkDir($name);
         }
     }
     return array($name, $dir);
 }
开发者ID:jellycheng,项目名称:windframework,代码行数:20,代码来源:IndexCommand.php

示例6: doCompile

 public function doCompile()
 {
     $config = Wekit::load('APPCENTER:service.srv.PwInstallApplication')->getConfig('style-type');
     foreach ($config as $k => $v) {
         $dir = Wind::getRealDir('THEMES:' . $v[1]);
         $files = WindFolder::read($dir, WindFolder::READ_DIR);
         foreach ($files as $v) {
             $manifest = $dir . '/' . $v . '/' . $this->manifest;
             if (!WindFile::isFile($manifest)) {
                 continue;
             }
             if (($r = $this->_doCss($dir . '/' . $v)) instanceof PwError) {
                 return $r;
             }
         }
     }
 }
开发者ID:latticet,项目名称:EduSoho_jb51,代码行数:17,代码来源:PwCssCompress.php

示例7: run

 /**
  * 后台首页处理方法
  */
 public function run()
 {
     //TODO 后台默认首页内容扩展支持
     list($groupType) = $this->getInput(array('type'), 'get');
     $groupType or $groupType = 'member';
     $groups = $this->_getGroupDs()->getGroupsByTypeInUpgradeOrder($groupType);
     if ('member' == $groupType) {
         $points = array();
         $last = '';
         foreach ($groups as $gid => $_item) {
             $points[] = $_item['points'];
             $last = $_item['points'];
         }
         $points[] = 999999999;
         $this->setOutput($points, 'points');
     }
     //用户组类型
     $groupTypes = $this->_getGroupDs()->getGroupTypes();
     $typeClasses = array();
     foreach ($groupTypes as $v) {
         $typeClasses[$v] = $groupType == $v ? ' class="current"' : '';
         //TODO
     }
     //level images
     $imageDir = Wind::getRealDir('PUBLIC:res.images.level') . DIRECTORY_SEPARATOR;
     //$imageDir = sprintf('%s/www/res/images/level/',dirname(rtrim(WEKIT_PATH,DIRECTORY_SEPARATOR)));
     $imageUrl = sprintf('%s/level', Wekit::url()->images);
     $imageFiles = array();
     if (is_dir($imageDir)) {
         if (false !== ($dh = opendir($imageDir))) {
             while (($file = readdir($dh)) !== false) {
                 if (filetype($imageDir . $file) == 'dir') {
                     continue;
                 }
                 $imageFiles[] = $file;
             }
             closedir($dh);
         }
     }
     natcasesort($imageFiles);
     $this->setOutput($imageUrl, 'imageUrl');
     $this->setOutput($imageFiles, 'imageFiles');
     $this->setOutput($groupType, 'groupType');
     $this->setOutput($typeClasses, 'typeClasses');
     $this->setOutput($groups, 'groups');
 }
开发者ID:YoursBoss,项目名称:nextwind,代码行数:49,代码来源:GroupsController.php

示例8: defaultAvatar

 public function defaultAvatar($uid, $type = 'face')
 {
     Wind::import('WINDID:service.upload.WindidUpload');
     $_avatar = array('.jpg' => '_big.jpg', '_middle.jpg' => '_middle.jpg', '_small.jpg' => '_small.jpg');
     $defaultBanDir = Wind::getRealDir('PUBLIC:') . 'res/images/face/';
     Wind::import('WINDID:service.config.srv.WindidStoreService');
     $srv = new WindidStoreService();
     $store = $srv->getStore();
     $fileDir = '/avatar/' . Windid::getUserDir($uid) . '/';
     foreach ($_avatar as $des => $org) {
         $toPath = $store->getAbsolutePath($uid . $des, $fileDir);
         $fromPath = $defaultBanDir . $type . $org;
         WindidUpload::createFolder(dirname($toPath));
         WindidUpload::copyFile($fromPath, $toPath);
         $store->save($toPath, $fileDir . $uid . $des);
     }
     return true;
 }
开发者ID:fanqimeng,项目名称:4tweb,代码行数:18,代码来源:WindidUserService.php

示例9: init

 /**
  * 安装过程中风格的初始化
  *
  */
 public function init()
 {
     $install = Wekit::load('APPS:appcenter.service.srv.PwInstallApplication');
     $configBo = new PwConfigSet('site');
     $config = $install->getConfig('style-type');
     foreach ($config as $k => $v) {
         $configBo->set("theme.{$k}.pack", $v[1]);
         $pack = Wind::getRealDir('THEMES:' . str_replace('/', '.', $v[1]) . '.default');
         $id = $this->install($pack);
         if (!$id) {
             continue;
         }
         $dm = new PwStyleDm();
         $dm->setAppid($id)->setIsCurrent(1);
         $this->_styleDs()->updateStyle($dm);
         $configBo->set("theme.{$k}.default", 'default');
     }
     $configBo->flush();
 }
开发者ID:fanqimeng,项目名称:4tweb,代码行数:23,代码来源:PwStyleInit.php

示例10: getNavType

 public function getNavType()
 {
     $navType = array();
     $dir = Wind::getRealDir('SRV:nav.srv.navtype.');
     $list = WindFolder::read($dir, WindFolder::READ_FILE);
     foreach ($list as $v) {
         $v = $dir . $v;
         if (!is_file($v)) {
             continue;
         }
         $types = @(include $v);
         foreach ($types as $type) {
             if (!isset($type['type'])) {
                 continue;
             }
             $navType[$type['type']] = $type['name'];
         }
     }
     return $navType;
 }
开发者ID:chendong0444,项目名称:phpwind,代码行数:20,代码来源:PwNavService.php

示例11: doCompile

 public function doCompile()
 {
     $JS_DEV_PATH = Wind::getRealDir('PUBLIC:res.js.dev');
     $JS_BUILD_PATH = Wind::getRealDir('PUBLIC:res.js.build');
     Wind::import('Wind:utility.WindFolder');
     $files = $this->_getFiles($JS_DEV_PATH);
     foreach ($files as $file) {
         $newfile = $JS_BUILD_PATH . substr($file, strlen($JS_DEV_PATH));
         WindFolder::mkRecur(dirname($newfile));
         if (substr($file, -3) != '.js') {
             if (!copy($file, $newfile)) {
                 return new PwError('copy failed');
             }
             continue;
         }
         $content = WindFile::read($file);
         $compress = jscompress::pack($content);
         if (!WindFile::write($newfile, $compress)) {
             return new PwError('write failed');
         }
     }
 }
开发者ID:ccq18,项目名称:EduSoho,代码行数:22,代码来源:PwJsCompress.php

示例12: moduleAction

 public function moduleAction()
 {
     $moduleId = (int) $this->getInput('moduleid', 'post');
     Wind::import('SRV:design.bo.PwDesignModuleBo');
     $bo = new PwDesignModuleBo($moduleId);
     $module = $bo->getModule();
     if ($module['isused']) {
         $this->setTemplate('');
     }
     $bo->setStdId();
     $key = Wekit::load('design.srv.display.PwDesignDisplay')->bindDataKey($moduleId);
     $data[$key] = $bo->getData(true, false);
     $this->setOutput($data, '__design_data');
     list($theme, ) = $this->getForward()->getWindView()->getTheme();
     if (is_array($theme)) {
         list($theme, $pack) = $theme;
     }
     if (!$theme) {
         $theme = 'default';
     }
     WindFolder::rm(Wind::getRealDir('DATA:compile.template.' . $theme . '.design.segment.'), true);
     $this->setTemplate('TPL:design.segment.module');
 }
开发者ID:chendong0444,项目名称:phpwind,代码行数:23,代码来源:DesignController.php

示例13: getUnInstalledThemes

 /**
  * 查找未安装的风格
  *
  * @return array 未安装的风格名
  */
 public function getUnInstalledThemes()
 {
     $config = Wekit::load('APPCENTER:service.srv.PwInstallApplication')->getConfig('style-type');
     $themes = array();
     foreach ($config as $k => $v) {
         $dir = Wind::getRealDir('THEMES:' . $v[1]);
         $files = WindFolder::read($dir, WindFolder::READ_DIR);
         foreach ($files as $file) {
             if (WindFile::isFile($dir . '/' . $file . '/' . $this->manifest)) {
                 $themes[$k][] = $file;
             }
         }
     }
     if (empty($themes)) {
         return array();
     }
     $styles = array();
     foreach ($themes as $k => $v) {
         $r = $this->_styleDs()->fetchStyleByAliasAndType($v, $k, 'alias');
         $r = array_diff($v, array_keys($r));
         $r && ($styles[$k] = $r);
     }
     return $styles;
 }
开发者ID:chendong0444,项目名称:phpwind,代码行数:29,代码来源:PwStyleService.php

示例14: _setAudioPath

 private static function _setAudioPath()
 {
     self::$_audioPath = Wind::getRealDir(self::$path . 'audio');
 }
开发者ID:ccq18,项目名称:EduSoho,代码行数:4,代码来源:PwAudioCode.php

示例15: exportAction

 /**
  * 导出压缩包
  *
  */
 public function exportAction()
 {
     $alias = $this->getInput('alias', 'get');
     Wind::import('LIB:utility.PwZip');
     $dir = Wind::getRealDir('EXT:' . $alias);
     if (!is_dir($dir)) {
         $this->showError('fail');
     }
     $target = Wind::getRealPath('DATA:tmp.' . $alias . '.zip', true);
     PwApplicationHelper::zip($dir, $target);
     $timestamp = Pw::getTime();
     $this->getResponse()->setHeader('Last-Modified', gmdate('D, d M Y H:i:s', $timestamp + 86400) . ' GMT');
     $this->getResponse()->setHeader('Expires', gmdate('D, d M Y H:i:s', $timestamp + 86400) . ' GMT');
     $this->getResponse()->setHeader('Cache-control', 'max-age=86400');
     $this->getResponse()->setHeader('Content-type', 'application/x-zip-compressed');
     $this->getResponse()->setHeader('Content-Disposition', 'attachment; filename=' . $alias . '.zip');
     $this->getResponse()->sendHeaders();
     @readfile($target);
     WindFile::del($target);
     $this->getResponse()->sendBody();
     exit;
 }
开发者ID:chendong0444,项目名称:phpwind,代码行数:26,代码来源:AppController.php


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