XpressEngine Core  1.11.2
 All Classes Namespaces Files Functions Variables Pages
Public Member Functions | Public Attributes | List of all members
BaseObject Class Reference
Inheritance diagram for BaseObject:
commentItem contentItem documentItem EditorHandler FileObject mcontentItem ModuleObject Query

Public Member Functions

 __construct ($error=0, $message= 'success')
 
 setError ($error=0)
 
 getError ()
 
 setHttpStatusCode ($code= '200')
 
 getHttpStatusCode ()
 
 setMessage ($message= 'success', $type=NULL)
 
 getMessage ()
 
 add ($key, $val)
 
 adds ($object)
 
 get ($key)
 
 gets ()
 
 getVariables ()
 
 getObjectVars ()
 
 toBool ()
 
 toBoolean ()
 

Public Attributes

 $error = 0
 
 $message = 'success'
 
 $variables = array()
 
 $httpStatusCode = NULL
 

Detailed Description

Every modules inherits from BaseObject class. It includes error, message, and other variables for communicatin purpose.

Author
NAVER (devel.nosp@m.oper.nosp@m.s@xpr.nosp@m.esse.nosp@m.ngine.nosp@m..com)

Definition at line 9 of file BaseObject.class.php.

Constructor & Destructor Documentation

BaseObject::__construct (   $error = 0,
  $message = 'success' 
)

Constructor

Parameters
int$errorError code
string$messageError message
Returns
void

Definition at line 42 of file BaseObject.class.php.

Member Function Documentation

BaseObject::add (   $key,
  $val 
)

Setter to set a key/value pair as an additional variable

Parameters
string$keyA variable name
mixed$valA value for the variable
Returns
void

Definition at line 128 of file BaseObject.class.php.

BaseObject::adds (   $object)

Method to set multiple key/value pairs as an additional variables

Parameters
BaseObject | array$objectEither object or array containg key/value pairs to be added
Returns
void

Definition at line 139 of file BaseObject.class.php.

BaseObject::get (   $key)

Method to retrieve a corresponding value to a given key

Parameters
string$key
Returns
string Returns value to a given key

Definition at line 161 of file BaseObject.class.php.

BaseObject::getError ( )

Getter to retrieve error code

Returns
int Returns an error code

Definition at line 64 of file BaseObject.class.php.

BaseObject::getHttpStatusCode ( )

Getter to retrieve HTTP status code

Returns
int Returns HTTP status code

Definition at line 85 of file BaseObject.class.php.

BaseObject::getMessage ( )

Getter to retrieve an error message

Returns
string Returns message

Definition at line 116 of file BaseObject.class.php.

BaseObject::getObjectVars ( )

Method to retrieve an object of key/value pairs

Returns
BaseObject

Definition at line 197 of file BaseObject.class.php.

BaseObject::gets ( )

Method to retrieve an object containing a key/value pairs

Returns
BaseObject Returns an object containing key/value pairs

Definition at line 171 of file BaseObject.class.php.

BaseObject::getVariables ( )

Method to retrieve an array of key/value pairs

Returns
array

Definition at line 187 of file BaseObject.class.php.

BaseObject::setError (   $error = 0)

Setter to set error code

Parameters
int$errorerror code
Returns
void

Definition at line 54 of file BaseObject.class.php.

BaseObject::setHttpStatusCode (   $code = '200')

Setter to set HTTP status code

Parameters
int$codeHTTP status code. Default value is 200 that means successful
Returns
void

Definition at line 75 of file BaseObject.class.php.

BaseObject::setMessage (   $message = 'success',
  $type = NULL 
)

Setter to set set the error message

Parameters
string$messageError message
Returns
bool Alaways returns true.

Definition at line 96 of file BaseObject.class.php.

BaseObject::toBool ( )

Method to return either true or false depnding on the value in a 'error' variable

Returns
bool Retruns true : error isn't 0 or false : otherwise.

Definition at line 212 of file BaseObject.class.php.

BaseObject::toBoolean ( )

Method to return either true or false depnding on the value in a 'error' variable

Returns
bool

Definition at line 223 of file BaseObject.class.php.

Member Data Documentation

BaseObject::$error = 0

Definition at line 15 of file BaseObject.class.php.

BaseObject::$httpStatusCode = NULL

Definition at line 33 of file BaseObject.class.php.

BaseObject::$message = 'success'

Definition at line 21 of file BaseObject.class.php.

BaseObject::$variables = array()

Definition at line 27 of file BaseObject.class.php.


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