protected function XML2Array() { $XML = new XmlParser(); try { $this->OutDataArray = $XML->parse($this->outData, ''); return true; } catch (\Exception $e) { return false; } }
/** * Получение структуры кнопки * @return type */ private function getStructure() { if (isset(Yii::$app->getModule('payqr')->config['xml']) && is_file(Yii::$app->getModule('payqr')->config['xml'])) { $parser = new XmlParser(); $xmlObject = $parser->parse(file_get_contents(Yii::$app->getModule('payqr')->config['xml']), ''); return isset($xmlObject['object']) ? $xmlObject['object'] : array(); } return array(); }