mirror of
https://github.com/zhamao-robot/zhamao-framework.git
synced 2026-07-12 03:05:34 +08:00
refactor all base things
This commit is contained in:
@@ -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);
|
||||
|
||||
Reference in New Issue
Block a user