Filestack\Mixins\CommonMixin
Mixin for common functionalities used by most Filestack objects
Synopsis
- // members
- protected $http_client;
- protected $http_promises;
- protected $user_agent_header;
- protected $source_header;
- public $cname;
- // methods
- 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()
Hierarchy
Coverage
Methods | 0% | 0 / 19 |
Lines | 0% | / |
Members
protected
- $http_client
- $http_promises
- $source_header
- $user_agent_header
public
- $cname
Methods
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
History
-
2019-06-13T19:33:41+00:00 (commit #8d9b375)
Author: Colin Sheaff (colin-sheaff@northwestern.edu) / Commiter: Colin Sheaff (colin-sheaff@northwestern.edu)
Refactor custom CNAME URL function to improve testing coverage.
-
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-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
-
2018-08-17T00:53:22+00:00 (commit #3a7b1db)
Author: Max Schwanekamp (max@celearningsystems.com) / Commiter: Max Schwanekamp (max@celearningsystems.com)
Use the new method
-
2018-08-14T21:43:05+00:00 (commit #277d7be)
Author: Max Schwanekamp (max@celearningsystems.com) / Commiter: Max Schwanekamp (max@celearningsystems.com)
fix #35 : Add CommonMixin::addDownloadFlagToUrl() method to correctly add the download param when getting file for download
-
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:52:51+00:00 (commit #7cc1475)
Author: Huey Ly (huey@webmail.us) / Commiter: Huey Ly (huey@webmail.us)
fixed small file upload no partNum
-
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-31T16:03:10+00:00 (commit #c2c9d52)
Author: Huey Ly (huey@webmail.us) / Commiter: Huey Ly (huey@webmail.us)
updated filestack source headers
-
2017-05-31T15:09:40+00:00 (commit #6dc7368)
Author: Huey Ly (huey@webmail.us) / Commiter: Huey Ly (huey@webmail.us)
updated source header to Filestack-Source
-
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-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-09T17:18:45+00:00 (commit #5c9df3d)
Author: Huey Ly (huey@webmail.us) / Commiter: Huey Ly (huey@webmail.us)
added coverage settings to phpunit. add tests to reach 100% coverage
-
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-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