Hello,
There's no option to change it dynamically. We recommend you to add a custom INI for each environment. As an alternative approach, you can change PhpdocxUtilities.php, setting the static var as public:
public static $_phpdocxConfig;
So you can change it after CreateDocx using a new INI file:
$docx = new CreateDocx();
PhpdocxUtilities::$_phpdocxConfig = parse_ini_file('/customconfig/phpdocxconfig.ini', true);
$text = 'Lorem ipsum dolor sit amet.';
$paragraphOptions = array(
'bold' => true,
'font' => 'Arial'
);
$docx->addText($text, $paragraphOptions);
Or change the array attributes:
PhpdocxUtilities::$_phpdocxConfig['settings']['temp_path'] = 'new value';
We move the request to the dev team to add support to change all options dynamically in the next release of phpdocx.
Regards.