spipu / html2pdf

OFFICIAL PROJECT | HTML to PDF converter written in PHP
http://html2pdf.fr/en/default
Open Software License 3.0
1.68k stars 751 forks source link

idea/suggestion: having an array as input parameter for functions that accept more than 2 arguments is better #804

Open lordspace opened 2 months ago

lordspace commented 2 months ago

Hi, I find it very useful to use an array as an input parameter instead of 5-6 sequentially positioned parameters. that way you can only pass the required parameters and use default values for the rest.

https://github.com/spipu/html2pdf/blob/master/src/Html2Pdf.php#L178