1 | <?php |
||
35 | class EzctemplateRenderer extends Renderer implements ReusableRendererInterface |
||
36 | { |
||
37 | /** |
||
38 | * @constant string The directory inside the cache dir where templates will |
||
39 | * be stored in compiled form. |
||
40 | */ |
||
41 | const COMPILE_DIR = 'templates'; |
||
42 | |||
43 | /** |
||
44 | * @constant string The subdirectory inside the compile dir where templates |
||
45 | * will be stored in compiled form. |
||
46 | */ |
||
47 | const COMPILE_SUBDIR = 'ezctemplate'; |
||
48 | |||
49 | /** |
||
50 | * @constant string The directory inside the cache dir where cached content |
||
51 | * will be stored. |
||
52 | */ |
||
53 | const CACHE_DIR = 'content'; |
||
54 | |||
55 | /** |
||
56 | * @var ezcTemplate The template engine instance. |
||
57 | */ |
||
58 | protected $ezcTemplate = null; |
||
59 | |||
60 | /** |
||
61 | * @var string A string with the default template file extension, |
||
62 | * including the dot. |
||
63 | */ |
||
64 | protected $defaultExtension = '.ezt'; |
||
65 | |||
66 | /** |
||
67 | * Pre-serialization callback. |
||
68 | * |
||
69 | * Excludes the ezcTemplate instance to prevent excessive serialization load. |
||
70 | * |
||
71 | * @author Felix Weis <[email protected]> |
||
72 | * @since 0.11.0 |
||
73 | */ |
||
74 | public function __sleep() |
||
80 | |||
81 | /** |
||
82 | * Create an instance of ezcTemplate and initialize it correctly. |
||
83 | * Returns an instance of EzctemplateTemplate by default. |
||
84 | * |
||
85 | * @return ezcTemplate The ezcTemplate instance. |
||
86 | * |
||
87 | * @author David Zülke <[email protected]> |
||
88 | * @since 1.0.2 |
||
89 | */ |
||
90 | protected function createEngineInstance() |
||
101 | |||
102 | /** |
||
103 | * Grab a cleaned up ezctemplate instance. |
||
104 | * |
||
105 | * @return ezcTemplate A ezcTemplate instance. |
||
106 | * |
||
107 | * @author Felix Weis <[email protected]> |
||
108 | * @since 0.11.0 |
||
109 | */ |
||
110 | protected function getEngine() |
||
149 | |||
150 | /** |
||
151 | * Render the presentation and return the result. |
||
152 | * |
||
153 | * @param TemplateLayer $layer The template layer to render. |
||
154 | * @param array $attributes The template variables. |
||
155 | * @param array $slots The slots. |
||
156 | * @param array $moreAssigns Associative array of additional assigns. |
||
157 | * |
||
158 | * @return string A rendered result. |
||
159 | * |
||
160 | * @author Felix Weis <[email protected]> |
||
161 | * @since 0.11.0 |
||
162 | */ |
||
163 | public function render(TemplateLayer $layer, array &$attributes = array(), array &$slots = array(), array &$moreAssigns = array()) |
||
189 | } |
||
190 |
This error could be the result of:
1. Missing dependencies
PHP Analyzer uses your
composer.json
file (if available) to determine the dependencies of your project and to determine all the available classes and functions. It expects thecomposer.json
to be in the root folder of your repository.Are you sure this class is defined by one of your dependencies, or did you maybe not list a dependency in either the
require
orrequire-dev
section?2. Missing use statement
PHP does not complain about undefined classes in
ìnstanceof
checks. For example, the following PHP code will work perfectly fine:If you have not tested against this specific condition, such errors might go unnoticed.