1 | <?php |
||
8 | trait HasEndpoints |
||
9 | { |
||
10 | /** @var bool */ |
||
11 | protected $mergeGlobalEndpoints = false; |
||
12 | |||
13 | public function endpoints(string $controller = null, $parameters = null): EndpointResource |
||
27 | |||
28 | public static function globalEndpoints(string $controller = null, $parameters = null): EndpointResource |
||
38 | |||
39 | public static function meta() |
||
43 | |||
44 | public function mergeGlobalEndpoints() |
||
50 | |||
51 | public static function collection($resource) |
||
57 | |||
58 | public static function make(...$parameters) |
||
62 | } |
||
63 |
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: