IOFactory
in package
AbstractYes
Table of Contents
Methods
- createReader() : ReaderInterface
- Create new reader.
- createWriter() : WriterInterface
- Create new writer.
- extractVariables() : array<string|int, mixed>
- Loads PhpWord ${variable} from file.
- load() : PhpWord
- Loads PhpWord from file.
- createObject() : ReaderInterface|WriterInterface
- Create new object.
- isConcreteClass() : bool
- Check if it's a concrete class (not abstract nor interface).
Methods
createReader()
Create new reader.
public
static createReader([string $name = 'Word2007' ]) : ReaderInterface
Parameters
- $name : string = 'Word2007'
Return values
ReaderInterfacecreateWriter()
Create new writer.
public
static createWriter(PhpWord $phpWord[, string $name = 'Word2007' ]) : WriterInterface
Parameters
- $phpWord : PhpWord
- $name : string = 'Word2007'
Return values
WriterInterfaceextractVariables()
Loads PhpWord ${variable} from file.
public
static extractVariables(string $filename[, string $readerName = 'Word2007' ]) : array<string|int, mixed>
Parameters
- $filename : string
-
The name of the file
- $readerName : string = 'Word2007'
Return values
array<string|int, mixed> —The extracted variables
load()
Loads PhpWord from file.
public
static load(string $filename[, string $readerName = 'Word2007' ]) : PhpWord
Parameters
- $filename : string
-
The name of the file
- $readerName : string = 'Word2007'
Return values
PhpWord —$phpWord
createObject()
Create new object.
private
static createObject(string $type, string $name[, PhpWord $phpWord = null ]) : ReaderInterface|WriterInterface
Parameters
- $type : string
- $name : string
- $phpWord : PhpWord = null
Return values
ReaderInterface|WriterInterfaceisConcreteClass()
Check if it's a concrete class (not abstract nor interface).
private
static isConcreteClass(string $class) : bool
Parameters
- $class : string