CaMykS  1.0-20181201
 All Classes Files Functions Variables Pages
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

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

Class constructor.

Parameters
array$params
Returns
void

Member Function Documentation

CRequestAnswer::get_param (   $param = '')

Return param.

Parameters
string$param
Returns
mixed
CRequestAnswer::is_failure ( )

Return is request a failure.

Returns
boolean result
CRequestAnswer::is_success ( )

Return is request a success.

Returns
boolean result
CRequestAnswer::log_error ( )

Log error for failure.

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

Send object data as JSON (for ajax request).

Parameters
array$params
Returns
void
CRequestAnswer::send_asXML (   $params = array())

Send object data as XML (for ajax request).

Parameters
array$params
Returns
void
CRequestAnswer::set_asFailure (   $msg = '',
  $error = '' 
)

Set answer as failure.

Parameters
string$msg
string$error
Returns
void
CRequestAnswer::set_asSuccess (   $msg = '')

Set answer as success.

Parameters
string$msg
Returns
void
CRequestAnswer::throw_fatalError ( )

Throw fatal error for failure.

Returns
void
CRequestAnswer::update_param (   $name,
  $value 
)

Update param.

Parameters
string$name
mixed$value
Returns
void
CRequestAnswer::update_params (   $params = array())

Update params.

Parameters
array$params
Returns
void

Member Data Documentation

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: