<?php

namespace Application\Service\Extension\Middleware;

use Application\Service\Extension\Helper\SDMHelper;

abstract class BaseMiddlewareComponent implements MiddlewareComponentInterface
{

    public string $middlewareName = '';

    /**
     * 中间件的位置; before, after
     * @var string
     */
    public string $position = '';

    public $owner;

    public ?array $params = null;

    public $responseValue;

    public function __construct(array $params = [])
    {
    }

    protected function h(): SDMHelper
    {
        return SDMHelper::app();
    }
}