Go to the documentation of this file.00001 <?php
00019 class axDirectoryFilterIterator extends FilterIterator {
00020
00025 protected $_exclude;
00026
00032 public function __construct(DirectoryIterator $iterator, array $exclude = array('.', '..')) {
00033 parent::__construct($iterator);
00034 }
00035
00041 public function accept () {
00042 if (empty($this->_exclude))
00043 return true;
00044 else
00045 return $this->current()->isFile() && !in_array((string)$this->current(), $this->_exclude);
00046 }
00047
00056 public function exclude ($filename) {
00057 if (!func_num_args())
00058 return $this;
00059
00060 $this->_exclude = array_merge($this->_exclude, func_get_args());
00061 return $this;
00062 }
00063 }