Magento 2 Documentation  2.3
Documentation for Magento 2 CMS v2.3 (December 2018)
Writer.php
Go to the documentation of this file.
1 <?php
28 abstract class Zend_Config_Writer
29 {
35  protected $_skipOptions = array(
36  'options'
37  );
38 
44  protected $_config = null;
45 
53  public function __construct(array $options = null)
54  {
55  if (is_array($options)) {
56  $this->setOptions($options);
57  }
58  }
59 
66  public function setConfig(Zend_Config $config)
67  {
68  $this->_config = $config;
69 
70  return $this;
71  }
72 
79  public function setOptions(array $options)
80  {
81  foreach ($options as $key => $value) {
82  if (in_array(strtolower($key), $this->_skipOptions)) {
83  continue;
84  }
85 
86  $method = 'set' . ucfirst($key);
87  if (method_exists($this, $method)) {
88  $this->$method($value);
89  }
90  }
91 
92  return $this;
93  }
94 
100  abstract public function write();
101 }
__construct(array $options=null)
Definition: Writer.php:53
$config
Definition: fraud_order.php:17
$value
Definition: gender.phtml:16
$method
Definition: info.phtml:13
setOptions(array $options)
Definition: Writer.php:79
setConfig(Zend_Config $config)
Definition: Writer.php:66