Magento 2 Documentation  2.3
Documentation for Magento 2 CMS v2.3 (December 2018)
CompressAbstract.php
Go to the documentation of this file.
1 <?php
25 #require_once 'Zend/Filter/Compress/CompressInterface.php';
26 
36 {
42  public function __construct($options = null)
43  {
44  if ($options instanceof Zend_Config) {
45  $options = $options->toArray();
46  }
47 
48  if (is_array($options)) {
49  $this->setOptions($options);
50  }
51  }
52 
59  public function getOptions($option = null)
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  }
71 
78  public function setOptions(array $options)
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  }
89 }
$method
Definition: info.phtml:13