Exemple #1
0
 /**
  *	__construct()
  *	
  *	Default constructor.
  *	
  *	@param		reference	&$parent		[optional] Reference to the object containing the status() function for status updates.
  *	@return		null
  *
  */
 public function __construct(&$parent = NULL)
 {
     parent::__construct($parent);
     // Define the initial details
     $this->_method_details['attr'] = array('name' => 'ZipArchive Method', 'compatibility' => pluginbuddy_zbzipziparchive::$_is_compatibility_method);
     $this->_method_details['param'] = array('path' => '');
 }
Exemple #2
0
 /**
  *	__construct()
  *	
  *	Default constructor.
  *	
  *	@param		reference	&$parent		[optional] Reference to the object containing the status() function for status updates.
  *	@return		null
  *
  */
 public function __construct(&$parent = NULL)
 {
     parent::__construct($parent);
     // Set the internal flag indicating if exec_dir is set in the PHP environment
     $this->set_exec_dir_flag();
     // Override some of parent defaults
     $this->_method_details['attr'] = array_merge($this->_method_details['attr'], array('name' => 'Exec Method', 'compatibility' => pluginbuddy_zbzipexec::$_is_compatibility_method));
     // Now set up the default executable paths (not merging but setting)
     // Note: Parent constructor set the os type value
     switch ($this->get_os_type()) {
         case self::OS_TYPE_NIX:
             $this->set_executable_paths(explode(PATH_SEPARATOR, self::DEFAULT_EXECUTABLE_PATHS), false);
             break;
         case self::OS_TYPE_WIN:
             $this->set_executable_paths(explode(PATH_SEPARATOR, self::WINDOWS_EXECUTABLE_PATHS), false);
             // Need to merge in ABSPATH here because we cannot set that in the defaults - it is prepended
             $this->set_executable_paths(array(rtrim(ABSPATH, DIRECTORY_SEPARATOR)));
             break;
         default:
             // Log error and leave paths empty
             pb_backupbuddy::status('details', sprintf(__('Unknown OS type (%1$s) could not set executable paths', 'it-l10n-backupbuddy'), $this->get_os_type()));
     }
 }
 /**
  *	__construct()
  *	
  *	Default constructor.
  *	
  *	@param		reference	&$parent		[optional] Reference to the object containing the status() function for status updates.
  *	@return		null
  *
  */
 public function __construct(&$parent = NULL)
 {
     parent::__construct($parent);
     // Override some of parent defaults
     $this->_method_details['attr'] = array_merge($this->_method_details['attr'], array('name' => 'ZipArchive Method', 'compatibility' => pluginbuddy_zbzipziparchive::$_is_compatibility_method));
     // No relevant parameters for this method
     $this->_method_details['param'] = array();
 }