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(t($strSomeString))
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 QString::htmlEntities() first. You can override this by setting $blnHtmlEntities = false.
- _t($strSomeString) -- will print a translated string via t()
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