1: <?php
2:
3: namespace Guzzle\Service\Builder;
4:
5: use Guzzle\Common\FromConfigInterface;
6: use Guzzle\Service\Exception\ServiceNotFoundException;
7:
8: /**
9: * Service builder to generate service builders and service clients from configuration settings
10: */
11: interface ServiceBuilderInterface
12: {
13: /**
14: * Get a service using a registered builder
15: *
16: * @param string $name Name of the registered client to retrieve
17: * @param bool|array $throwAway Set to TRUE to not store the client for later retrieval from the ServiceBuilder.
18: * If an array is specified, that data will overwrite the configured params
19: *
20: * @return FromConfigInterface
21: * @throws ServiceNotFoundException when a client cannot be found by name
22: */
23: public function get($name, $throwAway = false);
24:
25: /**
26: * Register a service by name with the service builder
27: *
28: * @param string $key Name of the client to register
29: * @param mixed $service Service to register
30: *
31: * @return ServiceBuilderInterface
32: */
33: public function set($key, $service);
34: }
35: