src/User/User.php
public function setPreference($key, $value)
    {
        if (isset(static::$preferences[$key])) {
            $preferences = $this->preferences;

            if (! is_null($transformer = static::$preferences[$key]['transformer'])) {
                $preferences[$key] = call_user_func($transformer, $value);
            } else {
                $preferences[$key] = $value;
            }

            $this->preferences = $preferences;
        }

        return $this;
    }
public function setPreference($key, $value)
    {
        if (isset(static::$preferences[$key])) {
            $preferences = $this->preferences;

            if (! is_null($transformer = static::$preferences[$key]['transformer'])) {
                $preferences[$key] = call_user_func($transformer, $value);
            } else {
                $preferences[$key] = $value;
            }

            $this->preferences = $preferences;
        }

        return $this;
    }
public function setPreference ( $ key , $ value ) { if ( isset ( static :: $ preferences [ $ key ] ) ) { $ preferences = $ this -> preferences ; if ( ! is_null ( $ transformer = static :: $ preferences [ $ key ] [ 'transformer' ] ) ) { $ preferences [ $ key ] = call_user_func ( $ transformer , $ value ) ; } else { $ preferences [ $ key ] = $ value ; } $ this -> preferences = $ preferences ; } return $ this ; }
Set the value of a preference for this user.

@param string $key
@param mixed $value
@return $this
Set the value of a preference for this user .