Magento 2 Documentation  2.3
Documentation for Magento 2 CMS v2.3 (December 2018)
Public Member Functions
Zend_Filter_Compress_CompressAbstract Class Reference
Inheritance diagram for Zend_Filter_Compress_CompressAbstract:
Zend_Filter_Compress_CompressInterface Zend_Filter_Compress_Bz2 Zend_Filter_Compress_Gz Zend_Filter_Compress_Rar Zend_Filter_Compress_Tar Zend_Filter_Compress_Zip

Public Member Functions

 __construct ($options=null)
 
 getOptions ($option=null)
 
 setOptions (array $options)
 
- Public Member Functions inherited from Zend_Filter_Compress_CompressInterface
 compress ($value)
 
 decompress ($value)
 
 toString ()
 

Detailed Description

Definition at line 35 of file CompressAbstract.php.

Constructor & Destructor Documentation

◆ __construct()

__construct (   $options = null)

Class constructor

Parameters
array | Zend_Config$options(Optional) Options to set

Definition at line 42 of file CompressAbstract.php.

43  {
44  if ($options instanceof Zend_Config) {
45  $options = $options->toArray();
46  }
47 
48  if (is_array($options)) {
49  $this->setOptions($options);
50  }
51  }

Member Function Documentation

◆ getOptions()

getOptions (   $option = null)

Returns one or all set options

Parameters
string$option(Optional) Option to return
Returns
mixed

Definition at line 59 of file CompressAbstract.php.

60  {
61  if ($option === null) {
62  return $this->_options;
63  }
64 
65  if (!array_key_exists($option, $this->_options)) {
66  return null;
67  }
68 
69  return $this->_options[$option];
70  }

◆ setOptions()

setOptions ( array  $options)

Sets all or one option

Parameters
array$options
Returns
Zend_Filter_Compress_Bz2

Definition at line 78 of file CompressAbstract.php.

79  {
80  foreach ($options as $key => $option) {
81  $method = 'set' . $key;
82  if (method_exists($this, $method)) {
83  $this->$method($option);
84  }
85  }
86 
87  return $this;
88  }
$method
Definition: info.phtml:13

The documentation for this class was generated from the following file: