本文整理匯總了PHP中Listing::ResizePhotoListingSmall方法的典型用法代碼示例。如果您正苦於以下問題:PHP Listing::ResizePhotoListingSmall方法的具體用法?PHP Listing::ResizePhotoListingSmall怎麽用?PHP Listing::ResizePhotoListingSmall使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在類Listing
的用法示例。
在下文中一共展示了Listing::ResizePhotoListingSmall方法的2個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的PHP代碼示例。
示例1: resizeNewsize
/**
* @Todo: resize lại photo listing if have new size
*/
public function resizeNewsize($id, $size)
{
$mFile = ProListingPhotos::model()->findByPk($id);
if ($mFile) {
$image_find = Yii::getPathOfAlias('webroot') . "/" . ProListingPhotos::$folderUpload . "/" . $mFile->listing_id . "/" . $size . "/" . $mFile->image;
if (!file_exists($image_find)) {
$sourceImage = Yii::getPathOfAlias('webroot') . "/" . ProListingPhotos::$folderUpload . "/" . $mFile->listing_id . "/" . $mFile->image;
if (file_exists($sourceImage)) {
Listing::ResizePhotoListing($mFile);
Listing::PutWarterMarkPhotoListing($mFile);
Listing::ResizePhotoListingSmall($mFile);
}
}
}
}
示例2: FixWatermarkPhotoSmallSize
/**
* @Author: ANH DUNG Jan 20, 2015
* @Todo: fix resize some photo small not have watermark
* @Param: $model
* run and done at 11h19 Jan 20, 2015
*/
public static function FixWatermarkPhotoSmallSize()
{
return;
$models = self::model()->findAll();
foreach ($models as $mFile) {
Listing::PutWarterMarkPhotoListing($mFile);
Listing::ResizePhotoListingSmall($mFile);
}
// $mFile = self::model()->findByPk(3);
// Listing::ResizePhotoListingSmall($mFile);
echo count($models);
die;
}