Class rex_finder
-
rex_finder
implements
IteratorAggregate,
Countable
uses
rex_factory_trait
Methods summary
public static
static
|
#
factory( string $dir )
Returns a new finder object.
Returns a new finder object.
Parameters
Returns
static static
Throws
InvalidArgumentException InvalidArgumentException
|
|
public
mixed
|
#
recursive( boolean $recursive = true )
Activate/Deactivate recursive directory scanning.
Activate/Deactivate recursive directory scanning.
Parameters
Returns
mixed $this
|
|
public
mixed
|
#
selfFirst( )
Fetch directory contents before recurse its subdirectories.
Fetch directory contents before recurse its subdirectories.
Returns
mixed $this
|
|
public
mixed
|
#
childFirst( )
Fetch child directories before their parent directory.
Fetch child directories before their parent directory.
Returns
mixed $this
|
|
public
mixed
|
#
filesOnly( )
Fetch files only.
Returns
mixed $this
|
|
public
mixed
|
#
dirsOnly( )
Fetch dirs only.
Returns
mixed $this
|
|
public
mixed
|
#
ignoreFiles( string|array $glob, boolean $recursive = true )
Ignore all files which match the given glob pattern.
Ignore all files which match the given glob pattern.
Parameters
- $glob
- Glob pattern or an array of glob patterns
- $recursive
- When FALSE the patterns won't be checked in child directories
Returns
mixed $this
|
|
public
mixed
|
#
ignoreDirs( string|array $glob, boolean $recursive = true )
Ignore all directories which match the given glob pattern.
Ignore all directories which match the given glob pattern.
Parameters
- $glob
- Glob pattern or an array of glob patterns
- $recursive
- When FALSE the patterns won't be checked in child directories
Returns
mixed $this
|
|
public
mixed
|
#
ignoreSystemStuff( boolean $ignoreSystemStuff = true )
Ignores system stuff (like .DS_Store, .svn, .git etc.).
Ignores system stuff (like .DS_Store, .svn, .git etc.).
Parameters
Returns
mixed $this
|
|
public
mixed
|
#
sort( integer|callable $sort = rex_sortable_iterator::KEYS )
Sorts the elements.
Parameters
- $sort
- Sort mode, see <code><a href="class-rex_sortable_iterator.html#___construct">rex_sortable_iterator::__construct()</a></code>
Returns
mixed $this
|
|
public
Iterator|SplFileInfo[]
|
#
getIterator( )
Returns
Iterator|SplFileInfo[] Iterator|SplFileInfo[]
Implementation of
IteratorAggregate::getIterator()
|
|
public
|
#
count( )
Implementation of
Countable::count()
|
|
callFactoryClass()
,
getFactoryClass()
,
hasFactoryClass()
,
setFactoryClass()
Constants summary