mpdf.github.io icon indicating copy to clipboard operation
mpdf.github.io copied to clipboard

name convention for mpdf-variables

Open Klap-in opened this issue 8 years ago • 0 comments

mpdf variables are handled since the mpdf 7.0 version as values with are defined in the $config array.

See /configuration/configuration-v7-x.html /reference/mpdf-variables/overview.html /reference/mpdf-functions/construct.html

The naming of the mpdf-variables is not consistent. What would be a preferred manner?

Now in use are:

  • the variable string <a href="{{ "/reference/mpdf-variables/aliasnbpggp.html" | prepend: site.baseurl }}">aliasNbPgGp</a>
    -> [aliasNbPgGp]
  • the variable <span class="parameter">$aliasNbPgGp</span>
    -> [$aliasNbPgGp]
  • The <a href="{{ "/configuration/configuration-v7-x.html" | prepend: site.baseurl }}">configuration variable</a> ``useActiveForms`` should be set ...
    -> [configuration variable] useActiveForms

Some thoughts:

  • I now prefer the first option. But from that layout it is not direct visible that it is a link to /reference/mpdf-variable/...
  • adding $ before all variables looks not logic, because some variable may only be used as configuration parameter in the $config array of the constructor.
  • $variablename is also bit different than the actual syntax, $mpdf->variablename.

Klap-in avatar Jul 20 '17 21:07 Klap-in