Source of file Struct.php
Size: 1,358 Bytes - Last Modified: 2014-03-12T23:21:18+01:00
/home/theseer/Downloads/ZendFramework-2.3.0/library/Zend/XmlRpc/Value/Struct.php
1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950 | <?php /** * Zend Framework (http://framework.zend.com/) * * @link http://github.com/zendframework/zf2 for the canonical source repository * @copyright Copyright (c) 2005-2014 Zend Technologies USA Inc. (http://www.zend.com) * @license http://framework.zend.com/license/new-bsd New BSD License */ namespace Zend\XmlRpc\Value; class Struct extends AbstractCollection { /** * Set the value of a struct native type * * @param array $value */ public function __construct($value) { $this->type = self::XMLRPC_TYPE_STRUCT; parent::__construct($value); } /** * Generate the XML code that represent struct native MXL-RPC value * * @return void */ protected function _generateXML() { $generator = $this->getGenerator(); $generator->openElement('value') ->openElement('struct'); if (is_array($this->value)) { foreach ($this->value as $name => $val) { $generator->openElement('member') ->openElement('name', $name) ->closeElement('name'); $val->generateXml(); $generator->closeElement('member'); } } $generator->closeElement('struct') ->closeElement('value'); } } |