1 | <?php |
||
16 | abstract class BasePageView extends PermalinkFrontMatterDocument implements PermalinkDocument |
||
17 | { |
||
18 | use TemplateEngineDependent; |
||
19 | |||
20 | const REPEATER_TYPE = 'repeater'; |
||
21 | const DYNAMIC_TYPE = 'dynamic'; |
||
22 | const STATIC_TYPE = 'static'; |
||
23 | |||
24 | protected $type; |
||
25 | |||
26 | /** |
||
27 | * Returns the type of PageView. |
||
28 | * |
||
29 | * @return string |
||
30 | */ |
||
31 | 18 | public function getType() |
|
35 | |||
36 | /// |
||
37 | // Static utilities |
||
38 | /// |
||
39 | |||
40 | /** |
||
41 | * Create the appropriate object type when parsing a PageView. |
||
42 | * |
||
43 | * @return DynamicPageView|StaticPageView|RepeaterPageView |
||
44 | */ |
||
45 | 18 | public static function create(File $filePath, array $complexVariables = []) |
|
64 | |||
65 | /// |
||
66 | // Virtual PageViews |
||
67 | /// |
||
68 | |||
69 | /** |
||
70 | * Create a virtual PageView. |
||
71 | * |
||
72 | * @param array $frontMatter The Front Matter that this virtual PageView will have |
||
73 | * @param string $body The body of the virtual PageView |
||
74 | * |
||
75 | * @return StaticPageView |
||
76 | */ |
||
77 | 2 | public static function createVirtual($frontMatter, $body) |
|
93 | |||
94 | /** |
||
95 | * Create a virtual PageView to create redirect files. |
||
96 | * |
||
97 | * @param string $redirectFrom The URL that will be redirecting to the target location |
||
98 | * @param string $redirectTo The URL of the destination |
||
99 | * @param string|bool $redirectTemplate The path to the template |
||
100 | * |
||
101 | * @return StaticPageView A virtual PageView with the redirection template |
||
102 | */ |
||
103 | 2 | public static function createRedirect($redirectFrom, $redirectTo, $redirectTemplate = false) |
|
128 | } |
||
129 |
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: