Stud.IP  5.4
DbView Class Reference

Public Member Functions

 __construct ($db="")
 
 init_views ()
 
 __get ($view)
 
 halt ($msg)
 
 get_query ()
 
 get_parsed_query ($query_list)
 
 parse_query (&$query)
 
 get_temp_table ($sub_query)
 
 get_temp_values ($sub_query)
 
 get_value_list ($list)
 
 get_view ($name)
 
 Get_union ()
 

Static Public Member Functions

static addView ($view)
 
static getView ($view, $db='')
 
static get_uniqid ()
 

Data Fields

 $params = []
 
 $auto_free_params = true
 
 $debug = false
 

Static Protected Attributes

static $dbviewfiles = []
 
static $dbviews = []
 

Constructor & Destructor Documentation

◆ __construct()

__construct (   $db = "")

Constructor

Pass nothing to use a new instance of db_class_name, the classname for a new instance, or existing instance

public

Parameters
mixed$dbclassname of used db abstraction or existing db object

Member Function Documentation

◆ __get()

__get (   $view)

◆ addView()

static addView (   $view)
static

◆ get_parsed_query()

get_parsed_query (   $query_list)

◆ get_query()

get_query ( )

◆ get_temp_table()

get_temp_table (   $sub_query)

◆ get_temp_values()

get_temp_values (   $sub_query)

◆ Get_union()

Get_union ( )

◆ get_uniqid()

static get_uniqid ( )
static

◆ get_value_list()

get_value_list (   $list)

◆ get_view()

get_view (   $name)

◆ getView()

static getView (   $view,
  $db = '' 
)
static

Convenience method that combines addView() and returns an instance.

Parameters
String$viewRequired view (at least this will be present in the returned instance)
mixed$dbclassname of db abstraction or existing db object
Returns
DbView Instance of self with at least the required view loaded

◆ halt()

halt (   $msg)

print error message and exit script

private

Parameters
string$msgthe message to print

◆ init_views()

init_views ( )

◆ parse_query()

parse_query ( $query)

Field Documentation

◆ $auto_free_params

boolean $auto_free_params = true

delete the params array after each query execution

public

◆ $dbviewfiles

$dbviewfiles = []
staticprotected

◆ $dbviews

$dbviews = []
staticprotected

◆ $debug

boolean $debug = false

turn on/off debugging

public

◆ $params

array $params = []

list of parameters

public


The documentation for this class was generated from the following file: