CaMykS  1.0-20231201
Public Member Functions | Private Attributes | List of all members
CRequestAnswer Class Reference

Public Member Functions

 __construct ($params=array())
 
 get_param ($param='')
 
 update_params ($params=array())
 
 update_param ($name, $value)
 
 set_asSuccess ($msg='')
 
 set_asFailure ($msg='', $error='')
 
 is_success ()
 
 is_failure ()
 
 throw_fatalError ()
 
 log_error ()
 
 send_asXML ($params=array())
 
 send_asJSON ($params=array())
 

Private Attributes

 $params
 CRequestAnswer parameters. More...
 

Detailed Description

CRequestAnswer class.

Author
CaMykS Team camyk.nosp@m.s.co.nosp@m.ntact.nosp@m.@gma.nosp@m.il.co.nosp@m.m

Constructor & Destructor Documentation

◆ __construct()

CRequestAnswer::__construct (   $params = array())

Class constructor.

Parameters
array$params
Returns
void

Member Function Documentation

◆ get_param()

CRequestAnswer::get_param (   $param = '')

Return param.

Parameters
string$param
Returns
mixed

◆ update_params()

CRequestAnswer::update_params (   $params = array())

Update params.

Parameters
array$params
Returns
void

◆ update_param()

CRequestAnswer::update_param (   $name,
  $value 
)

Update param.

Parameters
string$name
mixed$value
Returns
void

◆ set_asSuccess()

CRequestAnswer::set_asSuccess (   $msg = '')

Set answer as success.

Parameters
string$msg
Returns
void

◆ set_asFailure()

CRequestAnswer::set_asFailure (   $msg = '',
  $error = '' 
)

Set answer as failure.

Parameters
string$msg
string$error
Returns
void

◆ is_success()

CRequestAnswer::is_success ( )

Return is request a success.

Returns
boolean result

◆ is_failure()

CRequestAnswer::is_failure ( )

Return is request a failure.

Returns
boolean result

◆ throw_fatalError()

CRequestAnswer::throw_fatalError ( )

Throw fatal error for failure.

Returns
void

◆ log_error()

CRequestAnswer::log_error ( )

Log error for failure.

Returns
void

◆ send_asXML()

CRequestAnswer::send_asXML (   $params = array())

Send object data as XML (for ajax request).

Parameters
array$params
Returns
void

◆ send_asJSON()

CRequestAnswer::send_asJSON (   $params = array())

Send object data as JSON (for ajax request).

Parameters
array$params
Returns
void

Member Data Documentation

◆ $params

array CRequestAnswer::$params
private
Initial value:
= array(
'status'=>'',
'parent'=>'',
'action'=>'',
'message'=>'',
'error'=>'',
'file'=>'',
'line'=>0,
)

CRequestAnswer parameters.


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