Exponential Basic 2.4.0.1 Exponential Basic CMS — PHP Class Reference

dfs_filter_iterator.php
Go to the documentation of this file.
1 <?php
15 class eZDFSFileHandlerDFSBackendFilterIterator extends FilterIterator
16 {
20 private $prefix;
21
22 public function __construct( Iterator $iterator, $prefix )
23 {
24 parent::__construct( $iterator );
25 $this->prefix = $prefix;
26 }
27
31 public function accept()
32 {
33 return $this->getInnerIterator()->current()->isFile();
34 }
35
41 public function current()
42 {
44 $file = $this->getInnerIterator()->current();
45 $filePathName = $file->getPathname();
46
47 // Trim prefix + 1 for leading /
48 return substr( $filePathName, strlen( $this->prefix ) + 1 );
49 }
50 }
eZDFSFileHandlerDFSBackendFilterIterator
Definition: dfs_filter_iterator.php:16
eZDFSFileHandlerDFSBackendFilterIterator\accept
accept()
Definition: dfs_filter_iterator.php:31
eZDFSFileHandlerDFSBackendFilterIterator\$prefix
$prefix
Definition: dfs_filter_iterator.php:20
eZDFSFileHandlerDFSBackendFilterIterator\__construct
__construct(Iterator $iterator, $prefix)
Definition: dfs_filter_iterator.php:22
$file
$file
Definition: ezfilemanager/user/filedownload.php:35
Copyright © 1998 – 2026 7x. All rights reserved. Licensed under the GNU GPLv2+.