# ablocks/2.8.0/includes/frontend/dynamic-content/argument-parser.php

aBlocks – Gutenberg Blocks, User Dashboard Builder, Popup Builder, Form Builder &amp; Animation Builder, version 2.8.0. 34 lines.

- Page: https://pluginprobe.com/plugins/ablocks/2.8.0/code/includes/frontend/dynamic-content/argument-parser.php
- Raw: https://pluginprobe.com/plugins/ablocks/2.8.0/raw/includes/frontend/dynamic-content/argument-parser.php
- Modified: 2025-07-14T14:48:20+00:00

Line numbers below start at 1. Link to a line or a range by appending a fragment to the
page URL, for example `https://pluginprobe.com/plugins/ablocks/2.8.0/code/includes/frontend/dynamic-content/argument-parser.php#L10-L20`.

```php
<?php
namespace ABlocks\Frontend\DynamicContent;

if ( ! defined( 'ABSPATH' ) ) {
	exit;
}
class ArgumentParser {

	protected array $args;
	protected array $interpreters;
	protected string $arg_str;
	protected bool $is_richtext;
	protected $context;
	public function __construct( string $arg_str, bool $is_richtext, array $interpreters, array $context = [] ) {
		$this->arg_str = $arg_str;
		$this->is_richtext = $is_richtext;
		$this->interpreters = $interpreters;
		$this->context = $context;
	}
	public function interpret() : ?Interpreters\Abstracts\Interpreter {
		$setting = explode( '|', $this->arg_str );
		$action_name = $setting[0];
		array_shift( $setting );

		if ( ! empty( $class = $this->interpreters[ $action_name ] ?? '' ) &&
			class_exists( $class ) &&
			( $ins = new $class( $action_name, $setting, $this->is_richtext, $this->context ) ) instanceof Interpreters\Abstracts\Interpreter
		) {
			return $ins;
		}
		return null;
	}
}

```
