Api‎ > ‎Util‎ > ‎Source‎ > ‎

Parser

Class RSourceParser

Parses a php source file.

Vars

Functions

static RClassSource function getClass($file)

Singleton function that reads and parses a php class source

$fileThename of the file
returnsRClassSourceThe class source instance.

string function stripSingleComment($contents)

Strips contentsfrom single line comments.

$contentsThecontents to be stripped.
returnsstringThe stripped contents.

void function parseMultiComment($contents)

Strips object contents variable from single line comments.

$contentsThecontents 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.

returnsRSourceClassAn 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.

returnsRSourceFunctionAn 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.

$contentsThecontents to be stripped.
returnsRSourceClassAn instance of the source class object.
Comments