1 | <?php |
||
5 | class ResourceRegistrar extends \Illuminate\Routing\ResourceRegistrar |
||
6 | { |
||
7 | /** |
||
8 | * The default actions for a resourceful controller. |
||
9 | * |
||
10 | * @var array |
||
11 | */ |
||
12 | protected $resourceDefaults = ['index', 'store', 'show', 'update', 'destroy']; |
||
13 | |||
14 | /** |
||
15 | * The default actions for each named resource relationship. |
||
16 | * |
||
17 | * @var array |
||
18 | */ |
||
19 | protected $relationshipDefaults = ['show']; |
||
20 | |||
21 | /** |
||
22 | * Create a new resource registrar instance. |
||
23 | * |
||
24 | * @param \Huntie\JsonApi\Routing\Router $router |
||
25 | */ |
||
26 | public function __construct(Router $router) |
||
30 | |||
31 | /** |
||
32 | * Route a resource to a controller. |
||
33 | * |
||
34 | * @param string $name |
||
35 | * @param string $controller |
||
36 | * @param array $options |
||
37 | */ |
||
38 | public function register($name, $controller, array $options = []) |
||
44 | |||
45 | /** |
||
46 | * Route any resource relationships to a controller. |
||
47 | * |
||
48 | * @param string $name |
||
49 | * @param string $controller |
||
50 | * @param array $options |
||
51 | */ |
||
52 | protected function registerRelationships(string $name, string $controller, array $options) |
||
70 | |||
71 | /** |
||
72 | * Add a relationship show method to match named relationships on the resource. |
||
73 | * |
||
74 | * @param string $name |
||
75 | * @param string $base |
||
76 | * @param array $relationships |
||
77 | * @param string $controller |
||
78 | * @param array $options |
||
79 | * |
||
80 | * @return \Illuminate\Routing\Route |
||
81 | */ |
||
82 | protected function addRelationshipShow(string $name, string $base, array $relationships, string $controller, array $options) |
||
90 | |||
91 | /** |
||
92 | * Add a relationship update method to match named relationships on the resource. |
||
93 | * |
||
94 | * @param string $name |
||
95 | * @param string $base |
||
96 | * @param array $relationships |
||
97 | * @param string $controller |
||
98 | * @param array $options |
||
99 | * |
||
100 | * @return \Illuminate\Routing\Route |
||
101 | */ |
||
102 | protected function addRelationshipUpdate(string $name, string $base, array $relationships, string $controller, array $options) |
||
110 | |||
111 | /** |
||
112 | * Get the URI for resource relationships. |
||
113 | * |
||
114 | * @param string $name |
||
115 | * @param string $base |
||
116 | */ |
||
117 | public function getRelationshipUri(string $name, string $base): string |
||
121 | } |
||
122 |
This check marks access to variables or properties that have not been declared yet. While PHP has no explicit notion of declaring a variable, accessing it before a value is assigned to it is most likely a bug.