1 | <?php |
||
9 | class PersistTweet |
||
10 | { |
||
11 | private $em; |
||
12 | private $displayTable; |
||
13 | private $table; |
||
14 | |||
15 | 3 | public function __construct($em, $displayTable, $table) |
|
21 | |||
22 | /** |
||
23 | * @param \stdClass $userTmp |
||
24 | * |
||
25 | * @return User |
||
26 | */ |
||
27 | 3 | protected function persistUser(\stdClass $userTmp) |
|
45 | |||
46 | /** |
||
47 | * @param array $medias |
||
48 | * @param Tweet $tweet |
||
49 | */ |
||
50 | 3 | public function iterateMedias($medias, Tweet $tweet) |
|
58 | |||
59 | /** |
||
60 | * @param \stdClass $tweetTmp |
||
61 | * @param Tweet $tweet |
||
62 | */ |
||
63 | 3 | protected function addMedias(\stdClass $tweetTmp, Tweet $tweet) |
|
70 | |||
71 | /** |
||
72 | * Create a Tweet object and return it. |
||
73 | * |
||
74 | * @param \stdClass $tweetTmp |
||
75 | * @param User $user |
||
76 | * @param bool $inTimeline |
||
77 | * |
||
78 | * @return Tweet |
||
79 | */ |
||
80 | 3 | protected function createTweet(\stdClass $tweetTmp, $user, $inTimeline) |
|
93 | |||
94 | /** |
||
95 | * @param \stdClass $tweetTmp |
||
96 | * @param User $user |
||
97 | * @param bool $inTimeline |
||
98 | * |
||
99 | * @return Tweet |
||
100 | */ |
||
101 | 3 | protected function persistTweet(\stdClass $tweetTmp, User $user, |
|
122 | |||
123 | /** |
||
124 | * @param \stdClass $tweetTmp |
||
125 | * |
||
126 | * @return Tweet |
||
127 | */ |
||
128 | 3 | protected function persistRetweetedTweet(\stdClass $tweetTmp) |
|
142 | |||
143 | /** |
||
144 | * @param Tweet $tweet |
||
145 | * @param \stdClass $mediaTmp |
||
146 | */ |
||
147 | 3 | protected function persistMedia(Tweet $tweet, \stdClass $mediaTmp) |
|
163 | |||
164 | /** |
||
165 | * @param \stdClass $tweetTmp |
||
166 | * @param bool $inTimeline |
||
167 | * |
||
168 | * @return Tweet |
||
169 | */ |
||
170 | 3 | public function addTweet(\stdClass $tweetTmp, $inTimeline = false) |
|
187 | } |
||
188 |