PHP Class Cloudinary

显示文件 Open project: cloudinary/cloudinary_php Class Usage Examples

Public Properties

Property Type Description
$DEFAULT_RESPONSIVE_WIDTH_TRANSFORMATION
$JS_CONFIG_PARAMS
$USER_PLATFORM string The format of the value should be /Version[ (comment)].

Public Methods

Method Description
api_sign_request ( $params_to_sign, $api_secret )
build_archive_params ( &$options ) # @private
build_array ( $value )
build_eager ( $transformations )
check_cloudinary_field ( $source, &$options = [] ) Warning: $options are being destructively updated!
cloudinary_api_url ( $action = 'upload', $options = [] )
cloudinary_url ( $source, &$options = [] ) Warning: $options are being destructively updated!
config ( $values = NULL )
config_from_url ( $cloudinary_url )
config_get ( $option, $default = NULL )
download_archive_url ( $options = [] ) # @return [String] archive url
download_zip_url ( $options = [] ) # @see download_archive_url
encode_array ( $array )
encode_assoc_array ( $array )
encode_double_array ( $array )
generate_transformation_string ( &$options = [] ) Warning: $options are being destructively updated!
html_attrs ( $options, $only = NULL )
is_not_null ( $var )
option_consume ( &$options, $option, $default = NULL )
option_get ( $options, $option, $default = NULL )
private_download_url ( $public_id, $format, $options = [] )
random_public_id ( )
reset_config ( )
sign_request ( $params, &$options )
signed_preloaded_image ( $result )
userAgent ( ) : string Provides the USER_AGENT string that is passed to the Cloudinary servers.
zip_download_url ( $tag, $options = [] ) # @deprecated Replaced by {download_zip_url} that uses the more advanced and robust archive generation and download API

Private Methods

Method Description
domain_shard ( $source )
finalize_resource_type ( $resource_type, $type, $url_suffix, $use_root_path, $shorten )
finalize_source ( $source, $format, $url_suffix )
generate_base_transformation ( $base_transformation )
is_assoc ( $array )
norm_range_value ( $value )
process_border ( $border )
process_if ( $if )
process_layer ( $layer, $layer_parameter )
process_video_codec_param ( $param )
smart_escape ( $str ) Based on http://stackoverflow.com/a/1734255/526985
split_range ( $range )
text_style ( $layer, $layer_parameter )
translate_if ( $source )
unsigned_download_url_prefix ( $source, $cloud_name, $private_cdn, $cdn_subdomain, $secure_cdn_subdomain, $cname, $secure, $secure_distribution ) if cdn_domain is true uses a[1-5].cname for http. For https, uses the same naming scheme as 1 for shared distribution and as 2 for private distribution.

Method Details

api_sign_request() public static method

public static api_sign_request ( $params_to_sign, $api_secret )

build_archive_params() public static method

# @private
public static build_archive_params ( &$options )

build_array() public static method

public static build_array ( $value )

build_eager() public static method

public static build_eager ( $transformations )

check_cloudinary_field() public static method

Warning: $options are being destructively updated!
public static check_cloudinary_field ( $source, &$options = [] )

cloudinary_api_url() public static method

public static cloudinary_api_url ( $action = 'upload', $options = [] )

cloudinary_url() public static method

Warning: $options are being destructively updated!
public static cloudinary_url ( $source, &$options = [] )

config() public static method

public static config ( $values = NULL )

config_from_url() public static method

public static config_from_url ( $cloudinary_url )

config_get() public static method

public static config_get ( $option, $default = NULL )

download_archive_url() public static method

# @return [String] archive url
public static download_archive_url ( $options = [] )

download_zip_url() public static method

# @see download_archive_url
public static download_zip_url ( $options = [] )

encode_array() public static method

public static encode_array ( $array )

encode_assoc_array() public static method

public static encode_assoc_array ( $array )

encode_double_array() public static method

public static encode_double_array ( $array )

generate_transformation_string() public static method

Warning: $options are being destructively updated!
public static generate_transformation_string ( &$options = [] )

html_attrs() public static method

public static html_attrs ( $options, $only = NULL )

is_not_null() public static method

public static is_not_null ( $var )

option_consume() public static method

public static option_consume ( &$options, $option, $default = NULL )

option_get() public static method

public static option_get ( $options, $option, $default = NULL )

private_download_url() public static method

public static private_download_url ( $public_id, $format, $options = [] )

random_public_id() public static method

public static random_public_id ( )

reset_config() public static method

public static reset_config ( )

sign_request() public static method

public static sign_request ( $params, &$options )

signed_preloaded_image() public static method

public static signed_preloaded_image ( $result )

userAgent() public static method

Prepends {@link $USER_PLATFORM} if it is defined.
public static userAgent ( ) : string
return string

zip_download_url() public static method

# @deprecated Replaced by {download_zip_url} that uses the more advanced and robust archive generation and download API
public static zip_download_url ( $tag, $options = [] )

Property Details

$DEFAULT_RESPONSIVE_WIDTH_TRANSFORMATION public_oe static_oe property

public static $DEFAULT_RESPONSIVE_WIDTH_TRANSFORMATION

$JS_CONFIG_PARAMS public_oe static_oe property

public static $JS_CONFIG_PARAMS

$USER_PLATFORM public_oe static_oe property

The format of the value should be /Version[ (comment)].
See also: http://www.w3.org/Protocols/rfc2616/rfc2616-sec14.html#sec14.43 Do not set this value in application code!
public static string $USER_PLATFORM
return string