public function login($username = 'anonymous', $password = '') { $result = $this->ftp->login($username, $password); if ($result === false) { throw new FtpException('Login incorrect'); } return $this; }
public function __construct($host, $user, $password, $environment) { $this->connection = new \FtpClient\FtpClient(); $this->connection->connect($host); $this->connection->login($user, $password); $this->environment = $environment; }