Class RSourceParser
Parses a php source file.
Vars
Functions
static RClassSource function getClass($file)
Singleton function that reads and parses a php class source
$file | The | name of the file |
returns | RClassSource | The class source instance. |
string function stripSingleComment($contents)
Strips contentsfrom single line comments.
$contents | The | contents to be stripped. |
returns | string | The stripped contents. |
void function parseMultiComment($contents)
Strips object contents variable from single line comments.
$contents | The | contents to be stripped. |
void function parseSingleString()
parses single quote strings from the contents variable and records them into the string array.
void function parseDoubleString()
parses double quote strings from the contents variable and records them into the sring array.
RSourceClass function parseClass()
Parses and strips the class properties from the source and returns an SourceClass instance.
returns | RSourceClass | An instance of the source class object. |
void function parseFunctionBodies()
parses function bodies from the contents variable and records them into the body array.
RSourceFunction function parseFunctions()
Strips object contents variable from single line comments.
returns | RSourceFunction | An array of source function objects |
RSourceClass function parse($contents)
':
$this->parseMultiComment();
break;
case '#':
$this->stripSingleComment();
break;
}
}
}
/* Parses and strips the function properties from the source for each function returns list of functions.
$contents | The | contents to be stripped. |
returns | RSourceClass | An instance of the source class object. |
|