setParams($params); require('blogs_last_post.php'); echo '
'; echo ''; echo ' '; } private function setParams($params){ $this->params = $params; } public static function start($params){ $blogs = new blogs($params); } public function setX($x){ $xmla = simplexml_load_file('../'.AccueilModules::CONFIG_FILE); $path = $xmla->xpath("//item[@id='blogs']"); $path[0]->x = $x; $xmla->asXML('../'.AccueilModules::CONFIG_FILE); echo "ok"; } public function setY($y){ $xmla = simplexml_load_file('../'.AccueilModules::CONFIG_FILE); $path = $xmla->xpath("//item[@id='blogs']"); $path[0]->y = $y; $xmla->asXML('../'.AccueilModules::CONFIG_FILE); echo "ok"; } public function setVisibility($visibility){ $xmla = simplexml_load_file('../'.AccueilModules::CONFIG_FILE); $path = $xmla->xpath("//item[@id='blogs']"); $path[0]->visibility = $visibility; $xmla->asXML('../'.AccueilModules::CONFIG_FILE); echo "ok"; } public static function updateConfig($updated){ foreach ($updated as $what=>$withWhat){ if(in_array($what, self::$paramsList)){ call_user_func(array(get_class(), "set".ucfirst($what)), $withWhat); } } } }