本文整理汇总了PHP中Uploader::build_eager方法的典型用法代码示例。如果您正苦于以下问题:PHP Uploader::build_eager方法的具体用法?PHP Uploader::build_eager怎么用?PHP Uploader::build_eager使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类Uploader
的用法示例。
在下文中一共展示了Uploader::build_eager方法的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: build_upload_params
public static function build_upload_params(&$options)
{
$params = array("timestamp" => time(), "allowed_formats" => \Cloudinary::encode_array(\Cloudinary::option_get($options, "allowed_formats")), "auto_tagging" => \Cloudinary::option_get($options, "auto_tagging"), "background_removal" => \Cloudinary::option_get($options, "background_removal"), "backup" => \Cloudinary::option_get($options, "backup"), "callback" => \Cloudinary::option_get($options, "callback"), "categorization" => \Cloudinary::option_get($options, "categorization"), "colors" => \Cloudinary::option_get($options, "colors"), "context" => \Cloudinary::encode_assoc_array(\Cloudinary::option_get($options, "context")), "custom_coordinates" => \Cloudinary::encode_double_array(\Cloudinary::option_get($options, "custom_coordinates")), "detection" => \Cloudinary::option_get($options, "detection"), "discard_original_filename" => \Cloudinary::option_get($options, "discard_original_filename"), "eager" => Uploader::build_eager(\Cloudinary::option_get($options, "eager")), "eager_async" => \Cloudinary::option_get($options, "eager_async"), "eager_notification_url" => \Cloudinary::option_get($options, "eager_notification_url"), "exif" => \Cloudinary::option_get($options, "exif"), "face_coordinates" => \Cloudinary::encode_double_array(\Cloudinary::option_get($options, "face_coordinates")), "faces" => \Cloudinary::option_get($options, "faces"), "folder" => \Cloudinary::option_get($options, "folder"), "format" => \Cloudinary::option_get($options, "format"), "headers" => Uploader::build_custom_headers(\Cloudinary::option_get($options, "headers")), "image_metadata" => \Cloudinary::option_get($options, "image_metadata"), "invalidate" => \Cloudinary::option_get($options, "invalidate"), "moderation" => \Cloudinary::option_get($options, "moderation"), "notification_url" => \Cloudinary::option_get($options, "notification_url"), "ocr" => \Cloudinary::option_get($options, "ocr"), "overwrite" => \Cloudinary::option_get($options, "overwrite"), "phash" => \Cloudinary::option_get($options, "phash"), "proxy" => \Cloudinary::option_get($options, "proxy"), "public_id" => \Cloudinary::option_get($options, "public_id"), "raw_convert" => \Cloudinary::option_get($options, "raw_convert"), "return_delete_token" => \Cloudinary::option_get($options, "return_delete_token"), "similarity_search" => \Cloudinary::option_get($options, "similarity_search"), "tags" => implode(",", \Cloudinary::build_array(\Cloudinary::option_get($options, "tags"))), "transformation" => \Cloudinary::generate_transformation_string($options), "type" => \Cloudinary::option_get($options, "type"), "unique_filename" => \Cloudinary::option_get($options, "unique_filename"), "upload_preset" => \Cloudinary::option_get($options, "upload_preset"), "use_filename" => \Cloudinary::option_get($options, "use_filename"), "responsive_breakpoints" => Uploader::build_responsive_breakpoints(\Cloudinary::option_get($options, "responsive_breakpoints")));
array_walk($params, function (&$value, $key) {
$value = is_bool($value) ? $value ? "1" : "0" : $value;
});
return array_filter($params, function ($v) {
return !is_null($v) && $v !== "";
});
}
示例2: explicit
public static function explicit($public_id, $options = array())
{
$params = array("timestamp" => time(), "public_id" => $public_id, "type" => \Cloudinary::option_get($options, "type"), "callback" => \Cloudinary::option_get($options, "callback"), "eager" => Uploader::build_eager(\Cloudinary::option_get($options, "eager")), "headers" => Uploader::build_custom_headers(\Cloudinary::option_get($options, "headers")), "tags" => \Cloudinary::encode_array(\Cloudinary::option_get($options, "tags")), "face_coordinates" => \Cloudinary::encode_double_array(\Cloudinary::option_get($options, "face_coordinates")), "custom_coordinates" => \Cloudinary::encode_double_array(\Cloudinary::option_get($options, "custom_coordinates")));
return Uploader::call_api("explicit", $params, $options);
}