setHeight($height); $this->setWidth($width); } /** * * Sets Height of the Size * @param integer $height */ public function setHeight( $height ){ if( !is_numeric($height) ) throw new CException(Yii::t('EGMap','Height must be a numeric string or a number!')); $this->_height = $height; } /** * * Sets the Width of the Size * @param integer $width */ public function setWidth( $width ){ if( !is_numeric($width) ) throw new CException(Yii::t('EGMap','Width must be a numeric string or a number!')); $this->_width = $width; } /** * * returns array representation of the size */ public function toArray(){ return array('width'=>$this->_width, 'height'=>$this->_height); } /** * @return string Javascript code to return the Size */ public function toJs() { return ' new google.maps.Size('.$this->_width.','.$this->_height.')'; } }