API Documentation

Config/Writer/Yaml.php

Zend Framework

LICENSE

This source file is subject to the new BSD license that is bundled with this package in the file LICENSE.txt. It is also available through the world-wide-web at this URL: http://framework.zend.com/license/new-bsd If you did not receive a copy of the license and are unable to obtain it through the world-wide-web, please send an email to license@zend.com so we can send you a copy immediately.

category
Zend  
copyright
Copyright (c) 2005-2009 Zend Technologies USA Inc. (http://www.zend.com)  
license
New BSD License  
package
Zend_Config  
version
$Id: Yaml.php 23651 2011-01-21 21:51:00Z mikaelkael $  

\Zend_Config_Writer_Yaml

Abstract File Writer

Extends from
\Zend_Config_Writer_FileAbstract
category
Zend  
copyright
Copyright (c) 2005-2009 Zend Technologies USA Inc. (http://www.zend.com)  
license
New BSD License  
package
Zend_Config  
version
$Id: FileAbstract.php 23775 2011-03-01 17:25:24Z ralph $  

Properties

Propertyprotected\callable  $_yamlEncoder= 'array'

What to call when we need to decode some YAML?

Default valuearrayDetails
Type
\callable

Methods

methodpublic__construct( null|array $options = null ) : void

Create a new adapter

Inherited from: \Zend_Config_Writer::__construct()

$options can only be passed as array or be omitted

Parameters
Name Type Description
$options null|array
methodprotected_encodeYaml( int $indent, array $data ) : string
static

Service function for encoding YAML

Parameters
Name Type Description
$indent int Current indent level
$data array Data to encode
Returns
Type Description
string
methodpublicencode( array $data ) : string
static

Very dumb YAML encoder

Until we have Zend_Yaml...

Parameters
Name Type Description
$data array YAML data
Returns
Type Description
string
methodpublicgetYamlEncoder( ) : \callable

Get callback for decoding YAML

Returns
Type Description
\callable
methodpublicrender( ) : string

Render a Zend_Config into a YAML config string.

Returns
Type Description
string
Details
since
1.10  
methodpublicsetConfig( \Zend_Config $config ) : \Zend_Config_Writer

Set options via a Zend_Config instance

Inherited from: \Zend_Config_Writer::setConfig()
Parameters
Name Type Description
$config \Zend_Config
Returns
Type Description
\Zend_Config_Writer
methodpublicsetExclusiveLock( boolean $exclusiveLock ) : \Zend_Config_Writer_Array

Set wether to exclusively lock the file or not

Inherited from: \Zend_Config_Writer_FileAbstract::setExclusiveLock()
Parameters
Name Type Description
$exclusiveLock boolean
Returns
Type Description
\Zend_Config_Writer_Array
methodpublicsetFilename( string $filename ) : \Zend_Config_Writer_Array

Set the target filename

Inherited from: \Zend_Config_Writer_FileAbstract::setFilename()
Parameters
Name Type Description
$filename string
Returns
Type Description
\Zend_Config_Writer_Array
methodpublicsetOptions( array $options ) : \Zend_Config_Writer

Set options via an array

Inherited from: \Zend_Config_Writer::setOptions()
Parameters
Name Type Description
$options array
Returns
Type Description
\Zend_Config_Writer
methodpublicsetYamlEncoder( \callable $yamlEncoder ) : \Zend_Config_Yaml

Set callback for decoding YAML

Parameters
Name Type Description
$yamlEncoder \callable the decoder to set
Returns
Type Description
\Zend_Config_Yaml
methodpublicwrite( string $filename = null, \Zend_Config $config = null, bool $exclusiveLock = null ) : void

Write configuration to file.

Inherited from: \Zend_Config_Writer_FileAbstract::write()
Parameters
Name Type Description
$filename string
$config \Zend_Config
$exclusiveLock bool
Documentation was generated by DocBlox 0.13.3.