Добавлен метод imageMinCheckSize

This commit is contained in:
Alexander Demidov
2013-06-26 12:44:10 +04:00
parent f564411480
commit c36c64359a

View File

@ -41,4 +41,20 @@ abstract class UploadHelper
}
return false;
}
/**
* @param $size
* @param $file_path
* @return bool
*/
public static function imageCheckMinSize($size, $file_path)
{
$imagesize = getimagesize($file_path);
$size_parts = explode('x', $size);
if ($imagesize[0] >= $size_parts[0] && $imagesize[1] >= $size_parts[1]) {
return true;
} else {
return false;
}
}
}