ILIAS
release_8 Revision v8.19
◀ ilDoc Overview
Main Page
Related Pages
Modules
+
Namespaces
Namespace List
+
Namespace Members
+
All
$
_
a
b
c
d
e
f
g
h
i
j
l
m
n
o
p
r
s
t
u
v
w
x
+
Functions
_
a
b
c
d
e
f
g
h
i
l
m
n
o
p
r
s
t
u
v
w
x
+
Variables
$
a
b
c
d
e
f
g
h
j
l
m
p
s
t
u
+
Data Structures
Data Structures
Data Structure Index
Class Hierarchy
+
Data Fields
+
All
$
_
a
b
c
d
e
f
g
h
i
j
k
l
m
n
o
p
q
r
s
t
u
v
w
x
y
z
Ö
+
Functions
_
a
b
c
d
e
f
g
h
i
j
k
l
m
n
o
p
q
r
s
t
u
v
w
x
y
z
+
Variables
$
a
b
c
d
e
f
g
h
i
j
k
l
m
n
o
p
q
r
s
t
u
v
w
x
y
z
Ö
+
Files
File List
+
Globals
+
All
$
_
a
b
c
d
e
f
g
h
i
j
k
l
m
n
o
p
r
s
t
u
v
w
x
z
+
Functions
_
a
b
c
d
e
g
h
i
m
n
p
r
s
t
u
v
x
+
Variables
$
a
c
d
e
f
g
h
i
j
k
l
m
n
o
p
r
s
t
u
v
w
z
Examples
•
All
Data Structures
Namespaces
Files
Functions
Variables
Modules
Pages
FactoriesCrawler.php
Go to the documentation of this file.
1
<?php
2
3
declare(strict_types=1);
4
21
namespace
ILIAS\UI\Implementation\Crawler
;
22
23
use
ILIAS\UI\Implementation\Crawler\Entry
as Entry;
24
25
/***
26
* @author Timon Amstutz <timon.amstutz@ilub.unibe.ch>
27
* @version $Id$
28
*/
29
class
FactoriesCrawler
implements
Crawler
30
{
31
protected
?
EntriesYamlParser
$parser
= null;
32
protected
?
Exception\Factory
$ef
= null;
33
34
public
function
__construct
()
35
{
36
$this->parser =
new
EntriesYamlParser
();
37
$this->ef =
new
Exception\Factory
();
38
}
39
43
public
function
crawlFactory
(
44
string
$factoryPath,
45
Entry\ComponentEntry $parent = null,
46
int
$depth = 0
47
): Entry\ComponentEntries {
48
$depth++;
49
if
($depth > 30) {
50
throw
$this->ef->exception(
Exception
\CrawlerException::CRAWL_MAX_NESTING_REACHED,
" Current Path: "
. $factoryPath .
" Parent: "
. $parent->getId());
51
}
52
$entries = $this->parser->parseEntriesFromFile($factoryPath);
53
54
$children =
new
Entry\ComponentEntries();
55
56
foreach
($entries as $entry) {
57
if
($entry->isAbstract()) {
58
$children->addEntries($this->
crawlFactory
($entry->getPath() .
".php"
, $entry, $depth));
59
}
60
if
($parent) {
61
$entry->setParent($parent->getId());
62
$parent->addChild($entry->getId());
63
}
64
}
65
$entries->addEntries($children);
66
return
$entries;
67
}
68
}
ILIAS\UI\Implementation\Crawler\FactoriesCrawler\__construct
__construct()
Definition:
FactoriesCrawler.php:34
ILIAS\UI\Implementation\Crawler\FactoriesCrawler
Definition:
FactoriesCrawler.php:29
ILIAS\UI\Implementation\Crawler\EntriesYamlParser
Definition:
EntriesYamlParser.php:30
ILIAS\UI\Implementation\Crawler\Entry
This file is part of ILIAS, a powerful learning management system published by ILIAS open source e-Le...
Definition:
AbstractEntryPart.php:21
ILIAS\UI\Implementation\Crawler\FactoriesCrawler\crawlFactory
crawlFactory(string $factoryPath, Entry\ComponentEntry $parent=null, int $depth=0)
Starts with the factory indicated by factory path and crawles form this point all subsequent factorie...
Definition:
FactoriesCrawler.php:43
ILIAS\UI\Implementation\Crawler\Exception\Factory
Definition:
Factory.php:23
ILIAS\UI\Implementation\Crawler\FactoriesCrawler\$ef
Exception Factory $ef
Definition:
FactoriesCrawler.php:32
ILIAS\UI\Implementation\Crawler\FactoriesCrawler\$parser
EntriesYamlParser $parser
Definition:
FactoriesCrawler.php:31
ILIAS\UI\Implementation\Crawler
This file is part of ILIAS, a powerful learning management system published by ILIAS open source e-Le...
Definition:
Crawler.php:21
Exception
src
UI
Implementation
Crawler
FactoriesCrawler.php
Generated on Sun Apr 6 2025 22:03:04 for ILIAS by
1.8.13 (using
Doxyfile
)