1 | <?php |
||
38 | class SharesService { |
||
39 | |||
40 | /** @var string */ |
||
41 | private $userId; |
||
42 | |||
43 | /** @var CirclesRequest */ |
||
44 | private $circlesRequest; |
||
45 | |||
46 | /** @var FederatedService */ |
||
47 | private $federatedService; |
||
48 | /** @var MiscService */ |
||
49 | private $miscService; |
||
50 | |||
51 | |||
52 | /** |
||
53 | * SharesService constructor. |
||
54 | * |
||
55 | * @param string $userId |
||
56 | * @param CirclesRequest $circlesRequest |
||
57 | * @param FederatedService $federatedService |
||
58 | * @param MiscService $miscService |
||
59 | */ |
||
60 | public function __construct( |
||
71 | |||
72 | |||
73 | /** |
||
74 | * createFrame() |
||
75 | * |
||
76 | * Save the Frame containing the Payload. |
||
77 | * The Payload will be shared locally, and spread it live if a Broadcaster is set. |
||
78 | * Function will also initiate the federated broadcast to linked circles. |
||
79 | * |
||
80 | * @param SharingFrame $frame |
||
81 | * @param string|null $broadcast |
||
82 | * |
||
83 | * @return bool |
||
84 | * @throws MemberDoesNotExistException |
||
85 | */ |
||
86 | public function createFrame(SharingFrame $frame, string $broadcast = null) { |
||
105 | |||
106 | |||
107 | public function getFrameFromUniqueId($uniqueId) { |
||
110 | |||
111 | |||
112 | /** |
||
113 | * broadcast the SharingFrame item using a IBroadcaster. |
||
114 | * The broadcast is usually set by the app that created the SharingFrame item. |
||
115 | * |
||
116 | * @param string $broadcast |
||
117 | * @param SharingFrame $frame |
||
118 | * |
||
119 | * @throws BroadcasterIsNotCompatible |
||
120 | */ |
||
121 | private function broadcastFrame(string $broadcast, SharingFrame $frame) { |
||
139 | |||
140 | |||
141 | public function shareItemToFederatedLinks(SharingFrame $share, string $broadcast = null) { |
||
147 | |||
148 | |||
149 | |||
150 | // public function reshare($circleId, $source, $type, $shareid) { |
||
151 | // $this->miscService->log( |
||
152 | // "__reshare" . $circleId . ' ' . $source . ' ' . $type . ' ' . json_encode($item) |
||
153 | // ); |
||
154 | // |
||
155 | // $share = new Share($source, $type); |
||
156 | // $share->setCircleId($circleId); |
||
157 | // $share->setItem($item); |
||
158 | // |
||
159 | // $share->setAuthor($this->userId); |
||
160 | // |
||
161 | // $this->circlesRequest->createShare($share); |
||
162 | // |
||
163 | // return true; |
||
164 | // } |
||
165 | |||
166 | } |
This check looks from parameters that have been defined for a function or method, but which are not used in the method body.