/
class.ilBiblAdminFactoryFacade.php
105 lines (89 loc) · 1.93 KB
/
class.ilBiblAdminFactoryFacade.php
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
<?php
/**
* Interface ilBiblAdminFactoryFacade
*
* @author Fabian Schmid <fs@studer-raimann.ch>
*/
class ilBiblAdminFactoryFacade implements ilBiblAdminFactoryFacadeInterface
{
/**
* @var \ilBiblTranslationFactory
*/
protected $translation_factory;
/**
* @var \ilBiblFieldFactory
*/
protected $field_factory;
/**
* @var \ilBiblTypeInterface|\ilBibTex|\ilRis
*/
protected $type;
/**
* @var \ilBiblTypeFactory
*/
protected $type_factory;
/**
* @var int
*/
protected $object_id;
/**
* @var int
*/
protected $ref_id;
/**
* ilBiblAdminFactoryFacade constructor.
*
* @param \ilObjBibliographicAdmin $ilObjBibliographicAdmin
*/
public function __construct(ilObjBibliographicAdmin $ilObjBibliographicAdmin, $type_id)
{
$this->object_id = $ilObjBibliographicAdmin->getId();
$this->ref_id = $ilObjBibliographicAdmin->getRefId();
$this->type_factory = new ilBiblTypeFactory();
$this->type = $this->type_factory->getInstanceForType($type_id);
$this->field_factory = new ilBiblFieldFactory($this->type);
$this->translation_factory = new ilBiblTranslationFactory($this->field_factory);
}
/**
* @inheritDoc
*/
public function typeFactory()
{
return $this->type_factory;
}
/**
* @inheritDoc
*/
public function type()
{
return $this->type;
}
/**
* @inheritDoc
*/
public function translationFactory()
{
return $this->translation_factory;
}
/**
* @inheritDoc
*/
public function fieldFactory()
{
return $this->field_factory;
}
/**
* @inheritDoc
*/
public function iliasObjId()
{
return $this->object_id;
}
/**
* @inheritDoc
*/
public function iliasRefId()
{
return $this->ref_id;
}
}