1 | <?php |
||
13 | abstract class UrlModel extends PermissionModel |
||
14 | { |
||
15 | /** |
||
16 | * Get the name of the route that shows the object |
||
17 | * @param string $action The route's suffix |
||
18 | * @return string |
||
19 | */ |
||
20 | public static function getRouteName($action = 'show') |
||
24 | |||
25 | /** |
||
26 | * Get the name of the object's parameter in the route |
||
27 | * @return string |
||
28 | */ |
||
29 | public static function getParamName() |
||
33 | |||
34 | /** |
||
35 | * Gets a human-readable format of the model's type |
||
36 | * @return string |
||
37 | */ |
||
38 | public static function getTypeForHumans() |
||
42 | |||
43 | /** |
||
44 | * Get an object's url |
||
45 | * |
||
46 | * @param string $action The action to perform (e.g `show`, `list` or `delete`) |
||
47 | * @param bool $absolute Whether to return an absolute URL |
||
48 | * @param array $params Extra parameters to pass to the URL generator |
||
49 | * |
||
50 | * @return string A link |
||
51 | */ |
||
52 | public function getURL($action = 'show', $absolute = false, $params = array()) |
||
56 | |||
57 | /** |
||
58 | * Get an object's permanent url |
||
59 | * |
||
60 | * @param string $action The action to perform (e.g `show`, `list` or `delete`) |
||
61 | * @param bool $absolute Whether to return an absolute URL |
||
62 | * @param array $params Extra parameters to pass to the URL generator |
||
63 | * |
||
64 | * @return string A permanent link |
||
65 | */ |
||
66 | public function getPermaLink($action = 'show', $absolute = false, $params = array()) |
||
70 | |||
71 | /** |
||
72 | * Generate a link for a route related to this object |
||
73 | * |
||
74 | * @param mixed $identifier A parameter representing the model (e.g an ID or alias) |
||
75 | * @param string $action The action to perform |
||
76 | * @param bool $absolute Whether to return an absolute URL |
||
77 | * @param array $params Extra parameters to pass to the URL generator |
||
78 | * |
||
79 | * @return string A link |
||
80 | */ |
||
81 | protected function getLink($identifier, $action, $absolute, $params) |
||
89 | } |
||
90 |
It seems like the type of the argument is not accepted by the function/method which you are calling.
In some cases, in particular if PHP’s automatic type-juggling kicks in this might be fine. In other cases, however this might be a bug.
We suggest to add an explicit type cast like in the following example: