Documentation

Word2007 extends AbstractReader
in package
implements ReaderInterface

Reader for Word2007.

Tags
since
0.8.0
todo

watermark, checkbox, toc

todo

Partly done: image, object

Table of Contents

Interfaces

ReaderInterface
Reader interface.

Properties

$fileHandle  : bool|resource
File pointer.
$imageLoading  : bool
Load images.
$readDataOnly  : bool
Read data only?

Methods

canRead()  : bool
Can the current ReaderInterface read the file?
hasImageLoading()  : bool
isReadDataOnly()  : bool
Read data only?
load()  : PhpWord
Loads PhpWord from file.
setImageLoading()  : self
setReadDataOnly()  : self
Set read data only.
openFile()  : resource
Open file for reading.
getRels()  : array<string|int, mixed>
Get relationship array.
readPart()  : AbstractPart
Read document part.
readRelationships()  : array<string|int, mixed>
Read all relationship files.

Properties

$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

hasImageLoading()

public hasImageLoading() : bool
Return values
bool

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

setImageLoading()

public setImageLoading(bool $value) : self
Parameters
$value : bool
Return values
self

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
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, array<string, array<string, null|AbstractElement>> $commentRefs, string $partName, string $docFile, string $xmlFile) : AbstractPart
Parameters
$phpWord : PhpWord
$relationships : array<string|int, mixed>
$commentRefs : array<string, array<string, null|AbstractElement>>
$partName : string
$docFile : string
$xmlFile : string
Return values
AbstractPart

readRelationships()

Read all relationship files.

private readRelationships(string $docFile) : array<string|int, mixed>
Parameters
$docFile : string
Return values
array<string|int, mixed>

        
On this page

Search results