PHP Classes

File: libs/Twig/test/Twig/Tests/Fixtures/regression/simple_xml_element.test

Recommend this page to a friend!
  Classes of william amed   Raptor 2   libs/Twig/test/Twig/Tests/Fixtures/regression/simple_xml_element.test   Download  
File: libs/Twig/test/Twig/Tests/Fixtures/regression/simple_xml_element.test
Role: Auxiliary data
Content type: text/plain
Description: Auxiliary data
Class: Raptor 2
Framework that takes routes from annotations
Author: By
Last change:
Date: 8 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