Filestack\Filelink
Class representing a Filestack Filelink object
Synopsis
- // members
- public $api_key;
- public $handle;
- public $metadata;
- public $security;
- public $transform_url;
- // methods
- public void __construct()
- public void __call()
- public Filestack/Filelink ascii()
- public Filestack/Filelink blackWhite()
- public Filestack/Filelink blur()
- public Filestack/Filelink border()
- public Filestack/Filelink circle()
- public Filestack/Filelink collage()
- public Filestack/Filelink compress()
- public string convertAudio()
- public Filestack/Filelink convertFile()
- public string convertVideo()
- public Filestack/Filelink crop()
- public json debug()
- public Filestack/Filelink detectFaces()
- public Filestack/Filelink enhance()
- public Filestack/Filelink modulate()
- public Filestack/Filelink monochrome()
- public Filestack/Filelink negative()
- public Filestack/Filelink oilPaint()
- public Filestack/Filelink partialBlur()
- public Filestack/Filelink partialPixelate()
- public Filestack/Filelink pixelate()
- public Filestack/Filelink polaroid()
- public Filestack/Filelink quality()
- public Filestack/Filelink redEye()
- public Filestack/Filelink resize()
- public Filestack/Filelink roundedCorners()
- public Filestack/Filelink rotate()
- public Filestack/Filelink sepia()
- public Filestack/Filelink sharpen()
- public Filestack/Filelink shadow()
- public Filestack/Filelink tornEdges()
- public Filestack/Filelink upscale()
- public Filestack/Filelink vignette()
- public Filestack/Filelink watermark()
- public string getContent()
- public array getMetaData()
- public bool delete()
- public bool download()
- public boolean overwrite()
- public void resetTransform()
- public Filelink save()
- public void setTransformUrl()
- public json getSafeForWork()
- public json getTags()
- public Filelink transform()
- public Filestack/Filelink zip()
- private string hostname()
- public string url()
- public string signedUrl()
- protected void initTransformUrl()
- // Inherited methods from CommonMixin
- protected string getCustomUrl()
- public bool isUrl()
- public int get_retry_miliseconds()
- public bool sendDelete()
- protected bool sendDownload()
- public void addDownloadFlagToUrl()
- protected string sendGetContent()
- protected array sendGetMetaData()
- protected json sendGetSafeForWork()
- protected json sendGetTags()
- public Filelink sendOverwrite()
- protected Filelink handleResponseCreateFilelink()
- protected array handleResponseDecodeJson()
- protected void sendRequest()
- protected void getSourceHeaders()
- protected void addRequestSourceHeader()
- protected void appendData()
- protected void appendPromise()
- protected void settlePromises()
- // Inherited methods from TransformationMixin
- public Transformation getTransformStr()
- protected Transformation insertTransformStr()
- public json sendDebug()
- public Filelink sendTransform()
- public string sendVideoConvert()
- public json getConvertTaskInfo()
- protected string createTransformStr()
- protected string createTransformUrl()
Hierarchy
Coverage
Methods | 0% | 0 / 52 |
Lines | 0% | / |
Members
protected
- $http_client
- $http_promises
- $source_header
- $user_agent_header
public
- $api_key
- $cname
- $handle
- $metadata
- $security
- $transform_url
Methods
private
- hostname() — return the protocol and hostname for the URL, depending on custom CNAME.
protected
- initTransformUrl() — Initialize transform url if it doesnt exist
public
- __construct() — Filelink constructor
- __call() — Catchall function for invalid method calls.
- ascii() — Set this Filelink's transform_url to include ascii task
- blackWhite() — Set this Filelink's transform_url to include blackwhite task
- blur() — Set this Filelink's transform_url to include blur task
- border() — Set this Filelink's transform_url to include border task
- circle() — Set this Filelink's transform_url to include the circle task
- collage() — Set this Filelink's transform_url to include the collage task
- compress() — Set this Filelink's transform_url to include the compress task
- convertAudio() — Convert this filelink to another audio format. You can setup webhooks to notify you when the transcoding has completed. See our online documentation for more details: https://www.filestack.com/docs/audio-transformations
- convertFile() — Convert this filelink to another file format. To see which formats can be converted, see: https://www.filestack.com/docs/image-transformations/conversion
- convertVideo() — Convert this filelink to another video format.
- crop() — Set this Filelink's transform_url to include crop task
- debug() — Set this Filelink's transform_url to include the detect_faces task
- delete() — Delete this filelink from cloud storage
- detectFaces() — Set this Filelink's transform_url to include the detect_faces task
- download() — Download filelink as a file, saving it to specified destination
- enhance() — Set this Filelink's transform_url to include the enhance task
- getContent() — Get the content of filelink
- getMetaData() — Get metadata of filehandle
- getSafeForWork() — Get the sfw (safe for work) flag for this filelink
- getTags() — Get the tags for this filelink
- modulate() — Set this Filelink's transform_url to include the modulate task
- monochrome() — Set this Filelink's transform_url to include the monochrome task
- negative() — Set this Filelink's transform_url to include the negative task
- oilPaint() — Set this Filelink's transform_url to include the oil_paint task
- overwrite() — Overwrite this filelink in cloud storage
- partialBlur() — Set this Filelink's transform_url to include the partial_blur task
- partialPixelate() — Set this Filelink's transform_url to include the partial_pixelate task
- pixelate() — Set this Filelink's transform_url to include the pixelate task
- polaroid() — Set this Filelink's transform_url to include the polaroid task
- quality() — Set this Filelink's transform_url to include the quality task
- redEye() — Set this Filelink's transform_url to include the redeye task
- resetTransform() — Reset the transformation url of this Filelink. Call this function if you are calling multiple transformations on the same filelink without using the transform method.
- resize() — Set this Filelink's transform_url to include the resize task
- rotate() — Set this Filelink's transform_url to include the rotate task
- roundedCorners() — Set this Filelink's transform_url to include the rounded_corners task
- save() — Save this transformed filelink in cloud storage
- sepia() — Set this Filelink's transform_url to include the sepia task
- setTransformUrl() — Append or Create a task to the transformation url for this filelink
- shadow() — Set this Filelink's transform_url to include the shadow task
- signedUrl() — return the URL (cdn) of this filelink with security policy
- tornEdges() — Set this Filelink's transform_url to include the torn_edges task
- transform() — Applied array of transformation tasks to this file link.
- upscale() — Set this Filelink's transform_url to include the upscale task
- url() — return the URL (cdn) of this filelink
- vignette() — Set this Filelink's transform_url to include the vignette task
- watermark() — Set this Filelink's transform_url to include the watermark task
- zip() — Set this Filelink's transform_url to include the zip task
Inherited from Filestack\Mixins\CommonMixin
protected
- addRequestSourceHeader() — Append source header to request headers array
- appendData() — Append a data item
- appendPromise()
- getCustomUrl() — If CNAME is set, return custom CNAME URL, else, noop.
- getSourceHeaders() — Get source header
- handleResponseCreateFilelink() — Handle a Filestack response and create a filelink object
- handleResponseDecodeJson() — Handles a response. decode and return json if 200, throws exception otherwise.
- sendDownload() — Download a file to specified destination given a url
- sendGetContent() — Get the content of a file.
- sendGetMetaData() — Get the metadata of a remote file. Will only retrieve specific fields if optional fields are passed in
- sendGetSafeForWork() — Get the safe for work (sfw) flag of a filelink.
- sendGetTags() — Get the tags of a filelink.
- sendRequest() — Send request
- settlePromises()
public
- addDownloadFlagToUrl() — Append the download flag to a url that may or may not have existing query string flags
- get_retry_miliseconds() — Get the miliseconds of exponential backoff retry strategy
- isUrl() — Check if a string is a valid url.
- sendDelete() — Delete a file from cloud storage
- sendOverwrite() — Overwrite a file in cloud storage
Inherited from Filestack\Mixins\TransformationMixin
protected
- createTransformStr() — Create the transform parts of the transformation url
- createTransformUrl() — Create the transform parts of the transformation url
- insertTransformStr() — Insert a transformation task into existing url
public
- getConvertTaskInfo() — Get the info of a conversion task given the conversion url
- getTransformStr() — Return the URL portion of a transformation task
- sendDebug() — Send debug call
- sendTransform() — Applied array of transformation tasks to handle or external url
- sendVideoConvert() — Send video_convert request to API
History
-
2019-06-07T17:01:05+00:00 (commit #ba60795)
Author: Colin Sheaff (colin-sheaff@northwestern.edu) / Commiter: Colin Sheaff (colin-sheaff@northwestern.edu)
Improved custom CNAME implementation and coverage.
-
2019-06-03T17:52:39+00:00 (commit #67e2815)
Author: Colin Sheaff (colin-sheaff@northwestern.edu) / Commiter: Colin Sheaff (colin-sheaff@northwestern.edu)
Remove CNAME validation. Domain name validation using built-in PHP `filter_var($domain, FILTER_VALIDATE_DOMAIN, FILTER_FLAG_HOSTNAME)` is not compatible with PHP 5.x. As the Javascript API Client library doesn't do any validation, it's assumed that library users do not need this feature.
-
2019-05-31T22:14:51+00:00 (commit #4058b58)
Author: Colin Sheaff (colin-sheaff@northwestern.edu) / Commiter: Colin Sheaff (colin-sheaff@northwestern.edu)
fix #40 : Add support for custom CNAME This patch primarily addresses the lack of custom CNAME support for urls that might get used in HTML templates populated by a server, so that client browsers will request resources via the custom CNAME. This patch DOES NOT try convert all server-side requests to use the
-
2017-08-16T17:41:07+00:00 (commit #4e28363)
Author: Huey Ly (huey@webmail.us) / Commiter: Huey Ly (huey@webmail.us)
added phpdox for documentation generation generated docs using phpdox
-
2017-08-16T16:39:59+00:00 (commit #674be05)
Author: Huey Ly (huey@webmail.us) / Commiter: Huey Ly (huey@webmail.us)
added phpdox for documentation generation
-
2017-06-09T19:54:00+00:00 (commit #3056432)
Author: Huey Ly (huey@webmail.us) / Commiter: Huey Ly (huey@webmail.us)
added getTags() and getSafeForWork functions to client and flielink objects
-
2017-05-26T15:52:48+00:00 (commit #1273bba)
Author: Huey Ly (huey@webmail.us) / Commiter: Huey Ly (huey@webmail.us)
added getConvertTaskInfo function to client and filelink objects
-
2017-05-25T21:37:44+00:00 (commit #9b61464)
Author: Huey Ly (huey@webmail.us) / Commiter: Huey Ly (huey@webmail.us)
consolidated sendRequest functions, send X-Filestack-Source header
-
2017-05-22T22:55:04+00:00 (commit #915421e)
Author: Huey Ly (huey@webmail.us) / Commiter: Huey Ly (huey@webmail.us)
implemented multiparts upload
-
2017-05-18T21:54:39+00:00 (commit #74f4ec3)
Author: Huey Ly (huey@webmail.us) / Commiter: Huey Ly (huey@webmail.us)
switched to use phpmd for codeclimate
-
2017-05-18T21:25:18+00:00 (commit #39bb65b)
Author: Huey Ly (huey@webmail.us) / Commiter: Huey Ly (huey@webmail.us)
setup codeclimate
-
2017-05-15T21:12:54+00:00 (commit #2fea6a0)
Author: Huey Ly (huey@webmail.us) / Commiter: Huey Ly (huey@webmail.us)
added convertAudio() and convertVideo() to client and filelink objects
-
2017-05-15T18:56:10+00:00 (commit #4be442d)
Author: Huey Ly (huey@webmail.us) / Commiter: Huey Ly (huey@webmail.us)
added convertFile() functionality to client and filelink
-
2017-05-12T00:42:34+00:00 (commit #373ee05)
Author: Huey Ly (huey@webmail.us) / Commiter: Huey Ly (huey@webmail.us)
added debug() call for transformations
-
2017-05-11T21:27:19+00:00 (commit #ca5159d)
Author: Huey Ly (huey@webmail.us) / Commiter: Huey Ly (huey@webmail.us)
added collage() function to client and filelink. Modified transform calls to return filelink object instead of content. changed store() to save() on filelink calls.
-
2017-05-10T21:17:45+00:00 (commit #515bb43)
Author: Huey Ly (huey@webmail.us) / Commiter: Huey Ly (huey@webmail.us)
got rid of PROCESSING_URL and updated all occurrences to use CDN_URL
-
2017-05-10T20:24:40+00:00 (commit #5c8f779)
Author: Huey Ly (huey@webmail.us) / Commiter: Huey Ly (huey@webmail.us)
added zip and compress functionalities
-
2017-05-10T18:52:15+00:00 (commit #367f859)
Author: Huey Ly (huey@webmail.us) / Commiter: Huey Ly (huey@webmail.us)
added tests for transformation functions
-
2017-05-09T23:11:20+00:00 (commit #73a63c6)
Author: Huey Ly (huey@webmail.us) / Commiter: Huey Ly (huey@webmail.us)
separated out transformation tasks into individual functions instead of catchall
-
2017-05-09T17:26:32+00:00 (commit #9f3fdba)
Author: Huey Ly (huey@webmail.us) / Commiter: Huey Ly (huey@webmail.us)
removed all traces of is_transformation flag
-
2017-05-08T22:30:51+00:00 (commit #a96f32d)
Author: Huey Ly (huey@webmail.us) / Commiter: Huey Ly (huey@webmail.us)
added Transformations chaining and catchal to Filelink obj added transform func to client for external urls
-
2017-05-05T17:39:21+00:00 (commit #942180a)
Author: Huey Ly (huey@webmail.us) / Commiter: Huey Ly (huey@webmail.us)
moved security to constructor and removed as parameters for client and filelink
-
2017-05-05T14:08:10+00:00 (commit #4b837ac)
Author: Huey Ly (huey@webmail.us) / Commiter: Huey Ly (huey@webmail.us)
preliminary design of mixin
-
2017-05-04T20:33:57+00:00 (commit #2b25400)
Author: Huey Ly (huey@webmail.us) / Commiter: Huey Ly (huey@webmail.us)
installed and ran php-cs-fixer. updated examples, added real tests but marked as skipped
-
2017-05-04T18:20:21+00:00 (commit #fb1b6fd)
Author: Huey Ly (huey@webmail.us) / Commiter: Huey Ly (huey@webmail.us)
added overwrite method to client and filelink
-
2017-05-04T17:16:49+00:00 (commit #809b3d4)
Author: Huey Ly (huey@webmail.us) / Commiter: Huey Ly (huey@webmail.us)
added delete function to filelink and client
-
2017-05-04T16:22:33+00:00 (commit #e5e1cad)
Author: Huey Ly (huey@webmail.us) / Commiter: Huey Ly (huey@webmail.us)
added security class
-
2017-05-03T21:20:04+00:00 (commit #1337a7f)
Author: Huey Ly (huey@webmail.us) / Commiter: Huey Ly (huey@webmail.us)
added download, getContent, and getMetaData to client and filelink objects
-
2017-05-02T22:26:18+00:00 (commit #00533b7)
Author: Huey Ly (huey@webmail.us) / Commiter: Huey Ly (huey@webmail.us)
added User-Agent header to http request
-
2017-05-02T21:50:52+00:00 (commit #bf2ef12)
Author: Huey Ly (huey@webmail.us) / Commiter: Huey Ly (huey@webmail.us)
added options to store function. added store functio to Filelink
-
2017-05-02T17:11:33+00:00 (commit #5b565df)
Author: Huey Ly (huey@webmail.us) / Commiter: Huey Ly (huey@webmail.us)
added empty line at end of files. removed test method in filepickerclient
-
2017-05-01T22:13:47+00:00 (commit #61c4278)
Author: Huey Ly (huey@webmail.us) / Commiter: Huey Ly (huey@webmail.us)
removed ds_store, updated example, updated test with mocks
-
2017-05-01T01:21:36+00:00 (commit #8a961cd)
Author: Huey Ly (huey@webmail.us) / Commiter: Huey Ly (huey@webmail.us)
setting up project file structure