Start instance of base class, load configuration and establish database connection. Please don't call the constructor direcly, use the singleton pattern instead.
Applies markdown on given string. Takes the string to convert as first argument, the information if HTML should be stripped before using markdown as second argument. Returns the converted string.
Applies Textile on given string. Takes the string to convert as first argument, the information if HTML should be stripped before using markdown as second argument. Returns the converted string.
array calculatePageIndex(
int
$total_items, int
$interval)
Calculates a page index on basis of the total item count and the number of items per page. Tasks the total item count as first argument, the number of items per page as second argument. Returns array.
Replaces non-url-friendly characters like whitespaces etc. with something more url friendly to create the 'meaningful urls'. Takes the string to convert as first argument. Returns the converted string.
See helper::_urlTranslationTable() for the whole character translation table.
Calculates start/end dates for given timeframe. Takes the name of the timeframe as first argument. Returns array with to values: timeframe_start and timeframe end.
See Utility_Helper::getTimeframes() for a list of supported timeframes.
Creates sql fragment to search for given string Take the table field name as first argument and the search string as second. Returns sql fragment string.
Creates sql fragment for given current date (now()). Takes the name of the date field as first argument, the value of the parameter as second argument. Returns string.
Creates sql fragment for given timeframe. Takes the name of the date field as first argument, the name of the timeframe as second argument. Returns string.
See Utility_Helper::getTimeframes() for a list of supported timeframes.
Generates IN clause for database queries. Takes the field to search as first argument, the values for the IN clause as second argument. Returns string with sql query fragment. Sample:
Generates multiple LIKE clauses for database queries from array of
search values. Takes the field to search as first argument, the values for the LIKE clauses as second argument and an optional concatenation operator as third argument. Returns string with sql query fragment. Sample:
Generates NOT IN clause for database queries. Takes the field to search as first argument, the values for the NOT IN clause as second argument. Returns string with sql query fragment. Sample: