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


PHP NextendFilesystem::files方法代码示例

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


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

 function getData($number)
 {
     $data = array();
     $folder = $this->_data->get('sourcefolder', '');
     $files = NextendFilesystem::files($folder);
     $j = 0;
     for ($i = 0; $i < count($files) && $j < $number; $i++) {
         $ext = strtolower(pathinfo($files[$i], PATHINFO_EXTENSION));
         if ($ext == 'jpg' || $ext == 'jpeg' || $ext == 'png') {
             $data[$j] = array();
             $data[$j]['thumbnail'] = $data[$j]['image'] = $data[$j]['image_url'] = NextendUri::pathToUri($folder . $files[$i]);
             $data[$j]['title'] = $data[$j]['file_name'] = $files[$i];
             $j++;
         }
     }
     return $data;
 }
开发者ID:macconsultinggroup,项目名称:WordPress,代码行数:17,代码来源:generator.php

示例3: fetchElement

 function fetchElement()
 {
     $this->setfolder();
     $files = NextendFilesystem::files($this->_folder);
     $this->_xml->addChild('option', '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])));
         }
     }
     $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:01J,项目名称:bealtine,代码行数:18,代码来源:imagelist.php

示例4: foreach

" target="_blank">Preview</a>
        <?php 
    }
    ?>
    </div>
    <?php 
}
$freePath = NEXTEND_SMART_SLIDER2_ASSETS . 'admin/smart/free/';
$frees = NextendFilesystem::files($freePath);
foreach ($frees as $free) {
    if (pathinfo($free, PATHINFO_EXTENSION) == 'png') {
        generateImportThumbs($this, $freePath . $free, $free, $imagesToUrl);
    }
}
$fullPath = NEXTEND_SMART_SLIDER2_ASSETS . 'admin/smart/full/';
$fulls = NextendFilesystem::files($fullPath);
foreach ($fulls as $full) {
    if (pathinfo($full, PATHINFO_EXTENSION) == 'png') {
        generateImportThumbs($this, $fullPath . $full, $full, $imagesToUrl, true);
    }
}
?>
</div>


<?php 
$this->loadFragment('secondcolend');
?>

<?php 
$this->loadFragment('footer');
开发者ID:AndyHuntDesign,项目名称:andyhuntdesign,代码行数:31,代码来源:create.php


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