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

Class: PHP_UML_FileScanner

Source Location: /PHP_UML-1.6.2/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_Input_ImporterFileScanner
Defines a way to import data by relying on a scan of a set of files/folders, and then get the result as a UML model (as a superstructure).

Inherited Variables

Inherited Methods


Class Details

[line 31]
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 39]

List of directories to scan
  • Access: protected

Type:   array


[ Top ]

$files = array()

[line 46]

List of files to scan
  • Access: protected

Type:   array


[ Top ]

$ignorePatterns = array()

[line 60]

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

Type:   array();


[ Top ]

$matchPatterns = array('*.php')

[line 53]

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

Type:   array


[ Top ]



Method Detail

__construct (Constructor)   [line 67]

PHP_UML_FileScanner __construct( )

Constructor
  • Access: public

Overridden in child classes as:

PHP_UML_Input_ImporterFileScanner::__construct()

[ Top ]

raiseUnknownFolderException   [line 131]

void raiseUnknownFolderException( string $basedir)

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

Overridden in child classes as:

PHP_UML_Input_ImporterFileScanner::raiseUnknownFolderException()

Parameters:

string   $basedir   —  Directory name

[ Top ]

scan   [line 87]

void scan( )

Starts the scan
  • Access: public

[ Top ]

setDirectories   [line 140]

void setDirectories( array $directories)

  • Access: public

Parameters:

array   $directories   — 

[ Top ]

setFiles   [line 135]

void setFiles( array $files)

  • Access: public

Parameters:

array   $files   — 

[ Top ]

setIgnorePatterns   [line 150]

void setIgnorePatterns( array $patterns)

  • Access: public

Parameters:

array   $patterns   — 

[ Top ]

setMatchPatterns   [line 145]

void setMatchPatterns( array $patterns)

  • Access: public

Parameters:

array   $patterns   — 

[ Top ]

tickFile   [line 81]

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_Input_PHP_FileScanner::tickFile()
Implementation of tickFile() : we parse every file met.
PHP_UML_Input_XMI_FileScanner::tickFile()
Implementation of tickFile(): we update the model with the information found in the XMI file.

Parameters:

mixed   $basedir   —  Directory path
string   $filename   —  File name

[ Top ]


Documentation generated on Mon, 11 Mar 2019 16:01:23 -0400 by phpDocumentor 1.4.4. PEAR Logo Copyright © PHP Group 2004.