Print Command Shortcuts
Developers will tend to use the following PHP
Print methods fairly often
in the template include files:
- print($strSomeString)
- print(htmlentities($strSomeString))
- print(QApplication::Translate($strSomeString))
- print(QApplication::LocalizeInteger($intSomething)) (not yet implemented)
- print(QApplication::LocalizeFloat($fltSomething)) (not yet implemented)
- print(QApplication::LocalizeCurrency($fltSomething)) (not yet implemented)
Because of this, QCubed has defined several global PHP functions which act as shortcuts
to these specific commands:
- _p($strSomeString, $blnHtmlEntities = true) - will print the passed in string. By default, it will also perform QApplication::HtmlEntities first. You can override this by setting $blnHtmlEntities = false.
- _t($strSomeString) -- will print a translated string via QApplication::Translate
- _i($intSomething)
- _f($fltSomething)
- _c($fltSomething)
Please note: these are simply meant to be shortcuts to actual QCubed functional
calls to make your templates a little easier to read. By no means do you have to
use them. Your templates can just as easily make the fully-named method/function calls.
Examples:
Hello, world