| 1 | <?php |
||
| 9 | trait HasEndpoints |
||
| 10 | { |
||
| 11 | /** @var bool */ |
||
| 12 | protected $includeGlobalEndpoints = false; |
||
| 13 | |||
| 14 | public function endpoints(string $controller = null, $parameters = null): EndpointResource |
||
| 24 | |||
| 25 | public static function globalEndpoints(string $controller = null, $parameters = null): GlobalEndpointResource |
||
| 35 | |||
| 36 | public static function meta() |
||
| 40 | |||
| 41 | public function includeGlobalEndpoints() |
||
| 47 | |||
| 48 | public static function collection($resource) |
||
| 54 | |||
| 55 | public static function make(...$parameters) |
||
| 59 | } |
||
| 60 |
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: