WatermarkFactory
in package
uses
ForwardsCalls
Partly based on this PR: https://github.com/PHP-FFMpeg/PHP-FFMpeg/pull/754/files
Table of Contents
Constants
Properties
- $alignments : array<string|int, mixed>
- Array with the horizontal (x) and verical (y) alignment.
- $bottom : mixed
- $disk : Disk
- $image : Image
- $left : mixed
- $media : Media
- $right : mixed
- $top : mixed
- Offset values.
Methods
- __call() : mixed
- Forwards calls to the Image manipulation class.
- __construct() : mixed
- Uses the 'filesystems.default' disk as default.
- bottom() : self
- Sets the offset from the bottom.
- fromDisk() : self
- Set the disk to open files from.
- get() : WatermarkFilter
- Returns a new instance of the WatermarkFilter.
- getPath() : string
- Returns the full path to the watermark file.
- horizontalAlignment() : self
- Setter for the horizontal alignment with an optional offset.
- left() : self
- Sets the offset from the left.
- open() : self
- Instantiates a Media object for the given path.
- openUrl() : self
- Instantiates a MediaOnNetwork object for the given url and transforms it into a Media object.
- right() : self
- Sets the offset from the right.
- top() : self
- Sets the offset from to top.
- verticalAlignment() : self
- Setter for the vertical alignment with an optional offset.
- image() : Image
- Returns an instance of Image.
Constants
BOTTOM
public
mixed
BOTTOM
= 'bottom'
CENTER
public
mixed
CENTER
= 'center'
LEFT
position constants
public
mixed
LEFT
= 'left'
RIGHT
public
mixed
RIGHT
= 'right'
TOP
public
mixed
TOP
= 'top'
Properties
$alignments
Array with the horizontal (x) and verical (y) alignment.
private
array<string|int, mixed>
$alignments
= []
$bottom
private
mixed
$bottom
$disk
private
Disk
$disk
$image
private
Image
$image
$left
private
mixed
$left
$media
private
Media
$media
$right
private
mixed
$right
$top
Offset values.
private
mixed
$top
Methods
__call()
Forwards calls to the Image manipulation class.
public
__call(mixed $method, mixed $arguments) : mixed
Parameters
- $method : mixed
- $arguments : mixed
__construct()
Uses the 'filesystems.default' disk as default.
public
__construct() : mixed
bottom()
Sets the offset from the bottom.
public
bottom([int $offset = 0 ]) : self
Parameters
- $offset : int = 0
Return values
selffromDisk()
Set the disk to open files from.
public
fromDisk(mixed $disk) : self
Parameters
- $disk : mixed
Return values
selfget()
Returns a new instance of the WatermarkFilter.
public
get() : WatermarkFilter
Return values
WatermarkFiltergetPath()
Returns the full path to the watermark file.
public
getPath() : string
Return values
stringhorizontalAlignment()
Setter for the horizontal alignment with an optional offset.
public
horizontalAlignment(string $alignment[, int $offset = 0 ]) : self
Parameters
- $alignment : string
- $offset : int = 0
Return values
selfleft()
Sets the offset from the left.
public
left([int $offset = 0 ]) : self
Parameters
- $offset : int = 0
Return values
selfopen()
Instantiates a Media object for the given path.
public
open(string $path) : self
Parameters
- $path : string
Return values
selfopenUrl()
Instantiates a MediaOnNetwork object for the given url and transforms it into a Media object.
public
openUrl(string $path[, array<string|int, mixed> $headers = [] ][, callable $withCurl = null ]) : self
Parameters
- $path : string
- $headers : array<string|int, mixed> = []
- $withCurl : callable = null
Return values
selfright()
Sets the offset from the right.
public
right([int $offset = 0 ]) : self
Parameters
- $offset : int = 0
Return values
selftop()
Sets the offset from to top.
public
top([int $offset = 0 ]) : self
Parameters
- $offset : int = 0
Return values
selfverticalAlignment()
Setter for the vertical alignment with an optional offset.
public
verticalAlignment(string $alignment[, int $offset = 0 ]) : self
Parameters
- $alignment : string
- $offset : int = 0
Return values
selfimage()
Returns an instance of Image.
private
image() : Image