1 | <?php |
||
45 | class AmoCrmManager |
||
46 | { |
||
47 | /** |
||
48 | * The config instance. |
||
49 | * |
||
50 | * @var \Illuminate\Contracts\Config\Repository |
||
51 | */ |
||
52 | protected $config; |
||
53 | |||
54 | /** |
||
55 | * The AmoCRM client instance. |
||
56 | * |
||
57 | * @var \AmoCRM\Client |
||
58 | */ |
||
59 | protected $client; |
||
60 | |||
61 | /** |
||
62 | * Create a new manager instance. |
||
63 | * |
||
64 | * @param \Illuminate\Contracts\Config\Repository $config |
||
65 | */ |
||
66 | 23 | public function __construct(Repository $config) |
|
70 | |||
71 | /** |
||
72 | * Get the config instance. |
||
73 | * |
||
74 | * @return \Illuminate\Contracts\Config\Repository |
||
75 | */ |
||
76 | 20 | public function getConfig() |
|
80 | |||
81 | /** |
||
82 | * Get the AmoCRM client instance. |
||
83 | * |
||
84 | * @return \AmoCRM\Client |
||
85 | */ |
||
86 | 20 | public function getClient() |
|
98 | |||
99 | /** |
||
100 | * Get the AmoCRM Fields helper instance. |
||
101 | * |
||
102 | * @return \AmoCRM\Helpers\Fields |
||
103 | */ |
||
104 | 1 | public function getFields() |
|
108 | |||
109 | /** |
||
110 | * Get the AmoCRM B2BFamily helper instance. |
||
111 | * |
||
112 | * @return \AmoCRM\Helpers\B2BFamily |
||
113 | */ |
||
114 | 1 | public function getB2BFamily() |
|
125 | |||
126 | /** |
||
127 | * Dynamically pass methods to AmoCRM client instance. |
||
128 | * |
||
129 | * @param string $property |
||
130 | * @return \AmoCRM\Models\ModelInterface |
||
131 | */ |
||
132 | 18 | public function __get($property) |
|
136 | } |
||
137 |