| 1 | <?php |
||
| 8 | trait HasFollowers |
||
| 9 | { |
||
| 10 | /** |
||
| 11 | * Get followers. |
||
| 12 | * |
||
| 13 | * @param string $for |
||
| 14 | * @param int $limit |
||
| 15 | * |
||
| 16 | * @return Iterator |
||
| 17 | */ |
||
| 18 | public function followers($for, $limit = 0) |
||
| 24 | |||
| 25 | /** |
||
| 26 | * @param array $data |
||
| 27 | * @param string $resourceUrl |
||
| 28 | * @param int $limit |
||
| 29 | * |
||
| 30 | * @return Iterator |
||
| 31 | */ |
||
| 32 | public function getFollowData($data, $resourceUrl, $limit = 0) |
||
| 38 | |||
| 39 | protected function getFollowersUrl() |
||
| 43 | |||
| 44 | protected function getFollowersFor() |
||
| 48 | } |
||
| 49 |
In PHP it is possible to write to properties without declaring them. For example, the following is perfectly valid PHP code:
Generally, it is a good practice to explictly declare properties to avoid accidental typos and provide IDE auto-completion: