PHP Classes

File: Library/vendor/twig/twig/test/Twig/Tests/Fixtures/tags/autoescape/objects.test

Recommend this page to a friend!
  Classes of Duong Huynh Nghia   Lego PHP   Library/vendor/twig/twig/test/Twig/Tests/Fixtures/tags/autoescape/objects.test   Download  
File: Library/vendor/twig/twig/test/Twig/Tests/Fixtures/tags/autoescape/objects.test
Role: Auxiliary data
Content type: text/plain
Description: Auxiliary data
Class: Lego PHP
Blog and shopping cart system
Author: By
Last change:
Date: 7 years ago
Size: 464 bytes
 

Contents

Class file image Download
--TEST-- "autoescape" tag applies escaping to object method calls --TEMPLATE-- {% autoescape 'html' %} {{ user.name }} {{ user.name|lower }} {{ user }} {% endautoescape %} --DATA-- class UserForAutoEscapeTest { public function getName() { return 'Fabien<br />'; } public function __toString() { return 'Fabien<br />'; } } return array('user' => new UserForAutoEscapeTest()) --EXPECT-- Fabien&lt;br /&gt; fabien&lt;br /&gt; Fabien&lt;br /&gt;