| 1 | <?php |
||
| 15 | trait AddressFinderTrait |
||
| 16 | { |
||
| 17 | /** |
||
| 18 | * 根据Code查找地址 |
||
| 19 | * |
||
| 20 | * @param string $code |
||
| 21 | * |
||
| 22 | * @return AddressInterface|false |
||
| 23 | */ |
||
| 24 | public function findByCode($code) |
||
| 30 | |||
| 31 | /** |
||
| 32 | * 根据Name查找地址 |
||
| 33 | * |
||
| 34 | * @param string $name |
||
| 35 | * |
||
| 36 | * @return AddressInterface|false |
||
| 37 | */ |
||
| 38 | public function findByName($name) |
||
| 44 | |||
| 45 | /** |
||
| 46 | * 筛选. |
||
| 47 | * |
||
| 48 | * @param \Closure $callback |
||
| 49 | * |
||
| 50 | * @return mixed |
||
| 51 | */ |
||
| 52 | abstract public function filter(\Closure $callback); |
||
| 53 | } |