#include <phpfiles.h>
Public Member Functions | |
PHPFiles (istream &phpConfig, int iyydebug=0) | |
Constructor. | |
void | execute () |
Refactors all files. | |
~PHPFiles () | |
Destructor. | |
Private Types | |
typedef list< PHPFileInfo > | PHPFileInfoList |
List of file infos. | |
typedef PHPFileInfoList::iterator | iterator |
PHPFileInfoList iterator. | |
typedef PHPFileInfoList::const_iterator | const_iterator |
PHPFileInfoList iterator. | |
Private Member Functions | |
void | phpHeader (StatementList *phpOut) const |
Generates php file header -- smarty initialization. | |
void | phpFooter (StatementList *phpOut, const string tplName) const |
Generates php file footer -- smarty dispaly. | |
void | executeRuleSystemAtTime () |
Executes RuleSystem on all files. | |
void | executeRuleSystem () |
Executes RuleSystem on all files for all times. | |
void | loadIn () |
Loads and normalizes the files. | |
void | saveOut () |
Saves refactored code to files. | |
void | processHTML () |
Finds similar parts of html. | |
Private Attributes | |
RuleSystem | factor |
Rule system. | |
string | inDir |
Directory the files are taken from. | |
string | outDir |
Directory the files are stored to. | |
PHPFileInfoList | phpFileInfos |
Information about refactored php files. | |
HTMLBox | htmlBox |
Box for storing html and extracting similar code. | |
int | yydebug |
If true parser debug messages are printed. |
Definition at line 17 of file phpfiles.h.
|
PHPFileInfoList iterator.
Definition at line 47 of file phpfiles.h. |
|
PHPFileInfoList iterator.
Definition at line 45 of file phpfiles.h. Referenced by executeRuleSystemAtTime(), loadIn(), processHTML(), saveOut(), and ~PHPFiles(). |
|
List of file infos.
Definition at line 43 of file phpfiles.h. |
|
Constructor. Reads configuration file Definition at line 141 of file phpfiles.h. References htmlBox, inDir, outDir, phpFileInfos, HTMLBox::setOutDir(), and yydebug. |
|
Destructor.
Definition at line 168 of file phpfiles.h. References iterator, and phpFileInfos. |
|
Refactors all files.
Definition at line 155 of file phpfiles.h. References executeRuleSystem(), loadIn(), processHTML(), and saveOut(). Referenced by main(). |
|
Executes RuleSystem on all files for all times.
Definition at line 78 of file phpfiles.h. References executeRuleSystemAtTime(), factor, and RuleSystem::stepTime(). Referenced by execute(). |
|
Executes RuleSystem on all files.
Definition at line 65 of file phpfiles.h. References RuleSystem::execute(), factor, RuleSystem::getRuleRunTime(), iterator, and phpFileInfos. Referenced by executeRuleSystem(). |
|
Loads and normalizes the files.
Definition at line 85 of file phpfiles.h. References inDir, iterator, phpFileInfos, and yydebug. Referenced by execute(). |
|
Generates php file footer -- smarty dispaly.
Definition at line 9 of file phpfiles.cpp. References List::push_back(). Referenced by saveOut(). |
|
Generates php file header -- smarty initialization.
Definition at line 3 of file phpfiles.cpp. References List::push_front(). Referenced by saveOut(). |
|
Finds similar parts of html.
Definition at line 118 of file phpfiles.h. References htmlBox, iterator, phpFileInfos, HTMLBox::putter, and HTMLBox::replacer. Referenced by execute(). |
|
Saves refactored code to files.
Definition at line 99 of file phpfiles.h. References iterator, outDir, phpFileInfos, phpFooter(), phpHeader(), and phpName2tplName(). Referenced by execute(). |
|
Rule system.
Definition at line 35 of file phpfiles.h. Referenced by executeRuleSystem(), and executeRuleSystemAtTime(). |
|
Box for storing html and extracting similar code.
Definition at line 53 of file phpfiles.h. Referenced by PHPFiles(), and processHTML(). |
|
Directory the files are taken from.
Definition at line 38 of file phpfiles.h. Referenced by loadIn(), and PHPFiles(). |
|
Directory the files are stored to.
Definition at line 40 of file phpfiles.h. Referenced by PHPFiles(), and saveOut(). |
|
Information about refactored php files.
Definition at line 50 of file phpfiles.h. Referenced by executeRuleSystemAtTime(), loadIn(), PHPFiles(), processHTML(), saveOut(), and ~PHPFiles(). |
|
If true parser debug messages are printed.
Definition at line 56 of file phpfiles.h. Referenced by loadIn(), and PHPFiles(). |