* @Link https://gitee.com/xmo/MineAdmin */ declare(strict_types=1); namespace Builder\Generator; use Psr\Container\ContainerInterface; abstract class MineGenerator { /** * @var string */ protected string $stubDir; /** * @var string */ protected string $namespace; /** * @var ContainerInterface */ protected ContainerInterface $container; public const NO = 1; public const YES = 2; /** * MineGenerator constructor. * @param ContainerInterface $container */ public function __construct(ContainerInterface $container) { $this->setStubDir(BASE_PATH . '/mine/Generator/Stubs/'); $this->container = $container; } public function getStubDir(): string { return $this->stubDir; } public function setStubDir(string $stubDir) { $this->stubDir = $stubDir; } /** * @return string */ public function getNamespace(): string { return $this->namespace; } /** * @param mixed $namespace */ public function setNamespace(string $namespace): void { $this->namespace = $namespace; } public function replace(): self { return $this; } }