Properties

$init_var

$init_var : 

Type

$db

$db : 

Type

$template_dir

$template_dir : 

Type

$session_key

$session_key : 

Type

$login

$login : 

Type

$password

$password : 

Type

$event_code

$event_code : 

Type

$event_message

$event_message : 

Type

$GET_ARRAY

$GET_ARRAY : 

Type

$user_id

$user_id : 

Type

Methods

Init()

Init() 

Constructor of a class

setUserId()

setUserId(integer  $user_id) : void

Set user ID

Parameters

integer $user_id

user ID

getUserId()

getUserId() : integer

Get user ID

Returns

integer —

$user_id user ID

InitProductPageNumber()

InitProductPageNumber(integer  $catalog_id) : void

Initialization product page number with dividing into catalog key

Parameters

integer $catalog_id
  • catalog Id

initGlobals()

initGlobals() : void

Initialize global array Init::GET_ARRAY This array contain variables from both $_POST and $_GET

CleanGetArray()

CleanGetArray(array  $define_table) : boolean

Clean Init::GET_ARRAY array Method get $define_table array with table structure and unset corresponding items in Init::GET_ARRAY Return true if clean success else return false

Parameters

array $define_table

array with defined table structure

Returns

boolean

GetCookies()

GetCookies(array  $GET_ARRAY) : array

Get cookies values Method get cookies values and define not defined yet values in $GET_ARRAY Method return array with input environment variables

Parameters

array $GET_ARRAY

array with input environment variables

Returns

array

SetDefaults()

SetDefaults(array  $GET_ARRAY) : array

Method set defaults value for input array Method get default value and define variables in input array if this variable not defined yet

Parameters

array $GET_ARRAY

array with input environment variables

Returns

array

userInit()

userInit() : void

Redefine configuration file for each user

SetCookies()

SetCookies(array  $GET_ARRAY) : void

Method set cookies values

Parameters

array $GET_ARRAY

array with input environment variables

getData()

getData(  $define_table = array()) : \:

Method return data array with values from $_POST or $_GET

Parameters

$define_table

Returns

\: —

array

CheckConfig()

CheckConfig() : string

Method check configuration file for necessary parameters Method return stirng with message about missing parameter or empty string if all parameters are exists

Returns

string

setValue()

setValue(string  $key, string  $value) 

Set value of the key

Parameters

string $key
  • key
string $value
  • value

getValue()

getValue(  $key, string  $default) : string

Get value of the variable from GET_ARRAY by specified key

Parameters

$key
string $default
  • default value if key not exist

Returns

string —
  • value

GetCurUri()

GetCurUri() : \:

Method get current URL and add additional string

Returns

\: —

void