| 1 | <?php |
||
| 5 | trait FollowHelper |
||
| 6 | { |
||
| 7 | use ProviderHelper; |
||
| 8 | |||
| 9 | /** |
||
| 10 | * Follow user by user_id |
||
| 11 | * |
||
| 12 | * @param $entityId |
||
| 13 | * @return bool |
||
| 14 | */ |
||
| 15 | public function follow($entityId) |
||
| 19 | |||
| 20 | /** |
||
| 21 | * UnFollow user by user_id |
||
| 22 | * |
||
| 23 | * @param $entityId |
||
| 24 | * @return bool |
||
| 25 | */ |
||
| 26 | public function unFollow($entityId) |
||
| 30 | |||
| 31 | /** |
||
| 32 | * Make api call for follow/unfollow a entity (user/board) |
||
| 33 | * @param int $entityId |
||
| 34 | * @param string $resourceUrl |
||
| 35 | * @return bool |
||
| 36 | */ |
||
| 37 | protected function followCall($entityId, $resourceUrl) |
||
| 44 | |||
| 45 | abstract function getEntityIdName(); |
||
| 46 | |||
| 47 | abstract function getFollowUrl(); |
||
| 48 | |||
| 49 | abstract function getUnfFollowUrl(); |
||
| 50 | } |
Adding explicit visibility (
private,protected, orpublic) is generally recommend to communicate to other developers how, and from where this method is intended to be used.