public function __construct($args)
 {
     /*
      * Note: PHP can't use constants as class defaults,
      * so we cannot set these in $default_options above.
      */
     if (defined('IMPORT_DATA_DIR')) {
         $this->default_options['d'] = IMPORT_DATA_DIR;
     }
     if (defined('DATA_REMOTE_USER')) {
         $this->default_options['u'] = DATA_REMOTE_USER;
     }
     if (defined('DATA_REMOTE_PASSWORD')) {
         $this->default_options['p'] = DATA_REMOTE_PASSWORD;
     }
     if (defined('DATA_REMOTE_HOST')) {
         $this->default_options['h'] = DATA_REMOTE_HOST;
     }
     if (defined('DATA_REMOTE_PATH')) {
         $this->default_options['P'] = DATA_REMOTE_PATH;
     }
     parent::__construct($args);
     if (!file_exists($this->options['d'])) {
         throw new Exception('Cannot find destination directory "' . $this->options['d'] . '"', E_USER_ERROR);
     }
 }
 public function __construct($args = array())
 {
     parent::__construct($args);
     if (!isset($this->db)) {
         $this->db = new Database(PDO_DSN, PDO_USERNAME, PDO_PASSWORD);
     }
 }
 public function __construct($args = array())
 {
     /*
      * Note: PHP can't use constants as class defaults,
      * so we cannot set this in $default_options above.
      */
     if (defined('IMPORT_DATA_DIR')) {
         $this->default_options['d'] = IMPORT_DATA_DIR;
     }
     parent::__construct($args);
     global $db;
     $db = new Database(PDO_DSN, PDO_USERNAME, PDO_PASSWORD);
     $this->db = $db;
     $this->logger = new Logger();
     $this->handleVerbosity();
 }