-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathBindingFactoryInterface.php
107 lines (97 loc) · 2.77 KB
/
BindingFactoryInterface.php
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
<?php
/**
* File defining Backend\Interfaces\BindingFactoryInterface.
*
* PHP Version 5.3
*
* @category Backend
* @package Interfaces
* @author J Jurgens du Toit <jrgns@backend-php.net>
* @copyright 2011 - 2012 Jade IT (cc)
* @license http://www.opensource.org/licenses/mit-license.php MIT License
* @link http://backend-php.net
*/
namespace Backend\Interfaces;
/**
* Class to create bindings.
*
* @category Backend
* @package Interfaces
* @author J Jurgens du Toit <jrgns@backend-php.net>
* @license http://www.opensource.org/licenses/mit-license.php MIT License
* @link http://backend-php.net
*/
interface BindingFactoryInterface
{
/**
* The class constructor.
*
* @param Backend\Interfaces\ConfigInterface $bindings The bindings config.
* @param Backend\Interfaces\ConfigInterface $connections The connections config.
*/
public function __construct(ConfigInterface $bindings, ConfigInterface $connections);
/**
* Convert a string to a callback.
*
* @param string $modelName The name of the model to get the Binding for.
*
* @return CallbackInterface
*/
public function build($modelName);
/**
* Get the Bindings Configuration.
*
* @return Backend\Interfaces\ConfigInterface
*/
public function getBindings();
/**
* Set the Bindings Configuration.
*
* @param Backend\Interfaces\ConfigInterface
*
* @return Backend\Base\Utilities\BindingFactory
*/
public function setBindings(ConfigInterface $bindings);
/**
* Get the specified Binding.
*
* @return array|null The Binding or null if it doesn't exist.
*/
public function getBinding($name);
/**
* Set the values of the specified Binding.
*
* @param array $binding The Binding described as an array.
*
* @return Backend\Base\Utilities\BindingFactory
*/
public function setBinding($name, array $binding);
/**
* Get the Connections Configuration.
*
* @return Backend\Interfaces\ConfigInterface
*/
public function getConnections();
/**
* Set the Connections Configuration.
*
* @param Backend\Interfaces\ConfigInterface
*
* @return Backend\Base\Utilities\BindingFactory
*/
public function setConnections(ConfigInterface $connections);
/**
* Get the specified Connection.
*
* @return array|null The Connection or null if it doesn't exist.
*/
public function getConnection($name);
/**
* Set the values of the specified Connection.
*
* @param array $connection The Connection described as an array.
*
* @return Backend\Base\Utilities\BindingFactory
*/
public function setConnection($name, array $connection);
}