1 | <?php |
||
5 | trait Users |
||
6 | { |
||
7 | /** |
||
8 | * Get a user’s public profile |
||
9 | * Retrieve public details on a given user. |
||
10 | * @link https://unsplash.com/documentation#get-a-users-public-profile |
||
11 | * |
||
12 | * @param string $username The user’s username. Required. |
||
13 | * @return MarkSitko\LaravelUnsplash\Endpoints\Users |
||
14 | */ |
||
15 | public function user( $username ) |
||
22 | |||
23 | /** |
||
24 | * Get a user’s portfolio link |
||
25 | * Retrieve a single user’s portfolio link. |
||
26 | * @link https://unsplash.com/documentation#get-a-users-portfolio-link |
||
27 | * |
||
28 | * @param string $username The user’s username. Required. |
||
29 | * @return MarkSitko\LaravelUnsplash\Endpoints\Users |
||
30 | */ |
||
31 | public function userPortfolio( $username ) |
||
38 | |||
39 | /** |
||
40 | * List a user’s photos |
||
41 | * Get a list of photos uploaded by a user. |
||
42 | * @link https://unsplash.com/documentation#list-a-users-photos |
||
43 | * |
||
44 | * @param string $username The user’s username. Required. |
||
45 | * @return MarkSitko\LaravelUnsplash\Endpoints\Users |
||
46 | */ |
||
47 | public function userPhotos( $username ) |
||
54 | |||
55 | /** |
||
56 | * List a user’s liked photos |
||
57 | * Get a list of photos liked by a user. |
||
58 | * @link https://unsplash.com/documentation#list-a-users-liked-photos |
||
59 | * |
||
60 | * @param string $username The user’s username. Required. |
||
61 | * @return MarkSitko\LaravelUnsplash\Endpoints\Users |
||
62 | */ |
||
63 | public function userLikes( $username ) |
||
70 | |||
71 | /** |
||
72 | * List a user’s collections |
||
73 | * Get a list of collections created by the user. |
||
74 | * @link https://unsplash.com/documentation#list-a-users-collections |
||
75 | * |
||
76 | * @param string $username The user’s username. Required. |
||
77 | * @return MarkSitko\LaravelUnsplash\Endpoints\Users |
||
78 | */ |
||
79 | public function userCollections( $username ) |
||
86 | |||
87 | /** |
||
88 | * Get a user’s statistics |
||
89 | * Retrieve the consolidated number of downloads, views and likes of all user’s photos, |
||
90 | * as well as the historical breakdown and average of these stats in a specific timeframe (default is 30 days). |
||
91 | * @link https://unsplash.com/documentation#get-a-users-statistics |
||
92 | * |
||
93 | * @param string $username The user’s username. Required. |
||
94 | * @return MarkSitko\LaravelUnsplash\Endpoints\Users |
||
95 | */ |
||
96 | public function userStatistics( $username ) |
||
103 | |||
104 | } |
||
105 |
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: