Esempio n. 1
0
 /**
  * @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());
 }
Esempio n. 2
0
 protected function connect()
 {
     $user = $this->getUser();
     $workgroup = null;
     if (strpos($user, '/')) {
         list($workgroup, $user) = explode($user, '/');
     }
     $this->state->init($workgroup, $user, $this->getPassword());
 }
Esempio n. 3
0
 /**
  * @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());
 }
Esempio n. 4
0
 protected function connect()
 {
     $this->state->init($this->getWorkgroup(), $this->getUser(), $this->getPassword());
 }