ILIAS
trunk Revision v11.0_alpha-1749-g1a06bdef097
|
Class ilCtrlStructureReader is responsible for reading ilCtrl's control structure. More...
Public Member Functions | |
__construct (ilCtrlIteratorInterface $iterator, ilCtrlStructureCidGenerator $cid_generator) | |
ilCtrlStructureReader Constructor More... | |
isExecuted () | |
Returns whether this instance was already executed or not. More... | |
readStructure () | |
Processes all classes within the ILIAS installation. More... | |
Data Fields | |
const | REGEX_GUI_CLASS_NAME = '/^class\.([A-z0-9]*(GUI))\.php$/' |
Private Member Functions | |
getReferencedClassesByReflection (ReflectionClass $reflection, string $regex) | |
Returns all classes referenced by an ilCtrl_Calls or ilCtrl_isCalledBy statement. More... | |
getRelativePath (string $absolute_path) | |
Returns a given path relative to the ILIAS absolute path. More... | |
getChildren (ReflectionClass $reflection) | |
Helper function that returns all children references. More... | |
getParents (ReflectionClass $reflection) | |
Helper function that returns all parent references. More... | |
stripWhitespaces (string $string) | |
Helper function that replaces all whitespace characters from the given string. More... | |
isGuiClass (string $path) | |
Returns whether the given file/path matches ILIAS conventions. More... | |
isNamespaced (string $class_name) | |
Returns if the given classname is namespaced. More... | |
Private Attributes | |
const | REGEX_PHPDOC_CALLS = '/(((?i)@ilctrl_calls)\s*({CLASS_NAME}(:\s*|\s*:\s*))\K)([A-z0-9,\s])*/' |
const | REGEX_PHPDOC_CALLED_BYS = '/(((?i)@ilctrl_iscalledby)\s*({CLASS_NAME}(:\s*|\s*:\s*))\K)([A-z0-9,\s])*/' |
ilCtrlStructureCidGenerator | $cid_generator |
ilCtrlIteratorInterface | $iterator |
bool | $is_executed = false |
string | $ilias_path |
Class ilCtrlStructureReader is responsible for reading ilCtrl's control structure.
Definition at line 30 of file class.ilCtrlStructureReader.php.
ilCtrlStructureReader::__construct | ( | ilCtrlIteratorInterface | $iterator, |
ilCtrlStructureCidGenerator | $cid_generator | ||
) |
ilCtrlStructureReader Constructor
ilCtrlIteratorInterface | $iterator | |
ilCtrlStructureCidGenerator | $cid_generator |
Definition at line 85 of file class.ilCtrlStructureReader.php.
References $cid_generator, and $iterator.
|
private |
Helper function that returns all children references.
ReflectionClass | $reflection |
Definition at line 224 of file class.ilCtrlStructureReader.php.
References getReferencedClassesByReflection().
Referenced by readStructure().
|
private |
Helper function that returns all parent references.
ReflectionClass | $reflection |
Definition at line 235 of file class.ilCtrlStructureReader.php.
References getReferencedClassesByReflection().
Referenced by readStructure().
|
private |
Returns all classes referenced by an ilCtrl_Calls or ilCtrl_isCalledBy statement.
ReflectionClass | $reflection | |
string | $regex |
Definition at line 169 of file class.ilCtrlStructureReader.php.
References stripWhitespaces().
Referenced by getChildren(), and getParents().
|
private |
Returns a given path relative to the ILIAS absolute path.
string | $absolute_path |
Definition at line 208 of file class.ilCtrlStructureReader.php.
Referenced by readStructure().
ilCtrlStructureReader::isExecuted | ( | ) |
Returns whether this instance was already executed or not.
Definition at line 102 of file class.ilCtrlStructureReader.php.
References $is_executed.
|
private |
Returns whether the given file/path matches ILIAS conventions.
string | $path |
Definition at line 258 of file class.ilCtrlStructureReader.php.
Referenced by readStructure().
|
private |
Returns if the given classname is namespaced.
string | $class_name |
Definition at line 269 of file class.ilCtrlStructureReader.php.
Referenced by readStructure().
ilCtrlStructureReader::readStructure | ( | ) |
Processes all classes within the ILIAS installation.
Definition at line 112 of file class.ilCtrlStructureReader.php.
References Vendor\Package\$e, $path, $structure, getChildren(), getParents(), getRelativePath(), isGuiClass(), isNamespaced(), ilCtrlStructureInterface\KEY_CLASS_CHILDREN, ilCtrlStructureInterface\KEY_CLASS_CID, ilCtrlStructureInterface\KEY_CLASS_NAME, ilCtrlStructureInterface\KEY_CLASS_PARENTS, and ilCtrlStructureInterface\KEY_CLASS_PATH.
|
private |
Helper function that replaces all whitespace characters from the given string.
string | $string |
Definition at line 247 of file class.ilCtrlStructureReader.php.
Referenced by getReferencedClassesByReflection().
|
private |
Definition at line 56 of file class.ilCtrlStructureReader.php.
Referenced by __construct().
|
private |
Definition at line 77 of file class.ilCtrlStructureReader.php.
|
private |
Definition at line 70 of file class.ilCtrlStructureReader.php.
Referenced by isExecuted().
|
private |
Definition at line 63 of file class.ilCtrlStructureReader.php.
Referenced by __construct().
const ilCtrlStructureReader::REGEX_GUI_CLASS_NAME = '/^class\.([A-z0-9]*(GUI))\.php$/' |
Definition at line 36 of file class.ilCtrlStructureReader.php.
|
private |
Definition at line 49 of file class.ilCtrlStructureReader.php.
|
private |
Definition at line 43 of file class.ilCtrlStructureReader.php.