riainvoice/application/helpers/echo_helper.php
gandhimathi Bharathirajan c940cb1a2c all files
2017-09-11 14:38:03 +05:30

54 lines
986 B
PHP

<?php
if (!defined('BASEPATH')) exit('No direct script access allowed');
/*
* InvoicePlane
*
* @author InvoicePlane Developers & Contributors
* @copyright Copyright (c) 2012 - 2017 InvoicePlane.com
* @license https://invoiceplane.com/license.txt
* @link https://invoiceplane.com
*/
/**
* Shorthand for htmlspecialchars()
* @param $output
* @return string
*/
function htmlsc($output)
{
return htmlspecialchars($output, ENT_QUOTES);
}
/**
* Echo something with escaped HTML special chars
*
* @param mixed $output
*/
function _htmlsc($output)
{
echo htmlspecialchars($output, ENT_QUOTES);
}
/**
* Echo something with escaped HTML entities
*
* @param mixed $output
*/
function _htmle($output)
{
echo htmlentities($output);
}
/**
* Echo a language string with the trans helper
*
* @param string $line
* @param string $id
* @param null|string $default
*/
function _trans($line, $id = '', $default = null)
{
echo trans($line, $id, $default);
}