数组定义用法统一

This commit is contained in:
thinkphp
2013-04-11 14:49:39 +08:00
parent bbe3ebedcf
commit 00ee80e943
35 changed files with 83 additions and 81 deletions

View File

@@ -50,12 +50,12 @@ class Gd{
}
//设置图像信息
$this->info = array(
$this->info = [
'width' => $info[0],
'height' => $info[1],
'type' => image_type_to_extension($info[2], false),
'mime' => $info['mime'],
);
];
//销毁已存在的图像
empty($this->im) || imagedestroy($this->im);
@@ -146,7 +146,7 @@ class Gd{
*/
public function size(){
if(empty($this->im)) throw new Exception('没有指定图像资源');
return array($this->info['width'], $this->info['height']);
return [$this->info['width'], $this->info['height']];
}
/**