<?php

namespace inter\gen;

class ProcessConfig
{
    // 文件名前缀
    public string $fileNamePrefix = "";
    // 文件名后缀
    public string $fileNameSuffix = "";
    // 命名空间
    private string $namespace = "";
    // 继承类
    public array $extends = [];
    // 是否有get方法
    public bool $isHasGetFunc = false;
    // 是否有set方法
    public bool $isHasSetFunc = false;
    // 文件保存的路径
    public string $savePath = "";
    /**  @var string[] */
    private array $uses = [];

    public function SetNamespace(string $namespace): self
    {
        if ($namespace == "") return $this;

        $this->namespace = str_replace('/', "\\", $namespace);
        return $this;
    }

    public function  addUse(string $use): self
    {
        if ($use == "") return $this;
        $use = str_replace('/', "\\", $use);
        $this->uses[] = $use;
        return $this;
    }

    public function getUses(): array
    {
        return $this->uses;
    }

    public function GetNamespace()
    {
        return $this->namespace;
    }
}
