[ Index ]

PHP Cross Reference of vtigercrm-6.1.0

title

Body

[close]

/vtlib/Vtiger/ -> Utils.php (summary)

(no description)

File Size: 306 lines (9 kb)
Included or required: 13 times
Referenced: 0 times
Includes or requires: 2 files
 include/utils/utils.php
 config.inc.php

Defines 1 class

Vtiger_Utils:: (15 methods):
  isNumber()
  implodestr()
  checkFileAccessForInclusion()
  checkFileAccess()
  Log()
  SQLEscape()
  CheckTable()
  CreateTable()
  AlterTable()
  AddColumn()
  ExecuteQuery()
  CreateTableSql()
  IsCreateSql()
  IsDestructiveSql()
  ModuleLog()


Class: Vtiger_Utils  - X-Ref

Provides few utility functions

isNumber($value)   X-Ref
Check if given value is a number or not

param: mixed String or Integer

implodestr($prefix, $count, $suffix=false)   X-Ref
Implode the prefix and suffix as string for given number of times

param: String prefix to use
param: Integer Number of times
param: String suffix to use (optional)

checkFileAccessForInclusion($filepath, $dieOnFail=true)   X-Ref
Function to check the file access is made within web root directory as well as is safe for php inclusion

param: String File path to check
param: Boolean False to avoid die() if check fails

checkFileAccess($filepath, $dieOnFail=true)   X-Ref
Function to check the file access is made within web root directory.

param: String File path to check
param: Boolean False to avoid die() if check fails

Log($message, $delimit=true)   X-Ref
Log the debug message

param: String Log message
param: Boolean true to append end-of-line, false otherwise

SQLEscape($value)   X-Ref
Escape the string to avoid SQL Injection attacks.

param: String Sql statement string

CheckTable($tablename)   X-Ref
Check if table is present in database

param: String tablename to check

CreateTable($tablename, $criteria, $suffixTableMeta=false)   X-Ref
Create table (supressing failure)

param: String tablename to create
param: String table creation criteria like '(columnname columntype, ....)'
param: String Optional suffix to add during table creation

AlterTable($tablename, $criteria)   X-Ref
Alter existing table

param: String tablename to alter
param: String alter criteria like ' ADD columnname columntype' <br>

AddColumn($tablename, $columnname, $criteria)   X-Ref
Add column to existing table

param: String tablename to alter
param: String columnname to add
param: String columntype (criteria like 'VARCHAR(100)')

ExecuteQuery($sqlquery, $supressdie=false)   X-Ref
Get SQL query

param: String SQL query statement

CreateTableSql($tablename)   X-Ref
Get CREATE SQL for given table

param: String tablename for which CREATE SQL is requried

IsCreateSql($sql)   X-Ref
Check if the given SQL is a CREATE statement

param: String SQL String

IsDestructiveSql($sql)   X-Ref
Check if the given SQL is destructive (DELETE's DATA)

param: String SQL String

ModuleLog($module, $mixed, $extra = array()   X-Ref
funtion to log the exception messge to module.log file

param: <string> $module name of the log file and It should be a alphanumeric string
param: <Exception>/<string> $exception Massage show in the log ,It should be a string or Exception object
param: <array> $extra extra massages need to be displayed
param: <boolean> $backtrace flag to enable or disable backtrace in log  
param: <boolean> $request flag to enable or disable request in log



Generated: Fri Nov 28 20:08:37 2014 Cross-referenced by PHPXref 0.7.1