/** * @throws \Icewind\SMB\Exception\ConnectionException * @throws \Icewind\SMB\Exception\AuthenticationException * @throws \Icewind\SMB\Exception\InvalidHostException */ protected function connect() { if ($this->state and $this->state instanceof NativeShare) { return; } $this->state->init($this->server->getWorkgroup(), $this->server->getUser(), $this->server->getPassword()); }
protected function connect() { $user = $this->getUser(); $workgroup = null; if (strpos($user, '/')) { list($workgroup, $user) = explode($user, '/'); } $this->state->init($workgroup, $user, $this->getPassword()); }
/** * @throws \Icewind\SMB\Exception\ConnectionException * @throws \Icewind\SMB\Exception\AuthenticationException * @throws \Icewind\SMB\Exception\InvalidHostException */ protected function connect() { if ($this->state and $this->state instanceof NativeShare) { return; } $user = $this->server->getUser(); if (strpos($user, '/')) { list($workgroup, $user) = explode('/', $user); } elseif (strpos($user, '\\')) { list($workgroup, $user) = explode('\\', $user); } else { $workgroup = null; } $this->state->init($workgroup, $user, $this->server->getPassword()); }
protected function connect() { $this->state->init($this->getWorkgroup(), $this->getUser(), $this->getPassword()); }