| 1 | <?php |
||
| 5 | class Resource |
||
| 6 | { |
||
| 7 | /** |
||
| 8 | * The resource attributes. |
||
| 9 | * |
||
| 10 | * @var array |
||
| 11 | */ |
||
| 12 | public $attributes; |
||
| 13 | |||
| 14 | /** |
||
| 15 | * The ActiveCampaign SDK instance. |
||
| 16 | * |
||
| 17 | * @var \TestMonitor\ActiveCampaign\ActiveCampaign |
||
| 18 | */ |
||
| 19 | protected $activeCampaign; |
||
| 20 | |||
| 21 | /** |
||
| 22 | * Create a new resource instance. |
||
| 23 | * |
||
| 24 | * @param array $attributes |
||
| 25 | * @param \TestMonitor\ActiveCampaign\ActiveCampaign $activeCampaign |
||
| 26 | * @return void |
||
|
|
|||
| 27 | */ |
||
| 28 | public function __construct(array $attributes, $activeCampaign = null) |
||
| 35 | |||
| 36 | /** |
||
| 37 | * Fill the resource with the array of attributes. |
||
| 38 | * |
||
| 39 | * @return void |
||
| 40 | */ |
||
| 41 | private function fill() |
||
| 51 | |||
| 52 | /** |
||
| 53 | * Convert the key name to camel case. |
||
| 54 | * |
||
| 55 | * @param $key |
||
| 56 | * |
||
| 57 | * @return mixed |
||
| 58 | */ |
||
| 59 | private function camelCase($key) |
||
| 71 | } |
||
| 72 |
Adding a
@returnannotation to a constructor is not recommended, since a constructor does not have a meaningful return value.Please refer to the PHP core documentation on constructors.