Docs
Built In Functions
Show
Used to prepare data for use on the client side
$Show->MonetaryNumber( $Amount, $Convert = true, $Cents = true )
Accepts: String
This method takes a string and converts it to appear as a monetary value. You have the option to "convert" monetary numbers saved in the database to show the correct number of cents. Setting the cents parameter to false will remove the cents entirely.
Example
$Show->MonetaryNumber('1000'); // 10.00
$Show->MonetaryNumber('1250'); // 12.50
$Show->MonetaryNumber('125000', false); // 125,000.00
$Show->MonetaryNumber('1250', false, false); // 1,250
$Show->PhoneNumber( $PhoneNumber, $URL = false );
Accepts: String
This will process a string of numbers into a nicely formatted phone number that plays well with <a href='tel:'>. By default, the phone number will be formatted for a human to read it. You can set the parameter $URL to true to remove the spaces. Anything under 10 characters and anything over 13 characters will return a null
value.
$Show->PhoneNumber("1234567890"); // 123-456-7890
$Show->PhoneNumber("11234567890"); // +1 123-456-7890
$Show->PhoneNumber("121234567890"); // +12 123-456-7890
$Show->PhoneNumber("1231234567890"); // +123 123-456-7890
$Show->Secure($ValueToDecrypt);
Accepts: String
This will decrypt any message that has been saved with the $Create->Secure() method.
$Show->Secure("wLutBXhXdGntGeI="); // Hello World
$Show->Secure("3LaoGjceUCb+VfVz+TrA+n+Ju3cq0UgG1058Z85a"); // This is a secure transmission!
$Show->Image($ImageName);
Accepts: String
This is useful for getting around images that may have been cached on your server. Typically when a user uploads a graphic with the same name, the original stays on their browser until it is cleared. Using this method, it will retrieve the timestamp of when the image was last edited, always showing you the most up-to-date version.
This defaults to the /images/ folder
$Show->Image("celestial-homepage-graphic.png");
// '/images/celestial-homepage-graphic.png?v=1591324105'