function __construct($tamplate_name) { $xml_file = SS_ADMIN_TO_USERFILE . '/userfiles/template/' . $tamplate_name . '/design.xml'; $this->nom = $tamplate_name; $this->xml_file = $xml_file; $array = CXml::xml2ary(@file_get_contents($xml_file)); if(!empty($array)) { $arr_noeud = $array['design']['_c']; $array_data = array(); foreach($arr_noeud as $key=>$noeud) { $array_data[$key] = $noeud['_v']; } $this->design = $array_data; } }
public function testLeaveTdAll() { $this->assertTrue(CXml::leaveTdAll("<p>Tést &amp; paragraph.</p><a href='#fragment'>" . "Other text</a>")->equals("<p>Tést & paragraph.</p><a href='#fragment'>Other text</a>")); $this->assertTrue(CXml::leaveTdAll("<p>Tést & paragraph.</p><a href='#fragment'>" . "Other text</a>", false)->equals("<p>Tést & paragraph.</p><a href='#fragment'>Other text</a>")); }