pdftk update metadata using php

I am using pdftk with php. I want to update new generated pdf title and author.I went through the documentation of pdftk it says, we can update metadata through command using update_info and can get metadata using getData() function. I used git library https://github.com/mikehaertl/php-pdftk

I can update metadata using exiftool command but I want to update through code not command.

Is there any we can change metadata of pdf using pdf object. I tried

$pdf->properties['Title'] = 'Test Title';
$pdf->properties['Author'] = 'Test Author';

and many ways but did not helped. Any help would be appreciated. Thanks.