变量命名应该是下划线还是驼峰呢?
class ImageUploadHandler
{
protected $allowed_ext = ["png", "jpg", "gif", 'jpeg'];
public function save($file, $folder, $file_prefix, $max_width = false)
{
// ......
}
}
这里的$allowd_ext
应该用$allowdExt
吗?还有save
方法里的各种变量名称?
推荐文章: