X-Git-Url: http://git.dj3c1t.com/?a=blobdiff_plain;f=app%2Fdata%2Fmodules%2Fshare%2Fsml_data_sources_xml_format.php;h=e9d280435e4dfb7bad8fa49fe58d2fea4d5f61cd;hb=HEAD;hp=676262abc502e55b2ee6ff36aaefc92e2f5092c7;hpb=37049b502efdf68a562ce63d8f37a820c66bc887;p=mw_sourceml diff --git a/app/data/modules/share/sml_data_sources_xml_format.php b/app/data/modules/share/sml_data_sources_xml_format.php index 676262a..e9d2804 100644 --- a/app/data/modules/share/sml_data_sources_xml_format.php +++ b/app/data/modules/share/sml_data_sources_xml_format.php @@ -2,18 +2,18 @@ class sml_data_sources_xml_format extends mw_data{ - var $status; // classes de sources - table sml_classes - var $source; - var $groupes; - var $licence; - var $sources; - var $xml_content; + public $status; // classes de sources - table sml_classes + public $source; + public $groupes; + public $licence; + public $sources; + public $xml_content; # ---------------------------------------------------------------------------------------- # data vers XML # - function source_xml_content($id, $params = array()){ + public function source_xml_content($id, $params = array()){ $env = $this->env(); $content = false; $this->status = isset($this->status) ? $this->status : $this->source_status(); @@ -96,13 +96,13 @@ # XML vers data # - function parse_source_xml($xml_content){ + public function parse_source_xml($xml_content){ if(!isset($this->sxml)) $this->sxml = new sxml(); $this->sxml->parse($xml_content); return isset($this->sxml->data["source"][0]); } - function empty_source($params = array()){ + public function empty_source($params = array()){ $source = array( "groupes" => array(), "titre" => "", @@ -125,7 +125,7 @@ return $source; } - function source_xml_read($url, $xml_content = null){ + public function source_xml_read($url, $xml_content = null){ $source = $this->empty_source(); if($this->xml_content = (isset($xml_content) ? $xml_content : $this->get_source_xml_from_url($url))){ if($this->xml_content === -1) $this->xml_content = $this->get_source_xml_from_url($url, true); @@ -147,14 +147,14 @@ return $source; } - function parse_source_buffer($source_xml_version, $default_source = null){ + public function parse_source_buffer($source_xml_version, $default_source = null){ if(method_exists($this, $method_name = "parse_source_buffer_".$source_xml_version)){ return $this->$method_name($default_source); } return false; } - function get_source_buffer_xml_version(){ + public function get_source_buffer_xml_version(){ if(!isset($this->buffer["subs"])) return false; foreach($this->buffer["subs"] as $key => $value){ if($key == "titre" || $key == "auteur"){ @@ -168,7 +168,7 @@ // -------------------------------------- source XML v2 - function parse_source_buffer_v2($default_source = null){ + public function parse_source_buffer_v2($default_source = null){ if(isset($default_source)) $source = $default_source; else $source = $this->empty_source(); if(!isset($this->buffer["subs"])) return $source; @@ -237,7 +237,7 @@ // -------------------------------------- source XML v1 - function parse_source_buffer_v1($default_source = null){ + public function parse_source_buffer_v1($default_source = null){ if(isset($default_source)) $source = $default_source; else $source = $this->empty_source(); if(!isset($this->buffer["subs"])) return $source; @@ -289,5 +289,3 @@ } } - -?> \ No newline at end of file