src/Object/NostoOAuthToken.php
public static function create(array $data)
    {
        $token = new self();
        foreach ($data as $key => $value) {
            $key = self::underscore2CamelCase($key);
            if (property_exists($token, $key)) {
                $token->{$key} = $value;
            }
        }
        return $token;
    }
public static function create(array $data)
    {
        $token = new self();
        foreach ($data as $key => $value) {
            $key = self::underscore2CamelCase($key);
            if (property_exists($token, $key)) {
                $token->{$key} = $value;
            }
        }
        return $token;
    }
public static function create ( array $ data ) { $ token = new self ( ) ; foreach ( $ data as $ key => $ value ) { $ key = self :: underscore2CamelCase ( $ key ) ; if ( property_exists ( $ token , $ key ) ) { $ token -> { $ key } = $ value ; } } return $ token ; }
Creates a new token instance and populates it with the given data.

@param array $data the data to put in the token.
@return NostoOAuthToken
Creates a new token instance and populates it with the given data .