aboutsummaryrefslogtreecommitdiffstats
path: root/core/namespace/Item.php
diff options
context:
space:
mode:
Diffstat (limited to 'core/namespace/Item.php')
-rw-r--r--core/namespace/Item.php17
1 files changed, 17 insertions, 0 deletions
diff --git a/core/namespace/Item.php b/core/namespace/Item.php
index f3b6ceb..426dd2a 100644
--- a/core/namespace/Item.php
+++ b/core/namespace/Item.php
@@ -102,6 +102,23 @@ abstract class Item implements ItemInterface {
}
#===============================================================================
+ # Return parsed arguments
+ #===============================================================================
+ public function getArguments(): array {
+ if($argv = $this->Attribute->get('argv')) {
+ foreach(explode('|', rtrim($argv, '|')) as $delimeter) {
+ $part = explode('=', $delimeter);
+
+ if(!empty($part[0])) {
+ $arguments[strtoupper($part[0])] = $part[1] ?? TRUE;
+ }
+ }
+ }
+
+ return $arguments ?? [];
+ }
+
+ #===============================================================================
# Return previous item ID
#===============================================================================
public function getPrevID(): int {