/**
  * Class constructor for your command
  *
  * If you need to override the constructor, be sure 
  * to keep the call to the parent constructor in place.
  * The $opts and $args params are automatically given to the constructor
  * by the main GR object and they are stored to $this->opts. 
  * and $this->args respectively. These are associative array of the 
  * arguments passed via the command line.
  * 
  * Eg. `gr example -f -b bar-value arg1 arg2` will create $opts as 
  * Array [
  *   foo => 1
  *   bar => bar-value
  * ]
  * and $args as
  * Array [
  *   [0] => arg1,
  *   [1] => arg2
  * ]
  * See the option_kit method below for more info on how
  * to define your options
  */
 public function __construct($opts = false, $args = false)
 {
     parent::__construct($opts, $args);
     if (isset($opts['help'])) {
         return true;
     }
 }
 public function __construct($opts = FALSE, $args = FALSE)
 {
     parent::__construct($opts, $args);
     $this->site_info = new \GR\SiteInfo();
     $this->type = \GR\Hash::fetch($opts, 'type', $this->site_info->environment);
     $this->set_database_credentials();
     $this->domain = \GR\Hash::fetch($opts, 'domain', 'giantrabbit.com');
     $process_user = posix_getpwuid(posix_geteuid());
     $this->alias = \GR\Hash::fetch($opts, 'alias', $process_user['name']);
 }
 public function __construct($opts, $args)
 {
     parent::__construct($opts, $args);
     $input_file_name = \GR\Hash::fetch($args, 0);
     if (!$input_file_name && !$opts['help']) {
         throw new \Exception("This command takes one argument - the path to the file to be stripped.");
     }
     $this->input_file_name = $input_file_name;
     $this->output_file_name = NULL;
     if (isset($this->opts['output'])) {
         $this->output_file_name = $this->opts['output'];
     }
 }
 public function __construct($opts = false, $args = false)
 {
     parent::__construct($opts, $args);
     $this->directory = realpath(\GR\Hash::fetch($opts, 'directory', '.'));
     $this->site_info = new \GR\SiteInfo($this->directory);
     $process_user = posix_getpwuid(posix_geteuid());
     $this->user = \GR\Hash::fetch($opts, 'user', $process_user['name']);
     $this->group = \GR\Hash::fetch($opts, 'group', 'giantrabbit');
     $this->web_user = \GR\Hash::fetch($opts, 'web-user', 'www-data');
     // @todo figure out why the optionkit parser won't take multiple values here
     $addl_files = \GR\Hash::fetch($opts, 'additional-site-files');
     if ($addl_files) {
         trigger_error("set-perms cannot currently accept more than one value for --additional-site-files\n", E_USER_NOTICE);
         $this->site_info->web_writeable_paths = array_merge($this->site_info->web_writeable_paths, $addl_files);
     }
 }
 /**
  * Class constructor for your command
  *
  * If you need to override the constructor, be sure 
  * to keep the call to the parent constructor in place.
  * The $opts and $args params are automatically given to the constructor
  * by the main GR object and they are stored to $this->opts. 
  * and $this->args respectively. These are associative array of the 
  * arguments passed via the command line.
  * 
  * Eg. `gr example -f -b bar-value arg1 arg2` will create $opts as 
  * Array [
  *   foo => 1
  *   bar => bar-value
  * ]
  * and $args as
  * Array [
  *   [0] => arg1,
  *   [1] => arg2
  * ]
  * See the option_kit method below for more info on how
  * to define your options
  */
 public function __construct($opts = false, $args = false)
 {
     parent::__construct($opts, $args);
     $pars = \GR\Hash::fetch($args, 0);
     $this->num_pars = (int) $pars ?: 4;
 }
 public function __construct($opts, $args)
 {
     parent::__construct($opts, $args);
     $this->site_info = new \GR\SiteInfo();
 }
 public function __construct($opts = array(), $args = FALSE)
 {
     parent::__construct($opts, $args);
     $this->root = \GR\Hash::fetch($opts, 'root');
 }
 /**
  * Class constructor for your command
  *
  * If you need to override the constructor, be sure 
  * to keep the call to the parent constructor in place.
  * The $opts and $args params are automatically given to the constructor
  * by the main GR object and they are stored to $this->opts. 
  * and $this->args respectively. These are associative array of the 
  * arguments passed via the command line.
  * 
  * Eg. `gr example -f -b bar-value arg1 arg2` will create $opts as 
  * Array [
  *   foo => 1
  *   bar => bar-value
  * ]
  * and $args as
  * Array [
  *   [0] => arg1,
  *   [1] => arg2
  * ]
  * See the option_kit method below for more info on how
  * to define your options
  */
 public function __construct($opts = false, $args = false)
 {
     parent::__construct($opts, $args);
 }