Add a request argument.

@param IArgument $arg

@return $this
161303
public function addArgument(IArgument $arg): IRequest
    {
        if ($arg instanceof IMergeableArgument) {
            if (!isset($this->mergeableArguments[$arg->getKey()])) {
                $this->mergeableArguments[$arg->getKey()] = new ArgMerger($arg::glue());
            }

            $this->mergeableArguments[$arg->getKey()]->addArgument($arg);

            return $this;
        }

        if ($arg instanceof IStackableArgument) {
            if (!isset($this->stackableArguments[$arg->getKey()])) {
                $this->stackableArguments[$arg->getKey()] = new ArgCollector();
            }

            $this->stackableArguments[$arg->getKey()]->addArgument($arg);

            return $this;
        }

        $this->arguments[$arg->getKey()] = $arg;

        return $this;
    }
1320553
public function with($arg)
    {
        $args = func_get_args();

        if (is_array($args[0])) {
            $this->setWith($args[0]);

            return $this;
        }

        foreach ($args as $arg) {
            if (is_string($arg)) {
                $this->addWith($arg);
            }

            return $this;
        }

        throw new DatabaseException('The arguments for with() don\'t fit');
    }
127
public function link($page, $args = array())
    {
        $this->setElement('a');
        $this->setAttr('href', $this->app->url($page, $args));

        return $this;
    }
1341398
public function attr(...$args)
    {
        $this->each(function ($item) use ($args) {
            $item->attr(...$args);
        });

        return $this;
    }
649342
public function setArguments(array $args): TaxonomyInterface
    {
        $this->args = array_merge($this->args, $args);

        return $this;
    }
156953
public function appendArg($arg)
    {
        Assertion::string($arg);
        $this->args = $this->args->append($arg);
    }
1285799
public function add($arg)
    {
        if ( $arg !== null && (!$arg instanceof self || $arg->count() > 0) ) {
            // If we decide to keep Expr\Base instances, we can use this check
            if ( ! is_string($arg)) {
                $class = get_class($arg);

                if ( ! in_array($class, $this->allowedClasses)) {
                    throw new \InvalidArgumentException("Expression of type '$class' not allowed in this context.");
                }
            }

            $this->parts[] = $arg;
        }

        return $this;
    }
208476
public function addRule($name, $args)
    {
        $this->options['rules'][$this->lastKey][$name] = $args;
        $this->lastRule = $name;

        return $this;
    }
647815
public function data(...$args)
    {
        $this->each(function ($item) use ($args) {
            $item->data(...$args);
        });

        return $this;
    }
382636
private function forwardAdd(OperationArguments $args)
    {
        if ($args->has('expiry')) {
            return $this->addInternal($args->getKey(), $args->getValue(), $args->getExpiry());
        }
        return $this->addInternal($args->getKey(), $args->getValue());
    }
34956
public function add(array $args)
    {
        # Establish args.

        $default_args = [
            'auto_prefix'        => true,
            'include_post_types' => [],
            'exclude_post_types' => [],
            'slug'               => '',
            'title'              => '',
            'class'              => '',
            'template_file'      => '',
            'template_dir'       => '',
            'callback'           => null,
            'on_save'            => null,
            'screen'             => null,
            'context'            => 'advanced',
            'priority'           => 'default',
        ];
        $cfg = (object) array_merge($default_args, $args);

        $cfg->auto_prefix        = (bool) $cfg->auto_prefix;
        $cfg->include_post_types = (array) $cfg->include_post_types;
        $cfg->exclude_post_types = (array) $cfg->exclude_post_types;
        $cfg->slug               = (string) $cfg->slug;
        $cfg->title              = (string) $cfg->title;
        $cfg->class              = (string) $cfg->class;
        $cfg->template_file      = (string) $cfg->template_file;
        $cfg->template_dir       = (string) $cfg->template_dir;
        $cfg->context            = (string) $cfg->context;
        $cfg->priority           = (string) $cfg->priority;

        if ($cfg->slug && $cfg->auto_prefix) {
            $cfg->slug = $this->App->Config->©brand['©slug'].'-'.$cfg->slug;
        } elseif (!$cfg->slug) {
            $cfg->slug = $this->App->Config->©brand['©slug'];
        }
        if (!$cfg->title) {
            $cfg->title = $this->App->Config->©brand['©name'];
        }
        $cfg->class .= $cfg->class ? ' ' : '';
        $cfg->class .= $this->App::CORE_CONTAINER_SLUG.'-menu-page-area';
        $cfg->class .= ' '.$this->App::CORE_CONTAINER_SLUG.'-post-meta-box-wrapper';
        $cfg->class .= ' '.$this->App->Config->©brand['©slug'].'-post-meta-box-wrapper';
        $cfg->class .= $cfg->slug !== $this->App->Config->©brand['©slug'] ? ' '.$cfg->slug.'-post-meta-box-wrapper' : '';

        $cfg->nonce['action'] = $cfg->slug.'-save'; // Nonce action ID.
        $cfg->nonce['name']   = '_'.$this->c::slugToVar($cfg->slug).'_nonce';

        $cfg = $this->s::applyFilters('post_meta_box', $cfg, $args, $default_args);

        if (!$cfg->template_file) {
            throw $this->c::issue('Missing template file.');
        }
        $cfg->callback = $cfg->callback ?: function (\WP_Post $WP_Post) use ($cfg) {
            $post_id = (int) $WP_Post->ID;
            $vars    = compact('post_id', 'WP_Post', 'cfg');
            wp_nonce_field($cfg->nonce['action'], $cfg->nonce['name']);
            echo $this->c::getTemplate('s-core/admin/menu-pages/post-meta-box/template.php')->parse($vars);
        };
        # Build meta box sub-routines via closures.

        $on_load_maybe_do_setup = function () use ($cfg) {
            $current_post_type = $this->s::currentMenuPagePostType();

            if ($cfg->include_post_types && !in_array($current_post_type, $cfg->include_post_types, true)) {
                return; // Does not apply to this post type.
            } elseif ($cfg->exclude_post_types && in_array($current_post_type, $cfg->exclude_post_types, true)) {
                return; // Does not apply to this post type.
            }
            $on_add_meta_boxes = function () use ($cfg) {
                add_meta_box($cfg->slug, $cfg->title, $cfg->callback, $cfg->screen, $cfg->context, $cfg->priority);
            };
            $on_save_post = function ($post_id, \WP_Post $WP_Post) use ($cfg) {
                if (!($post_id = (int) $post_id)) {
                    return; // Not possible.
                }
                $_r = $this->c::unslash($_REQUEST);
                $_r = $this->c::mbTrim($_r);

                $nonce_action = $cfg->nonce['action'];
                $nonce_value  = $_r[$cfg->nonce['name']] ?? null;

                $data = $_r[$this->c::slugToVar($cfg->slug)] ?? [];
                $data = is_array($data) ? $data : []; // Force array.
                $data = $this->c::removeKey($data, '___ignore');

                if (!isset($nonce_value)) {
                    return; // Nonce is missing.
                } elseif (!wp_verify_nonce($nonce_value, $nonce_action)) {
                    return; // Nonce is unverifiable.
                } elseif (!current_user_can('edit_post', $post_id)) {
                    return; // Current user not allowed.
                } elseif (wp_is_post_autosave($post_id)) {
                    return; // Not applicable.
                } elseif (wp_is_post_revision($post_id)) {
                    return; // Not applicable.
                }
                foreach ($data as $_key => $_value) {
                    if ($_key && is_string($_key)) {
                        // Slash, because WP will unslash.
                        // This allows for `\` in form submissions.
                        $this->s::updatePostMeta($post_id, $_key, wp_slash($_value));
                    }
                }
                if (($on_save = $cfg->on_save)) {
                    $on_save($post_id, $data);
                }
            };
            add_action('add_meta_boxes', $on_add_meta_boxes);
            add_action('save_post', $on_save_post, 10, 2);
        };
        add_action('load-post.php', $on_load_maybe_do_setup);
        add_action('load-post-new.php', $on_load_maybe_do_setup);
    }
595908
public function addArgs(array $argData)
    {
        foreach ($argData as $argName => $type) {
            $this->removeArg($argName);
            $this->args->add(new ArgumentScaffolder($argName, $type));
        }

        return $this;
    }
1336614
public function addArgument($name, Argument $arg = null) {
        if (isset($this->configOpts[$name]) || isset($this->configArgs[$name])) {
            throw new ConfigException('option/argument already set: ' . $name);
        }

        if (is_null($arg)) {
            $arg = new Argument();
        }

        $this->configArgs[$name] = $arg;
        return $arg;
    }
511694
public function orWhere(...$args): self
    {
        $this->createToken('OR', $args, $this->whereTokens, $this->whereWrapper());

        return $this;
    }
97690
public function addShould($args)
    {
        $this->boolQuery->addShould($args);
        $this->query = new \Elastica\Query($this->boolQuery);
    }
898557
public function addMetaBox($id, $args)
    {
        $box = new MetaBox($id, $this->name, $args);

        return $this;
    }
976848
public function arg(string $arg): ProcessBuilder
    {
        if ($arg === '') {
            return $this;
        }

        $this->arguments[] = $arg;

        return $this;
    }