本文整理汇总了PHP中sfImage::voota方法的典型用法代码示例。如果您正苦于以下问题:PHP sfImage::voota方法的具体用法?PHP sfImage::voota怎么用?PHP sfImage::voota使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类sfImage
的用法示例。
在下文中一共展示了sfImage::voota方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: createFromFile
public function createFromFile($type, $file)
{
$directory = dirname($file);
$arr = array_reverse(explode("/", $file));
$fileName = $arr[0];
$uri = "{$type}/{$fileName}";
if (S3::putObject(S3::inputFile("{$file}"), S3Voota::getBucketOri(), "{$type}/{$fileName}", S3::ACL_PRIVATE)) {
$img = new sfImage($file);
$img->voota();
$this->putObjectCached(S3::inputFile("/tmp/cc_{$fileName}"), S3Voota::getBucketPub(), "{$type}/cc_{$fileName}", S3::ACL_PUBLIC_READ);
unlink("/tmp/cc_{$fileName}");
$this->putObjectCached(S3::inputFile("/tmp/bw_{$fileName}"), S3Voota::getBucketPub(), "{$type}/bw_{$fileName}", S3::ACL_PUBLIC_READ);
unlink("/tmp/bw_{$fileName}");
$this->putObjectCached(S3::inputFile("/tmp/cc_s_{$fileName}"), S3Voota::getBucketPub(), "{$type}/cc_s_{$fileName}", S3::ACL_PUBLIC_READ);
unlink("/tmp/cc_s_{$fileName}");
$this->putObjectCached(S3::inputFile("/tmp/bw_s_{$fileName}"), S3Voota::getBucketPub(), "{$type}/bw_s_{$fileName}", S3::ACL_PUBLIC_READ);
unlink("/tmp/bw_s_{$fileName}");
}
}