| 1 | <?php |
||
| 9 | class ShopsUnitedLaravel |
||
| 10 | { |
||
| 11 | protected $url; |
||
| 12 | protected $query; |
||
| 13 | protected $callableUrl; |
||
| 14 | protected $method = 'GET'; |
||
| 15 | protected $params = []; |
||
| 16 | |||
| 17 | public function __construct() |
||
| 23 | |||
| 24 | public function accounts() |
||
| 28 | |||
| 29 | public function shipments() |
||
| 33 | |||
| 34 | protected function call() |
||
| 44 | |||
| 45 | protected function setGetUrl($url = null) |
||
| 52 | |||
| 53 | public function setPostUrl($url) |
||
| 60 | |||
| 61 | public function setDeleteUrl($url) |
||
| 68 | |||
| 69 | protected function addQuery(array $array) |
||
| 75 | |||
| 76 | protected function setParams(array $array) |
||
| 82 | } |
||
| 83 |
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: