コード例 #1
0
/**
 * smarty_function_dbexectime
 */
function smarty_function_dbexectime($params, $smarty)
{
    if (DEBUG == 1) {
        echo Koch_Doctrine2::getExecTime();
    } else {
        echo 'Disabled';
    }
}
コード例 #2
0
/**
 * smarty_function_dbexectime
 */
function smarty_function_dbcounter($params, $smarty)
{
    if (DEBUG == 1) {
        /**
         * The call to this viehelper "dbcounter" is performed inside the view.
         * So the Query for closing the session is missing, because it's
         * performed on shutdown of the application.
         * We simply add one Query..
         */
        echo Koch_Doctrine2::getNumberOfQueries() + 1;
    } else {
        echo 'Disabled';
    }
}