| 1: | <?php |
| 2: | |
| 3: | /* |
| 4: | * Yate core products API wrapper library |
| 5: | * (c) Alexey Pavlyuts <alexey@pavlyuts.ru> |
| 6: | */ |
| 7: | |
| 8: | namespace Yate\Api; |
| 9: | |
| 10: | use Yate\Api\Exception\YateException; |
| 11: | |
| 12: | /** |
| 13: | * Interface for configuration object |
| 14: | * |
| 15: | * Configuration object stores core API configutarion, including access keys and |
| 16: | * all external bindings. |
| 17: | */ |
| 18: | interface ConfigInterface |
| 19: | { |
| 20: | |
| 21: | /** |
| 22: | * Provides API URI for given node |
| 23: | * |
| 24: | * Should return API URI for e given node as string. If there no URI for a |
| 25: | * node configured, YateException must be thrown. |
| 26: | * |
| 27: | * @param string $node |
| 28: | * @return string |
| 29: | * @throws YateException |
| 30: | */ |
| 31: | public function getNodeUri(string $node): string; |
| 32: | |
| 33: | /** |
| 34: | * Provides access secret for given node |
| 35: | * |
| 36: | * Should return access secret for a given node as string. If there no secret for a |
| 37: | * node configured, YateException must be thrown. |
| 38: | * |
| 39: | * @param string $node |
| 40: | * @return string |
| 41: | * @throws YateException |
| 42: | */ |
| 43: | public function getNodeSecret(string $node): string; |
| 44: | } |
| 45: |