PHP_UML
[ class tree: PHP_UML ] [ index: PHP_UML ] [ all elements ]

Class: PHP_UML_FileScanner

Source Location: /PHP_UML-1.0.1/UML/FileScanner.php

Class Overview


A superclass for scanning files and folders. It does nothing but browsing recursively the file system tree, given a list of entry folders. At least one folder must be provided.


Author(s):

Variables

Methods


Child classes:

PHP_UML_FileScannerImpl
The PHP_UML implementation of a FileScanner class.

Inherited Variables

Inherited Methods


Class Details

[line 34]
A superclass for scanning files and folders. It does nothing but browsing recursively the file system tree, given a list of entry folders. At least one folder must be provided.

It can be seen as an extension of RecursiveDirectoryIterator, upon which it is based.



[ Top ]


Class Variables

$directories = array()

[line 42]

List of directories to scan
  • Access: public

Type:   array


[ Top ]

$files = array()

[line 49]

List of files to scan
  • Access: public

Type:   array


[ Top ]

$ignorePatterns = array()

[line 63]

Ignored directories (possible wildcards are ? and *)
  • Access: public

Type:   array();


[ Top ]

$matchPatterns = array('*.php')

[line 56]

Allowed path-/file-names (possible wildcards are ? and *)
  • Access: public

Type:   array


[ Top ]



Method Detail

__construct (Constructor)   [line 70]

PHP_UML_FileScanner __construct( )

Constructor
  • Access: public

Overridden in child classes as:

PHP_UML_FileScannerImpl::__construct()
Constructor

[ Top ]

raiseUnknownFolderException   [line 134]

void raiseUnknownFolderException( string $basedir)

Can be overriden to treat unknown folder exception
  • Access: public

Overridden in child classes as:

PHP_UML_FileScannerImpl::raiseUnknownFolderException()

Parameters:

string   $basedir     Directory name

[ Top ]

scan   [line 90]

void scan( )

Starts the scan
  • Access: public

[ Top ]

tickFile   [line 84]

void tickFile( mixed $basedir, string $filename)

This function will be called every time the scanner meets a new file (while it looks into the folders), as well as for each file defined in the property $files.

It's up to the subclass to define the treatment to be done.

  • Abstract:

Overridden in child classes as:

PHP_UML_FileScannerImpl::tickFile()
Implementation of tickFile() : we parse every file met.

Parameters:

mixed   $basedir     Directory path
string   $filename     File name

[ Top ]


Documentation generated on Thu, 27 Aug 2009 17:30:06 +0000 by phpDocumentor 1.4.2. PEAR Logo Copyright © PHP Group 2004.