1: | <?php declare(strict_types=1); |
2: | |
3: | namespace Salient\Contract\Core; |
4: | |
5: | /** |
6: | * @api |
7: | * |
8: | * @template TBuilder of BuilderInterface |
9: | */ |
10: | interface Buildable |
11: | { |
12: | /** |
13: | * Get a builder for the class |
14: | * |
15: | * @return TBuilder |
16: | */ |
17: | public static function build(): BuilderInterface; |
18: | |
19: | /** |
20: | * Get an instance of the class from a possibly-terminated builder |
21: | * |
22: | * @param TBuilder|static $object |
23: | * @return static |
24: | */ |
25: | public static function resolve($object); |
26: | } |
27: |