src/vCard.php
public function set($key, $value)
    {
        // Check if the specified property is defined.
        if (property_exists($this, $key) && $key != 'data') {
            $this->{$key} = trim($value);

            return $this;
        } elseif (property_exists($this, $key) && $key == 'data') {
            foreach ($value as $v_key => $v_value) {
                $this->{$key}[$v_key] = trim($v_value);
            }

            return $this;
        } else {
            return false;
        }
    }
public function set($key, $value)
    {
        // Check if the specified property is defined.
        if (property_exists($this, $key) && $key != 'data') {
            $this->{$key} = trim($value);

            return $this;
        } elseif (property_exists($this, $key) && $key == 'data') {
            foreach ($value as $v_key => $v_value) {
                $this->{$key}[$v_key] = trim($v_value);
            }

            return $this;
        } else {
            return false;
        }
    }
public function set ( $ key , $ value ) { // Check if the specified property is defined. if ( property_exists ( $ this , $ key ) && $ key != 'data' ) { $ this -> { $ key } = trim ( $ value ) ; return $ this ; } elseif ( property_exists ( $ this , $ key ) && $ key == 'data' ) { foreach ( $ value as $ v_key => $ v_value ) { $ this -> { $ key } [ $ v_key ] = trim ( $ v_value ) ; } return $ this ; } else { return false ; } }
Global setter.

@param string $key
Name of the property.
@param mixed  $value
Value to set.

@return vCard
Return itself.
Global setter .