Rels
extends AbstractPart
in package
Word2007 main relationship writer: _rels/.rels.
Tags
Table of Contents
Properties
- $dateFormat : string
- $parentWriter : AbstractWriter
- Parent writer.
Methods
- getParentWriter() : AbstractWriter
- Get parent writer.
- setParentWriter() : void
- Set parent writer.
- write() : string
- Write part.
- getXmlWriter() : XMLWriter
- Get XML Writer.
- writeRels() : void
- Write relationships.
- writeText() : bool
- Write an XML text, this will call text() or writeRaw() depending on the value of Settings::isOutputEscapingEnabled().
- writeMediaRel() : void
- Write media relationships.
- writeRel() : void
- Write individual rels entry.
Properties
$dateFormat
protected
string
$dateFormat
= 'Y-m-d\TH:i:sP'
Date format
$parentWriter
Parent writer.
protected
AbstractWriter
$parentWriter
Methods
getParentWriter()
Get parent writer.
public
getParentWriter() : AbstractWriter
Return values
AbstractWritersetParentWriter()
Set parent writer.
public
setParentWriter([AbstractWriter|null $writer = null ]) : void
Parameters
- $writer : AbstractWriter|null = null
write()
Write part.
public
write() : string
Return values
stringgetXmlWriter()
Get XML Writer.
protected
getXmlWriter() : XMLWriter
Return values
XMLWriterwriteRels()
Write relationships.
protected
writeRels(XMLWriter $xmlWriter[, array<string|int, mixed> $xmlRels = [] ][, array<string|int, mixed> $mediaRels = [] ][, int $relId = 1 ]) : void
Parameters
- $xmlWriter : XMLWriter
- $xmlRels : array<string|int, mixed> = []
- $mediaRels : array<string|int, mixed> = []
- $relId : int = 1
writeText()
Write an XML text, this will call text() or writeRaw() depending on the value of Settings::isOutputEscapingEnabled().
protected
writeText(string $content) : bool
Parameters
- $content : string
-
The text string to write
Return values
bool —Returns true on success or false on failure
writeMediaRel()
Write media relationships.
private
writeMediaRel(XMLWriter $xmlWriter, int $relId, array<string|int, mixed> $mediaRel) : void
Parameters
- $xmlWriter : XMLWriter
- $relId : int
- $mediaRel : array<string|int, mixed>
writeRel()
Write individual rels entry.
private
writeRel(XMLWriter $xmlWriter, int $relId, string $type, string $target[, string $targetMode = '' ]) : void
Format: <Relationship Id="rId..." Type="http://..." Target="....xml" TargetMode="..." />
Parameters
- $xmlWriter : XMLWriter
- $relId : int
-
Relationship ID
- $type : string
-
Relationship type
- $target : string
-
Relationship target
- $targetMode : string = ''
-
Relationship target mode