AbstractDecoder
in package
Table of Contents
Properties
- $data : mixed
- Buffer of input data
Methods
- __construct() : mixed
- Creates new Decoder with data
- __toString() : string
- Decoder object transforms to string source data
- init() : Image
- Initiates new image from mixed data
- initFromBinary() : Image
- Initiates new image from binary data
- initFromGdResource() : Image
- Initiates new image from GD resource
- initFromImagick() : Image
- Initiates new image from Imagick object
- initFromInterventionImage() : Image
- Initiates new Image from Intervention\Image\Image
- initFromPath() : Image
- Initiates new image from path in filesystem
- initFromStream() : Image
- Init from given stream
- initFromUrl() : Image
- Init from given URL
- isBase64() : bool
- Determines if current source data is base64 encoded
- isBinary() : bool
- Determines if current source data is binary data
- isDataUrl() : bool
- Determines if current source data is data-url
- isFilePath() : bool
- Determines if current source data is file path
- isGdResource() : bool
- Determines if current source data is GD resource
- isImagick() : bool
- Determines if current source data is Imagick object
- isInterventionImage() : bool
- Determines if current source data is Intervention\Image\Image object
- isSplFileInfo() : bool
- Determines if current data is SplFileInfo object
- isStream() : bool
- Determines if current source data is a stream resource
- isSymfonyUpload() : bool
- Determines if current data is Symfony UploadedFile component
- isUrl() : bool
- Determines if current source data is url
- decodeDataUrl() : string
- Parses and decodes binary image data from data-url
Properties
$data
Buffer of input data
private
mixed
$data
Methods
__construct()
Creates new Decoder with data
public
__construct([mixed $data = null ]) : mixed
Parameters
- $data : mixed = null
__toString()
Decoder object transforms to string source data
public
__toString() : string
Return values
stringinit()
Initiates new image from mixed data
public
init(mixed $data) : Image
Parameters
- $data : mixed
Return values
ImageinitFromBinary()
Initiates new image from binary data
public
abstract initFromBinary(string $data) : Image
Parameters
- $data : string
Return values
ImageinitFromGdResource()
Initiates new image from GD resource
public
abstract initFromGdResource(resource $resource) : Image
Parameters
- $resource : resource
Return values
ImageinitFromImagick()
Initiates new image from Imagick object
public
abstract initFromImagick(Imagick $object) : Image
Parameters
- $object : Imagick
Return values
ImageinitFromInterventionImage()
Initiates new Image from Intervention\Image\Image
public
initFromInterventionImage(Image $object) : Image
Parameters
- $object : Image
Return values
ImageinitFromPath()
Initiates new image from path in filesystem
public
abstract initFromPath(string $path) : Image
Parameters
- $path : string
Return values
ImageinitFromStream()
Init from given stream
public
initFromStream(StreamInterface|resource $stream) : Image
Parameters
- $stream : StreamInterface|resource
Return values
ImageinitFromUrl()
Init from given URL
public
initFromUrl(string $url) : Image
Parameters
- $url : string
Return values
ImageisBase64()
Determines if current source data is base64 encoded
public
isBase64() : bool
Return values
boolisBinary()
Determines if current source data is binary data
public
isBinary() : bool
Return values
boolisDataUrl()
Determines if current source data is data-url
public
isDataUrl() : bool
Return values
boolisFilePath()
Determines if current source data is file path
public
isFilePath() : bool
Return values
boolisGdResource()
Determines if current source data is GD resource
public
isGdResource() : bool
Return values
boolisImagick()
Determines if current source data is Imagick object
public
isImagick() : bool
Return values
boolisInterventionImage()
Determines if current source data is Intervention\Image\Image object
public
isInterventionImage() : bool
Return values
boolisSplFileInfo()
Determines if current data is SplFileInfo object
public
isSplFileInfo() : bool
Return values
boolisStream()
Determines if current source data is a stream resource
public
isStream() : bool
Return values
boolisSymfonyUpload()
Determines if current data is Symfony UploadedFile component
public
isSymfonyUpload() : bool
Return values
boolisUrl()
Determines if current source data is url
public
isUrl() : bool
Return values
booldecodeDataUrl()
Parses and decodes binary image data from data-url
private
decodeDataUrl(string $data_url) : string
Parameters
- $data_url : string