refactor all base things

This commit is contained in:
crazywhalecc
2022-08-13 17:00:29 +08:00
committed by Jerry Ma
parent 1c801bb205
commit b2c95d96b1
54 changed files with 3009 additions and 383 deletions

View File

@@ -39,6 +39,17 @@ abstract class AnnotationBase implements IteratorAggregate
return $str;
}
/**
* 在 InstantPlugin 下调用,设置回调或匿名函数
*
* @param Closure|string $method
*/
public function withMethod($method): AnnotationBase
{
$this->method = $method;
return $this;
}
public function getIterator(): Traversable
{
return new ArrayIterator($this);