public function setDimension($width, $height = null) { if (!$height) { $height = $width; } $this->width = $width; $this->height = $height; return $this; }