public static function withKey($key) { $instance = new self(); $instance->data->key = $key; $instance->decomputeKey(); //gets id and options return $instance; }