objconfig.writer package¶
Submodules¶
objconfig.writer.abstractwriter module¶
This is a port of zend-config to Python
Some idioms of PHP are still employed, but where possible I have Pythonized it
Following is the header as given in zend-config:
/**
* Zend Framework (http://framework.zend.com/)
*
* @link http://github.com/zendframework/zf2 for the
* canonical source repository
* @copyright Copyright (c) 2005-2015 Zend Technologies USA Inc.
* (http://www.zend.com)
* @license http://framework.zend.com/license/new-bsd New BSD License
*/
-
class
objconfig.writer.abstractwriter.
AbstractWriter
[source]¶ Bases:
objconfig.writer.writerinterface.WriterInterface
Following is the class documentation as given in zend-config:
There is no class documentation
-
processConfig
(config)[source]¶ Following is the header as given in zend-config:
/** * @param array $config * @return string */
-
toFile
(filename, config, exclusive=True)[source]¶ CHANGELOG: objconfig v1.1: use portalocker to establish an exclusive lock if given
Following is the header as given in zend-config:
/** * toFile(): defined by Writer interface. * * @see WriterInterface::toFile() * @param string $filename * @param mixed $config * @param bool $exclusiveLock * @return void * @throws Exception\InvalidArgumentException * @throws Exception\RuntimeException */
-
objconfig.writer.ini module¶
This is a port of zend-config to Python
Some idioms of PHP are still employed, but where possible I have Pythonized it
Following is the header as given in zend-config:
/**
* Zend Framework (http://framework.zend.com/)
*
* @link http://github.com/zendframework/zf2 for the
* canonical source repository
* @copyright Copyright (c) 2005-2015 Zend Technologies USA Inc.
* (http://www.zend.com)
* @license http://framework.zend.com/license/new-bsd New BSD License
*/
-
class
objconfig.writer.ini.
Ini
(nestSeparator=’.’, renderWithoutSections=False)[source]¶ Bases:
objconfig.writer.abstractwriter.AbstractWriter
Following is the class documentation as given in zend-config:
There is no documentation
-
addBranch
(config, parents=None)[source]¶ Following is the header as given in zend-config:
/** * Add a branch to an INI string recursively. * * @param array $config * @param array $parents * @return string */
-
getNestSeparator
()[source]¶ Following is the header as given in zend-config:
/** * Get nest separator. * * @return string */
-
nestSeparator
= None¶ Following is the header as given in zend-config:
/** * If true the INI string is rendered in the global namespace without * sections. * * @var bool */
-
prepareValue
(value)[source]¶ - NOTE:
- Just converts to string (minus double-quotes)
Following is the header as given in zend-config:
/** * Prepare a value for INI. * * @param mixed $value * @return string * @throws Exception\RuntimeException */
-
processConfig
(config)[source]¶ Following is the header as given in zend-config:
/** * processConfig(): defined by AbstractWriter. * * @param array $config * @return string */
-
setNestSeparator
(separator)[source]¶ Following is the header as given in zend-config:
/** * Set nest separator. * * @param string $separator * @return self */
-
setRenderWithoutSectionsFlags
(withoutSections)[source]¶ Following is the header as given in zend-config:
/** * Set if rendering should occur without sections or not. * * If set to true, the INI file is rendered without sections completely * into the global namespace of the INI file. * * @param bool $withoutSections * @return Ini */
-
shouldRenderWithoutSections
()[source]¶ Following is the header as given in zend-config:
/** * Return whether the writer should render without sections. * * @return bool */
-
sortRootElements
(config)[source]¶ - NOTE:
- Default section replaces empty section, as Ini reader won’t read without sections
Following is the header as given in zend-config:
/** * Root elements that are not assigned to any section needs to be on the * top of config. * * @param array $config * @return array */
-
objconfig.writer.json module¶
This is a port of zend-config to Python
Some idioms of PHP are still employed, but where possible I have Pythonized it
Following is the header as given in zend-config:
/**
* Zend Framework (http://framework.zend.com/)
*
* @link http://github.com/zendframework/zf2 for the
* canonical source repository
* @copyright Copyright (c) 2005-2015 Zend Technologies USA Inc.
* (http://www.zend.com)
* @license http://framework.zend.com/license/new-bsd New BSD License
*/
-
class
objconfig.writer.json.
Json
[source]¶ Bases:
objconfig.writer.abstractwriter.AbstractWriter
Following is the class documentation as given in zend-config:
There is no documentation
objconfig.writer.writerinterface module¶
This is a port of zend-config to Python
Some idioms of PHP are still employed, but where possible I have Pythonized it
Following is the header as given in zend-config:
/**
* Zend Framework (http://framework.zend.com/)
*
* @link http://github.com/zendframework/zf2 for the
* canonical source repository
* @copyright Copyright (c) 2005-2015 Zend Technologies USA Inc.
* (http://www.zend.com)
* @license http://framework.zend.com/license/new-bsd New BSD License
*/
-
class
objconfig.writer.writerinterface.
WriterInterface
[source]¶ Bases:
object
The following is an ‘interface’ (abstraction) to be implemented by all configuration writers
objconfig.writer.xml module¶
This is a port of zend-config to Python
Some idioms of PHP are still employed, but where possible I have Pythonized it
Following is the header as given in zend-config:
/**
* Zend Framework (http://framework.zend.com/)
*
* @link http://github.com/zendframework/zf2 for the
* canonical source repository
* @copyright Copyright (c) 2005-2015 Zend Technologies USA Inc.
* (http://www.zend.com)
* @license http://framework.zend.com/license/new-bsd New BSD License
*/
-
class
objconfig.writer.xml.
Xml
[source]¶ Bases:
objconfig.writer.abstractwriter.AbstractWriter
Following is the class documentation as given in zend-config:
There is no documentation
-
addBranch
(branchName, config, root)[source]¶ Following is the header as given in zend-config:
/** * Add a branch to an XML object recursively. * * @param string $branchName * @param array $config * @param XMLWriter $writer * @return void * @throws Exception\RuntimeException */
-
processConfig
(config)[source]¶ Following is the header as given in zend-config:
/** * processConfig(): defined by AbstractWriter. * * @param array $config * @return string */
-
toFile
(filename, config, exclusive=True)[source]¶ CHANGELOG: objconfig v1.2: use portalocker to establish an exclusive lock if given
Following is the header as given in zend-config:
/** * toFile(): defined by Writer interface. * * @see WriterInterface::toFile() * @param string $filename * @param mixed $config * @param bool $exclusiveLock * @return void * @throws Exception\InvalidArgumentException * @throws Exception\RuntimeException */
-
objconfig.writer.yaml module¶
This is a port of zend-config to Python
Some idioms of PHP are still employed, but where possible I have Pythonized it
Following is the header as given in zend-config:
/**
* Zend Framework (http://framework.zend.com/)
*
* @link http://github.com/zendframework/zf2 for the
* canonical source repository
* @copyright Copyright (c) 2005-2015 Zend Technologies USA Inc.
* (http://www.zend.com)
* @license http://framework.zend.com/license/new-bsd New BSD License
*/
-
class
objconfig.writer.yaml.
Yaml
[source]¶ Bases:
objconfig.writer.abstractwriter.AbstractWriter
Following is the class documentation as given in zend-config:
There is no documentation