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


PHP XMLWriter::getData方法代码示例

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


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

示例1: testMethodExceptions

 /**
  * Test method exceptions
  */
 public function testMethodExceptions()
 {
     $styles = array('Frame' => 'writeAlignment', 'Line' => 'writeStroke', 'TextBox' => 'writeBorder');
     foreach ($styles as $style => $method) {
         $objectClass = 'PhpOffice\\PhpWord\\Writer\\Word2007\\Style\\' . $style;
         $xmlWriter = new XMLWriter();
         $object = new $objectClass($xmlWriter);
         $object->{$method}();
         $this->assertEquals('', $xmlWriter->getData());
     }
 }
开发者ID:doit05,项目名称:relProject,代码行数:14,代码来源:StyleTest.php

示例2: testEmptyStyles

 /**
  * Test empty styles
  */
 public function testEmptyStyles()
 {
     $styles = array('Font', 'Paragraph', 'Image', 'Section', 'Table');
     foreach ($styles as $style) {
         $objectClass = 'PhpOffice\\PhpWord\\Writer\\ODText\\Style\\' . $style;
         $xmlWriter = new XMLWriter();
         $object = new $objectClass($xmlWriter);
         $object->write();
         $this->assertEquals('', $xmlWriter->getData());
     }
 }
开发者ID:hcvcastro,项目名称:pxp,代码行数:14,代码来源:StyleTest.php

示例3: testUnmatchedElements

 /**
  * Test unmatched elements
  */
 public function testUnmatchedElements()
 {
     $elements = array('Image', 'Link', 'Table', 'Text', 'Title');
     foreach ($elements as $element) {
         $objectClass = 'PhpOffice\\PhpWord\\Writer\\ODText\\Element\\' . $element;
         $xmlWriter = new XMLWriter();
         $newElement = new \PhpOffice\PhpWord\Element\PageBreak();
         $object = new $objectClass($xmlWriter, $newElement);
         $object->write();
         $this->assertEquals('', $xmlWriter->getData());
     }
 }
开发者ID:HaiLeader,项目名称:quizz,代码行数:15,代码来源:ElementTest.php

示例4: testUnmatchedElements

 /**
  * Test unmatched element
  */
 public function testUnmatchedElements()
 {
     $elements = array('CheckBox', 'Container', 'Footnote', 'Image', 'Link', 'ListItem', 'ListItemRun', 'Object', 'PreserveText', 'Table', 'Text', 'TextBox', 'TextBreak', 'Title', 'TOC', 'Field', 'Line', 'Shape', 'Chart', 'FormField', 'SDT');
     foreach ($elements as $element) {
         $objectClass = 'PhpOffice\\PhpWord\\Writer\\Word2007\\Element\\' . $element;
         $xmlWriter = new XMLWriter();
         $newElement = new \PhpOffice\PhpWord\Element\PageBreak();
         $object = new $objectClass($xmlWriter, $newElement);
         $object->write();
         $this->assertEquals('', $xmlWriter->getData());
     }
 }
开发者ID:productioncompilers,项目名称:PHPWord,代码行数:15,代码来源:ElementTest.php


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