Example #1
0
 public function POSTupdate($request)
 {
     $element = \Models\Graph::ID($_POST['src']);
     $document = $element->ownerDocument;
     $plot = $element->appendChild($document->createElement('plot'));
     $plot->setAttribute('t', implode(' ', $_POST['plot']['t']));
     $plot->setAttribute('r', implode(' ', $_POST['plot']['r']));
     $document->save(PATH . \Models\Graph::DB . '.xml');
     return print_r($element->write(), true) . print_r($_POST, true);
 }