public function getWeight($only = false){
        if (isset($this->data['Weight'])){
            if ($only){
                return $this->data['Weight']['Value'];
            } else {
                return $this->data['Weight'];
            }
        } else {
            return false;
        }
    }
public function getWeight($only = false){
        if (isset($this->data['Weight'])){
            if ($only){
                return $this->data['Weight']['Value'];
            } else {
                return $this->data['Weight'];
            }
        } else {
            return false;
        }
    }
public function getWeight ( $ only = false ) { if ( isset ( $ this -> data [ 'Weight' ] ) ) { if ( $ only ) { return $ this -> data [ 'Weight' ] [ 'Value' ] ; } else { return $ this -> data [ 'Weight' ] ; } } else { return false ; } }
Returns the weight.

This method will return <b>FALSE</b> if the weight has not been set yet.
If an array is returned, it will have the fields <b>Value</b> and <b>Unit</b>.
@param boolean $only [optional] <p>set to <b>TRUE</b> to get only the value</p>
@return array|string|boolean array, single value, or <b>FALSE</b> if weight not set yet
Returns the weight .