12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364 |
- <?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;
- }
- }
|