@@ 34-87 (lines=54) @@ | ||
31 | * |
|
32 | * @author Julien Fastré <[email protected]> |
|
33 | */ |
|
34 | class Custodian extends Participation |
|
35 | { |
|
36 | /** |
|
37 | * |
|
38 | * @var AssignedCustodian |
|
39 | */ |
|
40 | protected $assignedCustodian; |
|
41 | ||
42 | public function __construct(AssignedCustodian $assignedCustodian) |
|
43 | { |
|
44 | $this->setAssignedCustodian($assignedCustodian); |
|
45 | } |
|
46 | ||
47 | /** |
|
48 | * |
|
49 | * @return AssignedCustodian |
|
50 | */ |
|
51 | public function getAssignedCustodian(): AssignedCustodian |
|
52 | { |
|
53 | return $this->assignedCustodian; |
|
54 | } |
|
55 | ||
56 | /** |
|
57 | * |
|
58 | * @param AssignedCustodian $assignedCustodian |
|
59 | * @return $this |
|
60 | */ |
|
61 | public function setAssignedCustodian(AssignedCustodian $assignedCustodian) |
|
62 | { |
|
63 | $this->assignedCustodian = $assignedCustodian; |
|
64 | ||
65 | return $this; |
|
66 | } |
|
67 | ||
68 | ||
69 | protected function getElementTag(): string |
|
70 | { |
|
71 | return 'custodian'; |
|
72 | } |
|
73 | ||
74 | public function getTypeCode() |
|
75 | { |
|
76 | return 'CST'; |
|
77 | } |
|
78 | ||
79 | public function toDOMElement(\DOMDocument $doc): \DOMElement |
|
80 | { |
|
81 | $el = $this->createElement($doc); |
|
82 | ||
83 | $el->appendChild($this->getAssignedCustodian()->toDOMElement($doc)); |
|
84 | ||
85 | return $el; |
|
86 | } |
|
87 | } |
|
88 |
@@ 36-94 (lines=59) @@ | ||
33 | * |
|
34 | * @author julien |
|
35 | */ |
|
36 | class AssignedCustodian extends Entity |
|
37 | { |
|
38 | /** |
|
39 | * |
|
40 | * @var CodedSimple |
|
41 | */ |
|
42 | protected $classCode = 'ASSIGNED'; |
|
43 | ||
44 | /** |
|
45 | * |
|
46 | * @var RepresentedCustodianOrganization |
|
47 | */ |
|
48 | protected $custodianOrganization; |
|
49 | ||
50 | public function __construct(RepresentedCustodianOrganization $custodianOrganization) |
|
51 | { |
|
52 | $this->setCustodianOrganization($custodianOrganization); |
|
53 | } |
|
54 | ||
55 | /** |
|
56 | * |
|
57 | * @return RepresentedCustodianOrganization |
|
58 | */ |
|
59 | public function getCustodianOrganization(): RepresentedCustodianOrganization |
|
60 | { |
|
61 | return $this->custodianOrganization; |
|
62 | } |
|
63 | ||
64 | /** |
|
65 | * |
|
66 | * @param RepresentedCustodianOrganization $custodianOrganization |
|
67 | * @return $this |
|
68 | */ |
|
69 | public function setCustodianOrganization(RepresentedCustodianOrganization $custodianOrganization) |
|
70 | { |
|
71 | $this->custodianOrganization = $custodianOrganization; |
|
72 | ||
73 | return $this; |
|
74 | } |
|
75 | ||
76 | protected function getElementTag(): string |
|
77 | { |
|
78 | return 'assignedCustodian'; |
|
79 | } |
|
80 | ||
81 | public function getDefaultClassCode() |
|
82 | { |
|
83 | return $this->classCode; |
|
84 | } |
|
85 | ||
86 | public function toDOMElement(\DOMDocument $doc): \DOMElement |
|
87 | { |
|
88 | $el = $this->createElement($doc); |
|
89 | ||
90 | $el->appendChild($this->getCustodianOrganization()->toDOMElement($doc)); |
|
91 | ||
92 | return $el; |
|
93 | } |
|
94 | } |
|
95 |