/** * adds the element <crypt> into the stream if it has no element <crypt> already, do nothing otherwise * * @param XMLElement $order */ public function addCrypt(SceauControl &$order) { $crypt = $order->getOneElementByTagName('crypt'); if (is_null($crypt)) { $order->createChild('crypt', $this->generateCrypt($order), array()); } else { $crypt->nodeValue = $this->generateCrypt($order); } }