RegexFindFile Class Reference
[Example classes]

Find files by regular expression. More...

Inheritance diagram for RegexFindFile:

Inheritance graph
{FindFile\n|- $file\l|+ __construct()\l+ accept()\l+ getSearch()\l}
[legend]
Collaboration diagram for RegexFindFile:

Collaboration graph
{FindFile\n|- $file\l|+ __construct()\l+ accept()\l+ getSearch()\l}
[legend]
List of all members.

Public Member Functions

 __construct ($path, $regex)
 accept ()
 getSearch ()

Detailed Description

Find files by regular expression.

Author:
Marcus Boerger
Version:
1.1

Definition at line 18 of file regexfindfile.inc.


Constructor & Destructor Documentation

RegexFindFile::__construct ( path,
regex 
)

Construct from path and regular expression.

Parameters:
$path the directory to search in If path contains ';' then this parameter is split and every part of it is used as separate directory.
$regex perl style regular expression to find files with

Reimplemented from FindFile.

Definition at line 27 of file regexfindfile.inc.

00028     {
00029         parent::__construct($path, $regex);
00030     }


Member Function Documentation

RegexFindFile::accept (  ) 

Returns:
whether the current filename matches the regular expression.

Reimplemented from FindFile.

Definition at line 34 of file regexfindfile.inc.

References FindFile::getSearch().

00035     {
00036         return preg_match($this->getSearch(), $this->current());
00037     }

Here is the call graph for this function:

FindFile::getSearch

FindFile::getSearch (  )  [inherited]

Returns:
the filename to search for.

Note:
This may be overloaded and contain a regular expression for an extended class that uses regular expressions to search.

Definition at line 59 of file findfile.inc.

Referenced by accept().

00060     {
00061         return $this->file;
00062     }


The documentation for this class was generated from the following file:
Generated on Thu Apr 26 01:07:21 2007 for SPL-StandardPHPLibrary by  doxygen 1.5.2