Abstract File Writer

category Zend
package Zend_Config
copyright Copyright (c) 2005-2009 Zend Technologies USA Inc. (http://www.zend.com)
license New BSD License
inherited_from \Zend_Config_Writer_FileAbstract

 Methods

Create a new adapter

__construct(null|array $options = null
Inherited

$options can only be passed as array or be omitted

Parameters

$options

nullarray

Very dumb YAML encoder

encode(array $data) : string
Static

Until we have Zend_Yaml...

Parameters

$data

array

YAML data

Returns

string

Get callback for decoding YAML

getYamlEncoder() : callable

Returns

callable

Render a Zend_Config into a YAML config string.

render() : string
since 1.10
inherited_from \Zend_Config_Writer_FileAbstract::render()

Returns

string

Render a Zend_Config into a config file string.

render() : string
Inherited
since 1.10
todo For 2.0 this should be redone into an abstract method.

Returns

string

Set options via a Zend_Config instance

setConfig(\Zend_Config $config) : \Zend_Config_Writer
Inherited

Parameters

$config

\Zend_Config

Returns

\Zend_Config_Writer

Set wether to exclusively lock the file or not

setExclusiveLock(boolean $exclusiveLock) : \Zend_Config_Writer_Array
Inherited

Parameters

$exclusiveLock

boolean

Returns

\Zend_Config_Writer_Array

Set the target filename

setFilename(string $filename) : \Zend_Config_Writer_Array
Inherited

Parameters

$filename

string

Returns

\Zend_Config_Writer_Array

Set options via an array

setOptions(array $options) : \Zend_Config_Writer
Inherited

Parameters

$options

array

Returns

\Zend_Config_Writer

Set callback for decoding YAML

setYamlEncoder(callable $yamlEncoder) : \Zend_Config_Yaml

Parameters

$yamlEncoder

callable

the decoder to set

Returns

\Zend_Config_Yaml

Write a Zend_Config object to it's target

write() : void
Inherited

Service function for encoding YAML

_encodeYaml(integer $indent, array $data) : string
Static

Parameters

$indent

integer

Current indent level

$data

array

Data to encode

Returns

string

 Properties

 

Config object to write

$_config : \Zend_Config

Default

null
 

Wether to exclusively lock the file or not

$_exclusiveLock : boolean

Default

false
 

Filename to write to

$_filename : string

Default

null
 

Option keys to skip when calling setOptions()

$_skipOptions : array

Default

array('options')
 

What to call when we need to decode some YAML?

$_yamlEncoder : callable

Default

array('Zend_Config_Writer_Yaml', 'encode')