PHP Classes

File: Library/vendor/twig/twig/test/Twig/Tests/Fixtures/regression/simple_xml_element.test

Recommend this page to a friend!
  Classes of Duong Huynh Nghia   Lego PHP   Library/vendor/twig/twig/test/Twig/Tests/Fixtures/regression/simple_xml_element.test   Download  
File: Library/vendor/twig/twig/test/Twig/Tests/Fixtures/regression/simple_xml_element.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: 543 bytes
 

Contents

Class file image Download
--TEST-- Twig is able to deal with SimpleXMLElement instances as variables --CONDITION-- version_compare(phpversion(), '5.3.0', '>=') --TEMPLATE-- Hello '{{ images.image.0.group }}'! {{ images.image.0.group.attributes.myattr }} {{ images.children().image.count() }} {% for image in images %} - {{ image.group }} {% endfor %} --DATA-- return array('images' => new SimpleXMLElement('<images><image><group myattr="example">foo</group></image><image><group>bar</group></image></images>')) --EXPECT-- Hello 'foo'! example 2 - foo - bar