src/PBMessage.php
protected function setValue($index, $value)
    {
        if (gettype($value) === 'object') {
            $this->values[$index] = $value;
        } else {
            $class_name = $this->fields[$index];
            $real_class_name = __NAMESPACE__ . "\\" . $class_name;
            $this->values[$index] = new $real_class_name();
            $this->values[$index]->value = $value;
        }
        return $this;
    }
protected function setValue($index, $value)
    {
        if (gettype($value) === 'object') {
            $this->values[$index] = $value;
        } else {
            $class_name = $this->fields[$index];
            $real_class_name = __NAMESPACE__ . "\\" . $class_name;
            $this->values[$index] = new $real_class_name();
            $this->values[$index]->value = $value;
        }
        return $this;
    }
protected function setValue ( $ index , $ value ) { if ( gettype ( $ value ) === 'object' ) { $ this -> values [ $ index ] = $ value ; } else { $ class_name = $ this -> fields [ $ index ] ; $ real_class_name = __NAMESPACE__ . "\\" . $ class_name ; $ this -> values [ $ index ] = new $ real_class_name ( ) ; $ this -> values [ $ index ] -> value = $ value ; } return $ this ; }
Set an value
@param int - index of the field
@param Mixed $value
@return mixed
Set an value