diff --git a/src/Mods/Element/Xml/Element.php b/src/Mods/Element/Xml/Element.php index 64043fa..729af95 100644 --- a/src/Mods/Element/Xml/Element.php +++ b/src/Mods/Element/Xml/Element.php @@ -77,4 +77,19 @@ public function getValues(): array } return []; } -} \ No newline at end of file + + /** + * Get first value of the queried element. + * + * @access public + * + * @return mixed + */ + public function getFirstValue() + { + if ($this->exists()) { + return $this->values[0]; + } + return null; + } +}