SOURCE_LOCAL
SOURCE_LOCAL = 'local'
Image source type constants
Image element
$phpWord : \PhpOffice\PhpWord\PhpWord
PhpWord object
$docPart : string
Document part type: Section|Header|Footer|Footnote|Endnote
Used by textrun and cell container to determine where the element is located because it will affect the availability of other element, e.g. footnote will not be available when $docPart is header or footer.
$commentRangeStart : \PhpOffice\PhpWord\Element\Comment
The start position for the linked comment
$commentRangeEnd : \PhpOffice\PhpWord\Element\Comment
The end position for the linked comment
$parent : \PhpOffice\PhpWord\Element\AbstractElement
A reference to the parent
$trackChange : \PhpOffice\PhpWord\Element\TrackChange
changed element info
$style : \PhpOffice\PhpWord\Style\Image
Image style
getPhpWord() : \PhpOffice\PhpWord\PhpWord
Get PhpWord
setPhpWord(\PhpOffice\PhpWord\PhpWord $phpWord = null)
Set PhpWord as reference.
\PhpOffice\PhpWord\PhpWord | $phpWord |
getCommentRangeStart() : \PhpOffice\PhpWord\Element\Comment
Get comment start
setCommentRangeStart(\PhpOffice\PhpWord\Element\Comment $value)
Set comment start
\PhpOffice\PhpWord\Element\Comment | $value |
getCommentRangeEnd() : \PhpOffice\PhpWord\Element\Comment
Get comment end
setCommentRangeEnd(\PhpOffice\PhpWord\Element\Comment $value)
Set comment end
\PhpOffice\PhpWord\Element\Comment | $value |
setParentContainer(\PhpOffice\PhpWord\Element\AbstractElement $container)
Set parent container
Passed parameter should be a container, except for Table (contain Row) and Row (contain Cell)
\PhpOffice\PhpWord\Element\AbstractElement | $container |
setTrackChange(\PhpOffice\PhpWord\Element\TrackChange $trackChange)
Sets the trackChange information
\PhpOffice\PhpWord\Element\TrackChange | $trackChange |
getTrackChange() : \PhpOffice\PhpWord\Element\TrackChange
Gets the trackChange information
__construct(string $source, mixed $style = null, boolean $watermark = false, string $name = null)
Create new image element
string | $source | |
mixed | $style | |
boolean | $watermark | |
string | $name |
getStyle() : \PhpOffice\PhpWord\Style\Image
Get Image style
codeCoverageIgnore |
---|
setNewStyle(mixed $styleObject, mixed $styleValue = null, boolean $returnObject = false) : mixed
Set new style value
mixed | $styleObject | Style object |
mixed | $styleValue | Style value |
boolean | $returnObject | Always return object |
None found |
setEnumVal(string|null $value = null, array<mixed,string> $enum = array(), string|null $default = null) : string|null
Set enum value
string|null | $value | |
array<mixed,string> | $enum | |
string|null | $default |
todo |
Merge with the same method in AbstractStyle |
---|
getMediaPart() : string
Return media element (image, object, link) container name
section|headerx|footerx|footnote|endnote
None found |
setMediaRelation()
Set relation Id for media elements (link, image, object; legacy of OOXML)
None found |
setCollectionRelation()
Set relation Id for elements that will be registered in the Collection subnamespaces.
None found |
checkImage()
Check memory image, supported type, image functions, and proportional width/height.
None found |
None found |
getArchiveImageSize(string $source) : array|null
Get image size from archive
string | $source |
since |
0.12.0 Throws CreateTemporaryFileException. |
---|
getStringImageSize(string $source)
get image size from string
string | $source |
codeCoverageIgnore |
this method is just a replacement for getimagesizefromstring which exists only as of PHP 5.4 |
---|
None found |
setProportionalSize(integer $actualWidth, integer $actualHeight)
Set proportional width/height if one dimension not available.
integer | $actualWidth | |
integer | $actualHeight |
None found |