Cloudinary\Api::delete_resources_by_prefix PHP Method

delete_resources_by_prefix() public method

public delete_resources_by_prefix ( $prefix, $options = [] )
    function delete_resources_by_prefix($prefix, $options = array())
    {
        $resource_type = \Cloudinary::option_get($options, "resource_type", "image");
        $type = \Cloudinary::option_get($options, "type", "upload");
        $uri = array("resources", $resource_type, $type);
        return $this->call_api("delete", $uri, array_merge(array("prefix" => $prefix), $this->only($options, array("keep_original", "next_cursor", "invalidate"))), $options);
    }

Usage Example

Example #1
0
 function test09a_delete_resources_by_prefix()
 {
     // should allow deleting resources
     Curl::mockApi($this);
     $this->api->delete_resources_by_prefix("fooba");
     assertUrl($this, "/resources/image/upload");
     assertDelete($this);
     assertParam($this, "prefix", "fooba");
 }
All Usage Examples Of Cloudinary\Api::delete_resources_by_prefix