1: <?php
 2: 
 3: /**
 4:  * This file is part of the Minion package.
 5:  * For the full copyright and license information, please view the LICENSE
 6:  * file that was distributed with this source code.
 7:  *
 8:  * @license MIT License
 9:  */
10: 
11: namespace Minion\Service;
12: 
13: use Symfony\Component\Config\Definition\Exception\InvalidConfigurationException;
14: 
15: /**
16:  * Class ServiceConfigInterface.
17:  *
18:  * @package Minion
19:  * @author Damian SzczerbiĆski <dszczer@gmail.com>
20:  */
21: interface ServiceConfigInterface
22: {
23:     /**
24:      * ServiceInterface constructor.
25:      *
26:      * @param string      $id            Service identifier
27:      * @param array       $parsedService Parsed service array data
28:      *
29:      * @return ServiceConfigInterface
30:      *
31:      * @throws InvalidConfigurationException Throws exception when $parsedService is invalid
32:      */
33:     public function __construct($id, array $parsedService);
34: 
35:     /**
36:      * Get all associated tags.
37:      *
38:      * @return array
39:      */
40:     public function getTags();
41: 
42:     /**
43:      * Get option by it's name.
44:      *
45:      * @param string $name Option name
46:      *
47:      * @return mixed Option value
48:      *
49:      * @throws \InvalidArgumentException Tag is not defined
50:      */
51:     public function getOption($name);
52: 
53:     /**
54:      * Get all service options.
55:      *
56:      * @return array
57:      */
58:     public function getOptions();
59: 
60:     /**
61:      * Get service identifier.
62:      *
63:      * @return string
64:      */
65:     public function getId();
66: 
67:     /**
68:      * Get fully qualified service provider class name.
69:      *
70:      * @return string
71:      */
72:     public function getProviderClass();
73: }