1 | <?php |
||
12 | class ClockworkController extends Controller |
||
13 | { |
||
14 | |||
15 | protected $apiKey; |
||
16 | protected $client; |
||
17 | |||
18 | public function __construct() |
||
27 | /** |
||
28 | * Return all data to the Clockwork API dashboard |
||
29 | * @return mixed |
||
30 | */ |
||
31 | public function getPage() |
||
35 | |||
36 | /** |
||
37 | * Send a Text Message |
||
38 | * @param Request $request |
||
39 | * @return string |
||
40 | */ |
||
41 | public function sendTextMessage(Request $request) |
||
55 | } |
||
56 |
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: