public function exec($command) { Logger::log('exec ' . $command); $result = ftp_exec($this->connectionId, $command); if (empty($result)) { Logger::log('exec command return false'); } return $result; }
public function getConnection($type, $user, $pass, $hostname, $umask = '0755') { Logger::log('getConnection'); switch ($type) { case 'ssh': $obj = new SSH($user, $pass, $hostname, $umask = '0755'); break; default: $obj = new FTP($user, $pass, $hostname, $umask = '0755'); break; } return $obj; }
public function close() { Logger::log('close '); return $this; }