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