public function display(): void
    {
        $templateParameters = [];
        foreach ($this->params as $param) {
            if ($param instanceof PostParameter) {
                $templateParameters[$param->getName()] = $param;
            } else {
                if ($param instanceof GenericParameter) {
                    $templateParameters[$param->getName()] = $param->getValue();
                }
            }
        }
        try {
            $this->twig->display($this->templateName, $templateParameters);
        } catch (LoaderError $e) {
            trigger_error($e->getMessage(), E_USER_ERROR);
            error_log($e->getMessage());
        } catch (RuntimeError $e) {
            trigger_error($e->getMessage(), E_USER_ERROR);
            error_log($e->getMessage());
        } catch (SyntaxError $e) {
            trigger_error($e->getMessage(), E_USER_ERROR);
            error_log($e->getMessage());
        }
    }
public function display(): void
    {
        $templateParameters = [];
        foreach ($this->params as $param) {
            if ($param instanceof PostParameter) {
                $templateParameters[$param->getName()] = $param;
            } else {
                if ($param instanceof GenericParameter) {
                    $templateParameters[$param->getName()] = $param->getValue();
                }
            }
        }
        try {
            $this->twig->display($this->templateName, $templateParameters);
        } catch (LoaderError $e) {
            trigger_error($e->getMessage(), E_USER_ERROR);
            error_log($e->getMessage());
        } catch (RuntimeError $e) {
            trigger_error($e->getMessage(), E_USER_ERROR);
            error_log($e->getMessage());
        } catch (SyntaxError $e) {
            trigger_error($e->getMessage(), E_USER_ERROR);
            error_log($e->getMessage());
        }
    }
public function display ( ) : void { $ templateParameters = [ ] ; foreach ( $ this -> params as $ param ) { if ( $ param instanceof PostParameter ) { $ templateParameters [ $ param -> getName ( ) ] = $ param ; } else { if ( $ param instanceof GenericParameter ) { $ templateParameters [ $ param -> getName ( ) ] = $ param -> getValue ( ) ; } } } try { $ this -> twig -> display ( $ this -> templateName , $ templateParameters ) ; } catch ( LoaderError $ e ) { trigger_error ( $ e -> getMessage ( ) , E_USER_ERROR ) ; error_log ( $ e -> getMessage ( ) ) ; } catch ( RuntimeError $ e ) { trigger_error ( $ e -> getMessage ( ) , E_USER_ERROR ) ; error_log ( $ e -> getMessage ( ) ) ; } catch ( SyntaxError $ e ) { trigger_error ( $ e -> getMessage ( ) , E_USER_ERROR ) ; error_log ( $ e -> getMessage ( ) ) ; } }
Displays the current view. Iterates over all the parameters and stores them in a temporary, associative array.
Twig then displays the main template, using the array with the parameters.
Exceptions generated by Twig are shown as errors and logged accordingly for simplification.
Displays the current view . Iterates over all the parameters and stores them in a temporary associative array . Twig then displays the main template using the array with the parameters . Exceptions generated by Twig are shown as errors and logged accordingly for simplification .