@@ 30-39 (lines=10) @@ | ||
27 | * @param OperationContextInterface|null $context |
|
28 | * @return CmisObjectInterface|null If the source object ID is invalid, <code>null</code> will be returned. |
|
29 | */ |
|
30 | public function getSource(OperationContextInterface $context = null) |
|
31 | { |
|
32 | $sourceId = $this->getSourceId(); |
|
33 | if ($sourceId === null) { |
|
34 | return null; |
|
35 | } |
|
36 | $context = $this->ensureContext($context); |
|
37 | ||
38 | return $this->getSession()->getObject($sourceId, $context); |
|
39 | } |
|
40 | ||
41 | /** |
|
42 | * Gets the target object using the given OperationContext. |
|
@@ 47-56 (lines=10) @@ | ||
44 | * @param OperationContextInterface|null $context |
|
45 | * @return CmisObjectInterface If the target object ID is invalid, <code>null</code> will be returned. |
|
46 | */ |
|
47 | public function getTarget(OperationContextInterface $context = null) |
|
48 | { |
|
49 | $context = $this->ensureContext($context); |
|
50 | $targetId = $this->getTargetId(); |
|
51 | if ($targetId === null) { |
|
52 | return null; |
|
53 | } |
|
54 | ||
55 | return $this->getSession()->getObject($targetId, $context); |
|
56 | } |
|
57 | ||
58 | /** |
|
59 | * Returns the source ID of this CMIS relationship (CMIS property cmis:sourceId). |