3 declare(strict_types=1);
     7 require_once __DIR__ . 
'/../../../../libs/composer/vendor/autoload.php';
    29     private const REGEX_PHPDOC_CALLS = 
'/(((?i)@ilctrl_calls)\s*({CLASS_NAME}(:\s*|\s*:\s*))\K)([A-z0-9,\s])*/';
    73         $this->ilias_path = rtrim(
    74             (defined(
'ILIAS_ABSOLUTE_PATH')) ?
    75                 ILIAS_ABSOLUTE_PATH : dirname(__FILE__, 5),
   101         foreach ($this->iterator as $class_name => 
$path) {
   107             $lower_class_name = strtolower($class_name);
   128                 if (in_array(ilCtrlBaseClassInterface::class, $reflection->getInterfaceNames(), 
true)) {
   129                     $base_classes[] = $lower_class_name;
   137             ->mapStructureReferences()
   138             ->filterUnnecessaryEntries()
   142         $this->is_executed = 
true;
   144         return $mapped_structure;
   158         if (!$reflection->getDocComment()) {
   164         $name = str_replace(
'\\', 
'\\\\', $reflection->getName());
   165         $regex = str_replace(
'{CLASS_NAME}', $name, $regex);
   166         preg_match_all($regex, $reflection->getDocComment(), $matches);
   170         if (empty($matches[0])) {
   174         $referenced_classes = [];
   175         foreach ($matches[0] as $class_list) {
   177             foreach (explode(
',', $class_list) as $class) {
   179                 if (!empty($class_name)) {
   180                     $referenced_classes[] = strtolower($class_name);
   185         return $referenced_classes;
   199         $absolute_path = realpath($absolute_path);
   201         return '.' . str_replace($this->ilias_path, 
'', $absolute_path);
   235         return (
string) preg_replace(
'/\s+/', 
'', $string);
   246         return (
bool) preg_match(self::REGEX_GUI_CLASS_NAME, basename($path));
   257         return (
false !== strpos($class_name, 
'\\'));
 readStructure()
Processes all classes within the ILIAS installation. 
 
ilCtrlIteratorInterface $iterator
 
Class ilCtrlStructureHelper. 
 
__construct(ilCtrlIteratorInterface $iterator, ilCtrlStructureCidGenerator $cid_generator)
ilCtrlStructureReader Constructor 
 
Class ilCtrlStructureCidGenerator. 
 
isNamespaced(string $class_name)
Returns if the given classname is namespaced. 
 
const REGEX_GUI_CLASS_NAME
 
isExecuted()
Returns whether this instance was already executed or not. 
 
stripWhitespaces(string $string)
Helper function that replaces all whitespace characters from the given string. 
 
getReferencedClassesByReflection(ReflectionClass $reflection, string $regex)
Returns all classes referenced by an ilCtrl_Calls or ilCtrl_isCalledBy statement. ...
 
ilCtrlStructureCidGenerator $cid_generator
 
getChildren(ReflectionClass $reflection)
Helper function that returns all children references. 
 
Class ilCtrlStructureReader is responsible for reading ilCtrl's control structure. 
 
Interface ilCtrlIteratorInterface. 
 
const KEY_CLASS_CID
array key constants that are used for certain information. 
 
getRelativePath(string $absolute_path)
Returns a given path relative to the ILIAS absolute path. 
 
$structure
TOTAL STRUCTURE. 
 
const REGEX_PHPDOC_CALLED_BYS
 
getParents(ReflectionClass $reflection)
Helper function that returns all parent references. 
 
isGuiClass(string $path)
Returns whether the given file/path matches ILIAS conventions.