Пример #1
0
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;
	}
}
Пример #2
0
 public function testLeaveTdAll()
 {
     $this->assertTrue(CXml::leaveTdAll("&lt;p&gt;T&eacute;st &amp;amp; paragraph.&lt;/p&gt;&lt;a href=&#039;#fragment&#039;&gt;" . "Other text&lt;/a&gt;")->equals("<p>Tést &amp; paragraph.</p><a href='#fragment'>Other text</a>"));
     $this->assertTrue(CXml::leaveTdAll("&lt;p&gt;T&eacute;st &amp; paragraph.&lt;/p&gt;&lt;a href=&#039;#fragment&#039;&gt;" . "Other text&lt;/a&gt;", false)->equals("<p>Tést & paragraph.</p><a href='#fragment'>Other text</a>"));
 }