1 | <?php |
||
14 | class Server { |
||
15 | |||
16 | const LOCALE = 'en_US.UTF-8'; |
||
17 | |||
18 | /** |
||
19 | * @var string $host |
||
20 | */ |
||
21 | protected $host; |
||
22 | |||
23 | /** |
||
24 | * @var string $user |
||
25 | */ |
||
26 | protected $user; |
||
27 | |||
28 | /** |
||
29 | * @var string $password |
||
30 | */ |
||
31 | protected $password; |
||
32 | |||
33 | /** |
||
34 | * @var string $workgroup |
||
35 | */ |
||
36 | protected $workgroup; |
||
37 | |||
38 | /** |
||
39 | * @var \Icewind\SMB\System |
||
40 | */ |
||
41 | private $system; |
||
42 | |||
43 | /** |
||
44 | * @var TimeZoneProvider |
||
45 | */ |
||
46 | private $timezoneProvider; |
||
47 | |||
48 | /** |
||
49 | * |
||
50 | * @var string $maxProtocol |
||
51 | */ |
||
52 | private $maxProtocol; |
||
53 | |||
54 | /** |
||
55 | * Check if the smbclient php extension is available |
||
56 | * |
||
57 | * @return bool |
||
58 | */ |
||
59 | public static function NativeAvailable() { |
||
62 | |||
63 | /** |
||
64 | * @param string $host |
||
65 | * @param string $user |
||
66 | * @param string $password |
||
67 | */ |
||
68 | 1026 | public function __construct($host, $user, $password) { |
|
77 | |||
78 | /** |
||
79 | * Split workgroup from username |
||
80 | * |
||
81 | * @param $user |
||
82 | * @return string[] [$workgroup, $user] |
||
83 | */ |
||
84 | 1026 | public function splitUser($user) { |
|
93 | |||
94 | /** |
||
95 | * @return string |
||
96 | */ |
||
97 | public function getAuthString() { |
||
100 | |||
101 | /** |
||
102 | * @return string |
||
103 | */ |
||
104 | 1026 | public function getUser() { |
|
107 | |||
108 | /** |
||
109 | * @return string |
||
110 | */ |
||
111 | 1026 | public function getPassword() { |
|
114 | |||
115 | /** |
||
116 | * return string |
||
117 | */ |
||
118 | 1026 | public function getHost() { |
|
121 | |||
122 | /** |
||
123 | * @return string |
||
124 | */ |
||
125 | 1018 | public function getWorkgroup() { |
|
128 | |||
129 | /** |
||
130 | * @return \Icewind\SMB\IShare[] |
||
131 | * |
||
132 | * @throws \Icewind\SMB\Exception\AuthenticationException |
||
133 | * @throws \Icewind\SMB\Exception\InvalidHostException |
||
134 | */ |
||
135 | 10 | public function listShares() { |
|
155 | |||
156 | /** |
||
157 | * @param string $name |
||
158 | * @return \Icewind\SMB\IShare |
||
159 | */ |
||
160 | 512 | public function getShare($name) { |
|
163 | |||
164 | /** |
||
165 | * @return string |
||
166 | */ |
||
167 | public function getTimeZone() { |
||
170 | |||
171 | /** |
||
172 | * @return integer |
||
173 | */ |
||
174 | 510 | public function getMaxProtocol() { |
|
177 | |||
178 | /** |
||
179 | * @param integer $maxProtocol |
||
180 | */ |
||
181 | public function setMaxProtocol($maxProtocol) { |
||
188 | } |
||
189 |