Filestack\FilestackClient
Filestack client object. This is the main object to make functional calls to the Filestack API.
Synopsis
- // members
- public $api_key;
- public $security;
- private $upload_processor;
- // methods
- public void __construct()
- public void __call()
- public void getCdnUrl()
- public string getContent()
- public array getMetaData()
- public json getSafeForWork()
- public json getTags()
- public Filestack/Filelink collage()
- public string convertAudio()
- public Filestack/Filelink convertFile()
- public string convertVideo()
- public json debug()
- public bool delete()
- public bool download()
- public Filelink overwrite()
- public Filestack/Filelink screenshot()
- public Filelink transform()
- public Filelink upload()
- public Filelink uploadUrl()
- public Filestack/Filelink zip()
- // 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 / 20 |
Lines | 0% | / |
Members
private
- $upload_processor
protected
- $http_client
- $http_promises
- $source_header
- $user_agent_header
public
- $api_key
- $cname
- $security
Methods
public
- __construct() — FilestackClient constructor
- __call() — Catchall function, throws Filestack Exception if method is not valid
- collage() — Set this Filelink's transform_url to include the collage task
- convertAudio() — Convert url or filelink handle to another audio format. IMPORTANT: To use this function, you must 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 audio file from url or filelink handle to another format. To see which format can be converted, see: https://www.filestack.com/docs/image-transformations/conversion
- convertVideo() — Convert a video file from url or filelink handle to another video format.
- debug() — Debug transform tasks
- delete() — Delete a file from cloud storage
- download() — Download a file, saving it to specified destination
- getCdnUrl() — Get the cdn url of a filestack file
- getContent() — Get the content of file
- getMetaData() — Get metadata of a file
- getSafeForWork() — Get sfw (safe for work) flag of a filelink
- getTags() — Get tags of a filelink
- overwrite() — Overwrite a file in cloud storage
- screenshot() — Take a screenshot of a URL
- transform() — Applied array of transformation tasks to a url
- upload() — Upload a file to desired cloud service, defaults to Filestack's S3 storage.
- uploadUrl() — Upload a url to desired cloud service, defaults to Filestack's S3 storage. Set $options['location'] to specify location, possible values are: S3, gcs, azure, rackspace, dropbox
- zip() — Bundle an array of files into a zip file. This task takes the file or files that are passed in the array and compresses them into a zip file. Sources can be handles, urls, or a mix of both
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-09-08T18:59:02+00:00 (commit #ecf343e)
Author: Huey Ly (huey@webmail.us) / Commiter: Huey Ly (huey@webmail.us)
upload() should return filelink not json
-
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-08-10T21:26:53+00:00 (commit #5c048b4)
Author: Huey Ly (huey@webmail.us) / Commiter: Huey Ly (huey@webmail.us)
updated Intelligent Ingestion as an option
-
2017-08-06T19:50:58+00:00 (commit #a854fee)
Author: Huey Ly (huey@webmail.us) / Commiter: Huey Ly (huey@webmail.us)
error handling strategy for intelligent flow
-
2017-07-28T19:46:31+00:00 (commit #1e77dd6)
Author: Huey Ly (huey@webmail.us) / Commiter: Huey Ly (huey@webmail.us)
added UploadProcessor with intelligent ingestion logic
-
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-24T21:58:41+00:00 (commit #3525898)
Author: Huey Ly (huey@webmail.us) / Commiter: Huey Ly (huey@webmail.us)
use async requests and concurrent calls for multipart uploads
-
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-18T15:02:25+00:00 (commit #1a09902)
Author: Huey Ly (huey@webmail.us) / Commiter: Huey Ly (huey@webmail.us)
updated README with more examples
-
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-10T22:19:18+00:00 (commit #b389934)
Author: Huey Ly (huey@webmail.us) / Commiter: Huey Ly (huey@webmail.us)
added screenshot() function
-
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-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-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-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