Twig_Template::getContext
Returns a variable from the context.
This method is for internal use only and should never be called directly. This method should not be overridden in a sub-class as this is an implementation detail that has been introduced to optimize variable access for versions of PHP before 5.4. This is not a way to override the way to get a variable value.
Signature
protected function getContext(array
$context,
[string
$item = false,
[Boolean
$ignoreStrictCheck = false]] )
Parameters
$context
— array- The context
$item
— string- The variable to return from the context
$ignoreStrictCheck
— object- Whether to ignore the strict variable check or not
Returns
- The
- content of the context variable
Errors/Exceptions
-
Twig_Error_Runtime
- if the variable does not exist and Twig is running in strict mode