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


PHP NextendFilesystem::existsFolder方法代码示例

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


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

示例1: fetchElement

 function fetchElement()
 {
     $this->setfolder();
     $files = NextendFilesystem::files($this->_folder);
     $this->_xml->addChild('option', NextendText::_('No_image'))->addAttribute('value', -1);
     for ($i = 0; $i < count($files); $i++) {
         $ext = pathinfo($files[$i], PATHINFO_EXTENSION);
         if ($ext == 'jpg' || $ext == 'jpeg' || $ext == 'png') {
             $this->_xml->addChild('option', htmlspecialchars(ucfirst($files[$i])))->addAttribute('value', NextendFilesystem::toLinux(NextendFilesystem::pathToRelativePath($this->_folder . $files[$i])));
         }
     }
     if (nextendIsWordPress()) {
         $wpfolder = get_template_directory() . '/' . NextendXmlGetAttribute($this->_xml, 'folder') . '/';
         if (isset($_GET['nextendpath'])) {
             echo $wpfolder . "<br />";
         }
         if (NextendFilesystem::existsFolder($wpfolder)) {
             $files = NextendFilesystem::files($wpfolder);
             for ($i = 0; $i < count($files); $i++) {
                 $ext = pathinfo($files[$i], PATHINFO_EXTENSION);
                 if ($ext == 'jpg' || $ext == 'jpeg' || $ext == 'png') {
                     $this->_xml->addChild('option', htmlspecialchars(ucfirst($files[$i])))->addAttribute('value', NextendFilesystem::toLinux(NextendFilesystem::pathToRelativePath($wpfolder . $files[$i])));
                 }
             }
         }
     }
     $css = NextendCss::getInstance();
     $css->addCssLibraryFile('element/imagelist.css');
     $html = "<div class='nextend-imagelist' style='" . NextendXmlGetAttribute($this->_xml, 'style') . "'>";
     $html .= parent::fetchElement();
     $html .= '</div>';
     return $html;
 }
开发者ID:Nguyenkain,项目名称:Elearning,代码行数:33,代码来源:imagelist.php

示例2: onNextendSliderGeneratorList

 function onNextendSliderGeneratorList(&$group, &$list, $showall = false)
 {
     if ($showall || smartsliderIsFull()) {
         $installed = NextendFilesystem::existsFolder(JPATH_ADMINISTRATOR . DIRECTORY_SEPARATOR . 'components' . DIRECTORY_SEPARATOR . 'com_flexicontent');
         if ($showall || $installed) {
             $group[$this->_group] = 'FLEXIcontent';
             if (!isset($list[$this->_group])) {
                 $list[$this->_group] = array();
             }
             $list[$this->_group][$this->_group . '_items'] = array(NextendText::_('Items'), $this->getPath() . 'items' . DIRECTORY_SEPARATOR, true, true, $installed ? true : 'http://extensions.joomla.org/extensions/authoring-a-content/content-construction/10667', null);
         }
     }
 }
开发者ID:pguilford,项目名称:vcomcc,代码行数:13,代码来源:flexicontent.php

示例3: onNextendSliderGeneratorList

 function onNextendSliderGeneratorList(&$group, &$list, $showall = false)
 {
     if ($showall || smartsliderIsFull()) {
         $installed = NextendFilesystem::existsFolder(JPATH_ADMINISTRATOR . DIRECTORY_SEPARATOR . 'components' . DIRECTORY_SEPARATOR . 'com_phocagallery');
         if ($showall || $installed) {
             $group[$this->_group] = 'Phoca Gallery';
             if (!isset($list[$this->_group])) {
                 $list[$this->_group] = array();
             }
             $list[$this->_group][$this->_group . '_phocagalleryimages'] = array(NextendText::_('Images'), $this->getPath() . 'phocagalleryimages' . DIRECTORY_SEPARATOR, true, true, $installed ? true : 'http://extensions.joomla.org/extensions/photos-a-images/galleries/photo-gallery/3150', 'image_extended');
         }
     }
 }
开发者ID:pguilford,项目名称:vcomcc,代码行数:13,代码来源:phocagallery.php

示例4: onNextendSliderGeneratorList

 function onNextendSliderGeneratorList(&$group, &$list, $showall = false)
 {
     if ($showall || smartsliderIsFull()) {
         $installed = NextendFilesystem::existsFolder(JPATH_ADMINISTRATOR . DIRECTORY_SEPARATOR . 'components' . DIRECTORY_SEPARATOR . 'com_zoo');
         if ($installed) {
             $group[$this->_group] = 'ZOO';
             if (!isset($list[$this->_group])) {
                 $list[$this->_group] = array();
             }
             require_once JPATH_ADMINISTRATOR . DIRECTORY_SEPARATOR . 'components' . DIRECTORY_SEPARATOR . 'com_zoo' . DIRECTORY_SEPARATOR . 'config.php';
             $zoo = App::getInstance('zoo');
             $apps = $zoo->table->application->all(array('order' => 'name'));
             require_once $this->getPath() . 'items' . DIRECTORY_SEPARATOR . 'generator.php';
             foreach ($apps as $app) {
                 foreach ($app->getTypes() as $type) {
                     //Make them class name safe
                     $appid = preg_replace('/[^a-zA-Z0-9_\\x7f-\\xff]*/', '', $app->id);
                     $identifier = preg_replace('/[^a-zA-Z0-9_\\x7f-\\xff]*/', '', $type->identifier);
                     $list[$this->_group][$this->_group . '_items__' . $appid . '___' . $identifier] = array(ucfirst($app->name) . ' (' . ucfirst($type->identifier) . ')', $this->getPath() . 'items' . DIRECTORY_SEPARATOR, true, true, $installed ? true : 'http://extensions.joomla.org/extensions/authoring-a-content/content-construction/12479', null);
                     if (!class_exists('NextendGeneratorZoo_items__' . $appid . '___' . $identifier)) {
                         eval('class NextendGeneratorZoo_items__' . $appid . '___' . $identifier . ' extends NextendGeneratorZoo_Items{}');
                     }
                 }
             }
         } else {
             if ($showall) {
                 $group[$this->_group] = 'ZOO';
                 if (!isset($list[$this->_group])) {
                     $list[$this->_group] = array();
                 }
                 $list[$this->_group][$this->_group . '_items'] = array('Zoo', $this->getPath() . 'items' . DIRECTORY_SEPARATOR, true, true, 'http://extensions.joomla.org/extensions/authoring-a-content/content-construction/12479', null);
             }
         }
         $app = JFactory::getApplication();
         if ($app->isAdmin() && ((NextendRequest::getVar('action') == 'createdynamic' || NextendRequest::getVar('action') == 'generatorsettings') && NextendRequest::getVar('group') == 'zoo' && NextendRequest::getVar('type'))) {
             $class = 'NextendGenerator' . NextendRequest::getVar('type');
             $data = new NextendData();
             $data->set('source', NextendRequest::getVar('type'));
             new $class($data);
         }
     }
 }
开发者ID:pguilford,项目名称:vcomcc,代码行数:42,代码来源:zoo.php

示例5: createCacheSubFolder

 function createCacheSubFolder($path, $currentcachetime)
 {
     if (NextendFilesystem::existsFolder($path)) {
         return;
     }
     if ($this->_cacheTime != 'static' && $this->_cacheTime != 0) {
         $previouscachetime = $currentcachetime - $this->_cacheTime;
         $remove = NextendFilesystem::folders($this->_path);
         if ($remove !== false) {
             for ($i = 0; $i < count($remove) && $remove[$i] != $this->_prename . $previouscachetime; $i++) {
                 if ($remove[$i] != 'static') {
                     NextendFilesystem::deleteFolder($this->_path . $remove[$i]);
                 }
             }
         }
     }
     if (NextendFilesystem::createFolder($path)) {
         return;
     }
     echo NextendText::sprintf('Couldn\'t create the required cache dir: %s Please make sure that the folder writeable by PHP!', $path);
     exit;
 }
开发者ID:Nguyenkain,项目名称:Elearning,代码行数:22,代码来源:cache.php


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