| 1 | <?php | ||
| 14 | abstract class AbstractResource | ||
| 15 | { | ||
| 16 | |||
| 17 | /** | ||
| 18 | * @var Api | ||
| 19 | */ | ||
| 20 | private $api; | ||
| 21 | |||
| 22 | /** | ||
| 23 | * @var String | ||
| 24 | */ | ||
| 25 | protected $endpoint; | ||
| 26 | |||
| 27 | /** | ||
| 28 | * CompanyApi constructor. | ||
| 29 | * @param Api $api | ||
| 30 | */ | ||
| 31 | public function __construct(Api $api) | ||
| 35 | |||
| 36 | /** | ||
| 37 | * Creates the endpoint | ||
| 38 | * @param null $id | ||
| 39 | * @return string | ||
| 40 | */ | ||
| 41 | protected function endpoint($id = null) | ||
| 45 | |||
| 46 | /** | ||
| 47 | * @return Api | ||
| 48 | */ | ||
| 49 | protected function api() | ||
| 53 | } |