1 | <?php |
||
10 | class ContentCrud |
||
11 | { |
||
12 | /** |
||
13 | * Return all. |
||
14 | * |
||
15 | * @param Collection $collection Colelction of all resources. |
||
16 | * |
||
17 | * @return \Illuminate\Http\JsonResponse |
||
18 | */ |
||
19 | public function index(Collection $collection) |
||
23 | |||
24 | /** |
||
25 | * Show an individual resource in the manager. |
||
26 | * |
||
27 | * @param Larafolio\Models\HasContent $model Resource to show. |
||
28 | * @param string $type Type of resource (page, project etc.). |
||
29 | * |
||
30 | * @return \Illuminate\Http\Response |
||
31 | */ |
||
32 | public function show(HasContent $model, $type) |
||
41 | |||
42 | /** |
||
43 | * Return the create resource page. |
||
44 | * |
||
45 | * @param string $type Type of resource (page, project etc.). |
||
46 | * |
||
47 | * @return \Illuminate\Http\Response |
||
48 | */ |
||
49 | public function create($type) |
||
53 | |||
54 | /** |
||
55 | * Add a new resource to the portfolio. |
||
56 | * |
||
57 | * @param Larafolio\Http\Requests\AddResourceRequest $request Form request. |
||
58 | * @param User $user User object. |
||
59 | * @param string $type Type of resource (page, project etc.). |
||
60 | * |
||
61 | * @return \Illuminate\Http\Response |
||
62 | */ |
||
63 | public function store(AddResourceRequest $request, $user, $type) |
||
75 | |||
76 | /** |
||
77 | * Return the resource edit form view. |
||
78 | * |
||
79 | * @param Larafolio\Models\HasContent $model Resource to show edit form for. |
||
80 | * |
||
81 | * @return \Illuminate\Http\Response |
||
82 | */ |
||
83 | public function edit(HasContent $model) |
||
97 | |||
98 | /** |
||
99 | * Update a resource. |
||
100 | * |
||
101 | * @param \Illuminate\Http\Request $request Request data. |
||
102 | * @param Larafolio\Models\HasContent $model Resource to update. |
||
103 | * @param User $user User object. |
||
104 | * |
||
105 | * @return \Illuminate\Http\Response |
||
106 | */ |
||
107 | public function update(Request $request, HasContent $model, $user) |
||
127 | |||
128 | /** |
||
129 | * Remove a resource from the portfolio. |
||
130 | * |
||
131 | * @param \Illuminate\Http\Request $request Request data. |
||
132 | * @param Larafolio\Models\HasContent $model Resource to update. |
||
133 | * @param User $user User object. |
||
134 | * |
||
135 | * @return \Illuminate\Http\Response |
||
136 | */ |
||
137 | public function destroy(Request $request, HasContent $model, $user) |
||
157 | |||
158 | /** |
||
159 | * Make HasContent method. |
||
160 | * |
||
161 | * @param string $verb Action to perform. |
||
162 | * @param string $type Name of resource. |
||
163 | * |
||
164 | * @return string |
||
165 | */ |
||
166 | protected function makeMethod($verb, $type) |
||
170 | |||
171 | /** |
||
172 | * Make route name. |
||
173 | * |
||
174 | * @param string $verb Route action to perform. |
||
175 | * @param string $type Name of resource. |
||
176 | * |
||
177 | * @return string |
||
178 | */ |
||
179 | protected function makeRoute($verb, $type) |
||
183 | |||
184 | /** |
||
185 | * Get the model type (short class name) from the model. |
||
186 | * |
||
187 | * @param HasContent $model Model to get name of. |
||
188 | * |
||
189 | * @return string |
||
190 | */ |
||
191 | protected function getTypeFromModel(HasContent $model) |
||
197 | } |
||
198 |
Since your code implements the magic getter
_get
, this function will be called for any read access on an undefined variable. You can add the@property
annotation to your class or interface to document the existence of this variable.If the property has read access only, you can use the @property-read annotation instead.
Of course, you may also just have mistyped another name, in which case you should fix the error.
See also the PhpDoc documentation for @property.