<?php

namespace inter\phpStruct;

class PHPClass
{
    private string $className;
    /** @var Attr[] */
    private array $attrs;
    private array $func;
    /** @var string[] */
    private array $extends;

    public function AddAttr(Attr $attr): self
    {
        $this->attrs[] = $attr;
        return $this;
    }

    /**
     * @return Attr[]
     */
    public function GetAttrs(): array
    {
        return $this->attrs;
    }

    public function AddFunc(Func $func): self
    {
        $this->func[] = $func;
        return $this;
    }

    public function SetClassName(string $className): self
    {
        $this->className = $className;
        return $this;
    }

    public function GetClassName(): string
    {
        return $this->className;
    }

    public function AddExtends(string $val): self
    {
        $this->extends[] = $val;
        return $this;
    }

    /**
     * @return string[]
     */
    public function GetExtends(): array
    {
        return $this->extends;
    }

    public function SetExtends(array $val): self
    {
        $this->extends = $val;
        return $this;
    }
}
