Word2007 extends AbstractReader implements ReaderInterface
Reader for Word2007
Tags
Interfaces, Classes and Traits
- ReaderInterface
- Reader interface
Table of Contents
- $fileHandle : bool|resource
- File pointer
- $readDataOnly : bool
- Read data only?
- canRead() : bool
- Can the current ReaderInterface read the file?
- getReadDataOnly() : mixed
- Read data only?
- isReadDataOnly() : bool
- Read data only?
- load() : PhpWord
- Loads PhpWord from file
- setReadDataOnly() : self
- Set read data only
- openFile() : resource
- Open file for reading
- getRels() : array<string|int, mixed>
- Get relationship array
- readPart() : mixed
- Read document part.
- readRelationships() : array<string|int, mixed>
- Read all relationship files
Properties
$fileHandle
File pointer
protected
bool|resource
$fileHandle
$readDataOnly
Read data only?
protected
bool
$readDataOnly
= true
Methods
canRead()
Can the current ReaderInterface read the file?
public
canRead(string $filename) : bool
Parameters
- $filename : string
Return values
bool —getReadDataOnly()
Read data only?
public
getReadDataOnly() : mixed
Tags
Return values
mixed —isReadDataOnly()
Read data only?
public
isReadDataOnly() : bool
Return values
bool —load()
Loads PhpWord from file
public
load(string $docFile) : PhpWord
Parameters
- $docFile : string
Return values
PhpWord —setReadDataOnly()
Set read data only
public
setReadDataOnly([bool $value = true ]) : self
Parameters
- $value : bool = true
Return values
self —openFile()
Open file for reading
protected
openFile(string $filename) : resource
Parameters
- $filename : string
Tags
Return values
resource —getRels()
Get relationship array
private
getRels(string $docFile, string $xmlFile[, string $targetPrefix = '' ]) : array<string|int, mixed>
Parameters
- $docFile : string
- $xmlFile : string
- $targetPrefix : string = ''
Return values
array<string|int, mixed> —readPart()
Read document part.
private
readPart(PhpWord $phpWord, array<string|int, mixed> $relationships, string $partName, string $docFile, string $xmlFile) : mixed
Parameters
- $phpWord : PhpWord
- $relationships : array<string|int, mixed>
- $partName : string
- $docFile : string
- $xmlFile : string
Return values
mixed —readRelationships()
Read all relationship files
private
readRelationships(string $docFile) : array<string|int, mixed>
Parameters
- $docFile : string