[ Index ] |
PHP Cross Reference of Unnamed Project |
[Summary view] [Print] [Text view]
1 <?php 2 3 /** 4 * PHPExcel_Writer_Excel2007_RelsVBA 5 * 6 * Copyright (c) 2006 - 2015 PHPExcel 7 * 8 * This library is free software; you can redistribute it and/or 9 * modify it under the terms of the GNU Lesser General Public 10 * License as published by the Free Software Foundation; either 11 * version 2.1 of the License, or (at your option) any later version. 12 * 13 * This library is distributed in the hope that it will be useful, 14 * but WITHOUT ANY WARRANTY; without even the implied warranty of 15 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 16 * Lesser General Public License for more details. 17 * 18 * You should have received a copy of the GNU Lesser General Public 19 * License along with this library; if not, write to the Free Software 20 * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA 21 * 22 * @category PHPExcel 23 * @package PHPExcel_Writer_Excel2007 24 * @copyright Copyright (c) 2006 - 2015 PHPExcel (http://www.codeplex.com/PHPExcel) 25 * @license http://www.gnu.org/licenses/old-licenses/lgpl-2.1.txt LGPL 26 * @version ##VERSION##, ##DATE## 27 */ 28 class PHPExcel_Writer_Excel2007_RelsVBA extends PHPExcel_Writer_Excel2007_WriterPart 29 { 30 /** 31 * Write relationships for a signed VBA Project 32 * 33 * @param PHPExcel $pPHPExcel 34 * @return string XML Output 35 * @throws PHPExcel_Writer_Exception 36 */ 37 public function writeVBARelationships(PHPExcel $pPHPExcel = null) 38 { 39 // Create XML writer 40 $objWriter = null; 41 if ($this->getParentWriter()->getUseDiskCaching()) { 42 $objWriter = new PHPExcel_Shared_XMLWriter(PHPExcel_Shared_XMLWriter::STORAGE_DISK, $this->getParentWriter()->getDiskCachingDirectory()); 43 } else { 44 $objWriter = new PHPExcel_Shared_XMLWriter(PHPExcel_Shared_XMLWriter::STORAGE_MEMORY); 45 } 46 47 // XML header 48 $objWriter->startDocument('1.0', 'UTF-8', 'yes'); 49 50 // Relationships 51 $objWriter->startElement('Relationships'); 52 $objWriter->writeAttribute('xmlns', 'http://schemas.openxmlformats.org/package/2006/relationships'); 53 $objWriter->startElement('Relationship'); 54 $objWriter->writeAttribute('Id', 'rId1'); 55 $objWriter->writeAttribute('Type', 'http://schemas.microsoft.com/office/2006/relationships/vbaProjectSignature'); 56 $objWriter->writeAttribute('Target', 'vbaProjectSignature.bin'); 57 $objWriter->endElement(); 58 $objWriter->endElement(); 59 60 return $objWriter->getData(); 61 62 } 63 }
title
Description
Body
title
Description
Body
title
Description
Body
title
Body
Generated: Thu Aug 11 10:00:09 2016 | Cross-referenced by PHPXref 0.7.1 |