Config/Writer/Yaml.php

Show: PublicProtectedPrivateinherited
Table of Contents
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 23650 2011-01-21 21:32:57Z mikaelkael $  

\Zend_Config_Writer_Yaml

Package: Zend\Config
Abstract File Writer
Parent(s)
\Zend_Config_Writer_FileAbstract < \Zend_Config_Writer
Category
Zend  
Copyright
Copyright (c) 2005-2009 Zend Technologies USA Inc. (http://www.zend.com)  
License
New BSD License  
Version
$Id: FileAbstract.php 24593 2012-01-05 20:35:02Z matthew $  

Properties

>VPropertyprotected\Zend_Config $_config = null
Default valuenullDetails
Type
\Zend_Config
Inherited_from
\Zend_Config_Writer::$$_config  
Inherited_from
\Zend_Config_Writer_FileAbstract::$$_config  
>VPropertyprotectedboolean $_exclusiveLock = false
inherited
Wether to exclusively lock the file or not
Inherited from: \Zend_Config_Writer_FileAbstract::$$_exclusiveLock
Default valuefalseDetails
Type
boolean
Inherited_from
\Zend_Config_Writer_FileAbstract::$$_exclusiveLock  
>VPropertyprotectedstring $_filename = null
inherited
Filename to write to
Inherited from: \Zend_Config_Writer_FileAbstract::$$_filename
Default valuenullDetails
Type
string
Inherited_from
\Zend_Config_Writer_FileAbstract::$$_filename  
>VPropertyprotectedarray $_skipOptions = array('options')
inherited
Option keys to skip when calling setOptions()
Inherited from: \Zend_Config_Writer::$$_skipOptions\Zend_Config_Writer_FileAbstract::$$_skipOptions
Default valuearray('options')Details
Type
array
Inherited_from
\Zend_Config_Writer::$$_skipOptions  
Inherited_from
\Zend_Config_Writer_FileAbstract::$$_skipOptions  
>VPropertyprotectedcallable $_yamlEncoder = array('Zend_Config_Writer_Yaml', 'encode')
What to call when we need to decode some YAML?
Default valuearray('Zend_Config_Writer_Yaml', 'encode')Details
Type
callable

Methods

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

$options can only be passed as array or be omitted

Parameters
NameTypeDescription
$optionsnull | array
methodprotected_encodeYaml(int $indent, array $data) : string
static

Service function for encoding YAML

Parameters
NameTypeDescription
$indentint

Current indent level

$dataarray

Data to encode

Returns
TypeDescription
string
methodpublicencode(array $data) : string
static

Very dumb YAML encoder

Until we have Zend_Yaml...

Parameters
NameTypeDescription
$dataarray

YAML data

Returns
TypeDescription
string
methodpublicgetYamlEncoder() : callable

Get callback for decoding YAML

Returns
TypeDescription
callable
methodpublicrender() : string

Render a Zend_Config into a YAML config string.

Returns
TypeDescription
string
Details
Since
1.10  
methodpublicsetConfig(\Zend_Config $config) : \Zend_Config_Writer
inherited

Set options via a Zend_Config instance

Inherited from: \Zend_Config_Writer::setConfig()\Zend_Config_Writer_FileAbstract::setConfig()
Parameters
NameTypeDescription
$config\Zend_Config
Returns
TypeDescription
\Zend_Config_Writer
methodpublicsetExclusiveLock(boolean $exclusiveLock) : \Zend_Config_Writer_Array
inherited

Set wether to exclusively lock the file or not

Inherited from: \Zend_Config_Writer_FileAbstract::setExclusiveLock()
Parameters
NameTypeDescription
$exclusiveLockboolean
Returns
TypeDescription
\Zend_Config_Writer_Array
methodpublicsetFilename(string $filename) : \Zend_Config_Writer_Array
inherited

Set the target filename

Inherited from: \Zend_Config_Writer_FileAbstract::setFilename()
Parameters
NameTypeDescription
$filenamestring
Returns
TypeDescription
\Zend_Config_Writer_Array
methodpublicsetOptions(array $options) : \Zend_Config_Writer
Parameters
NameTypeDescription
$optionsarray
Returns
TypeDescription
\Zend_Config_Writer
methodpublicsetYamlEncoder(callable $yamlEncoder) : \Zend_Config_Yaml

Set callback for decoding YAML

Parameters
NameTypeDescription
$yamlEncodercallable

the decoder to set

Returns
TypeDescription
\Zend_Config_Yaml
methodpublicwrite(string $filename = null, \Zend_Config $config = null, bool $exclusiveLock = null) : void
inherited

Write configuration to file.

Inherited from: \Zend_Config_Writer_FileAbstract::write()
Parameters
NameTypeDescription
$filenamestring
$config\Zend_Config
$exclusiveLockbool
Documentation was generated by phpDocumentor 2.0.0a12.