当前位置: 首页>>代码示例>>PHP>>正文


PHP Zend_Config_Writer_Xml::render方法代码示例

本文整理汇总了PHP中Zend_Config_Writer_Xml::render方法的典型用法代码示例。如果您正苦于以下问题:PHP Zend_Config_Writer_Xml::render方法的具体用法?PHP Zend_Config_Writer_Xml::render怎么用?PHP Zend_Config_Writer_Xml::render使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在Zend_Config_Writer_Xml的用法示例。


在下文中一共展示了Zend_Config_Writer_Xml::render方法的3个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。

示例1: generateFieldCollectionXml

 /**
  * @static
  * @param  Object_Class $class
  * @return string
  */
 public static function generateFieldCollectionXml($fieldCollection)
 {
     $FieldCollectionJson = Zend_Json::encode($fieldCollection);
     $data = Zend_Json::decode($FieldCollectionJson);
     unset($data["key"]);
     $referenceFunction = function (&$value, $key) {
         $value = htmlspecialchars($value);
     };
     array_walk_recursive($data, $referenceFunction);
     $config = new Zend_Config($data, true);
     $writer = new Zend_Config_Writer_Xml(array("config" => $config));
     return $writer->render();
 }
开发者ID:ngocanh,项目名称:pimcore,代码行数:18,代码来源:Service.php

示例2: serialize

 /**
  * 
  * @param array $array
  * @return string
  */
 public static function serialize($array)
 {
     $config = new Zend_Config_Writer_Xml();
     ZendT_Xml::encodeXml($array);
     $config->setConfig(new Zend_Config($array));
     $xml = $config->render();
     return $xml;
     /*$serializer = new XML_Serializer(array(XML_SERIALIZER_OPTION_ROOT_NAME=>'config'));
       $result = $serializer->serialize($array);
       if ($result){
           $xml = $serializer->getSerializedData();
       }
       return $xml;*/
 }
开发者ID:rtsantos,项目名称:mais,代码行数:19,代码来源:Xml.php

示例3:

 *     the documentation and/or other materials provided with the
 *     distribution.
 *
 *   * Neither the name of 4worx nor the names of his contributors
 *     may be used to endorse or promote products derived from this
 *     software without specific prior written permission.
 *
 * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
 * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
 * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
 * FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE
 * COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT,
 * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING,
 * BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
 * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
 * CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
 * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN
 * ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
 * POSSIBILITY OF SUCH DAMAGE.
 *
 * @category    Glitch
 * @package     Glitch_Controller
 * @subpackage  Dispatcher
 * @author      Dolf Schimmel (Freeaqingme) <dolf@enrise.com>
 * @copyright   2011, Enrise
 * @license     http://www.opensource.org/licenses/bsd-license.php
 */
$config = new Zend_Config($data);
$xml = new Zend_Config_Writer_Xml(array('config' => $config));
return $xml->render();
开发者ID:nstapelbroek,项目名称:Glitch_Lib,代码行数:30,代码来源:Xml.php


注:本文中的Zend_Config_Writer_Xml::render方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。