Magento 2 Documentation  2.3
Documentation for Magento 2 CMS v2.3 (December 2018)
Public Member Functions | Protected Attributes
Zend_Config_Writer Class Reference
Inheritance diagram for Zend_Config_Writer:
Zend_Config_Writer_FileAbstract Zend_Config_Writer_Ini Zend_Config_Writer_Json Zend_Config_Writer_Xml Zend_Config_Writer_Yaml

Public Member Functions

 __construct (array $options=null)
 
 setConfig (Zend_Config $config)
 
 setOptions (array $options)
 
 write ()
 

Protected Attributes

 $_skipOptions
 
 $_config = null
 

Detailed Description

Definition at line 28 of file Writer.php.

Constructor & Destructor Documentation

◆ __construct()

__construct ( array  $options = null)

Create a new adapter

$options can only be passed as array or be omitted

Parameters
null | array$options

Definition at line 53 of file Writer.php.

54  {
55  if (is_array($options)) {
56  $this->setOptions($options);
57  }
58  }
setOptions(array $options)
Definition: Writer.php:79

Member Function Documentation

◆ setConfig()

setConfig ( Zend_Config  $config)

Set options via a Zend_Config instance

Parameters
Zend_Config$config
Returns
Zend_Config_Writer

Definition at line 66 of file Writer.php.

67  {
68  $this->_config = $config;
69 
70  return $this;
71  }
$config
Definition: fraud_order.php:17

◆ setOptions()

setOptions ( array  $options)

Set options via an array

Parameters
array$options
Returns
Zend_Config_Writer

Definition at line 79 of file Writer.php.

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  }
$value
Definition: gender.phtml:16
$method
Definition: info.phtml:13

◆ write()

write ( )
abstract

Write a Zend_Config object to it's target

Returns
void

Field Documentation

◆ $_config

$_config = null
protected

Definition at line 44 of file Writer.php.

◆ $_skipOptions

$_skipOptions
protected
Initial value:
= array(
'options'
)

Definition at line 35 of file Writer.php.


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