filestack/mixins/TransformationMixin.php
public function sendTransform($resource, $transform_tasks, $security = null)
    {
        // add store method if one does not exists
        if (!array_key_exists('store', $transform_tasks)) {
            $transform_tasks['store'] = [];
        }

        $tasks_str = $this->createTransformStr($transform_tasks);
        $transform_url = $this->createTransformUrl(
            $this->api_key,
            'image',
            $resource,
            $tasks_str,
            $security
        );

        // call CommonMixin function
        $response = $this->sendRequest('GET', $transform_url);
        $filelink = $this->handleResponseCreateFilelink($response);

        return $filelink;
    }
public function sendTransform($resource, $transform_tasks, $security = null)
    {
        // add store method if one does not exists
        if (!array_key_exists('store', $transform_tasks)) {
            $transform_tasks['store'] = [];
        }

        $tasks_str = $this->createTransformStr($transform_tasks);
        $transform_url = $this->createTransformUrl(
            $this->api_key,
            'image',
            $resource,
            $tasks_str,
            $security
        );

        // call CommonMixin function
        $response = $this->sendRequest('GET', $transform_url);
        $filelink = $this->handleResponseCreateFilelink($response);

        return $filelink;
    }
public function sendTransform ( $ resource , $ transform_tasks , $ security = null ) { // add store method if one does not exists if ( ! array_key_exists ( 'store' , $ transform_tasks ) ) { $ transform_tasks [ 'store' ] = [ ] ; } $ tasks_str = $ this -> createTransformStr ( $ transform_tasks ) ; $ transform_url = $ this -> createTransformUrl ( $ this -> api_key , 'image' , $ resource , $ tasks_str , $ security ) ; // call CommonMixin function $ response = $ this -> sendRequest ( 'GET' , $ transform_url ) ; $ filelink = $ this -> handleResponseCreateFilelink ( $ response ) ; return $ filelink ; }
Applied array of transformation tasks to handle or external url

@param string            $resource           url or filestack handle
@param array             $transform_tasks    array of transformation tasks
@param FilestackSecurity $security           Filestack Security object if
enabled

@throws FilestackException   if API call fails, e.g 404 file not found

@return Filestack\Filelink
Applied array of transformation tasks to handle or external url