本文整理汇总了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;
}
示例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;
}
示例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;
}
示例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');