Public Member Functions | Data Fields | Protected Attributes | Private Member Functions

ilECSResult Class Reference
[Services/WebServices/ECS]

Collaboration diagram for ilECSResult:

Public Member Functions

 __construct ($a_res, $a_type=self::RESULT_TYPE_JSON)
 Constructor.
 getPlainResultString ()
 get unformated result string
 getResult ()
 get result

Data Fields

const RESULT_TYPE_JSON = 1

Protected Attributes

 $result_string = ''
 $result
 $result_type

Private Member Functions

 init ()
 init result (json_decode) private

Detailed Description

Author:
Stefan Meyer <smeyer@databay.de>
Version:
$Id$

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


Constructor & Destructor Documentation

ilECSResult::__construct ( a_res,
a_type = self::RESULT_TYPE_JSON 
)

Constructor.

public

Parameters:
string result_string
int result type

Definition at line 49 of file class.ilECSResult.php.

References init().

        {
                $this->result_string = $a_res;
                $this->result_type = $a_type;
        
                $this->init();  
        }

Here is the call graph for this function:


Member Function Documentation

ilECSResult::getPlainResultString (  ) 

get unformated result string

public

Definition at line 63 of file class.ilECSResult.php.

        {
                return $this->result_string;
        }

ilECSResult::getResult (  ) 

get result

public

Returns:
mixed JSON object, array of objects or false in case of errors.

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

        {
                return $this->result;           
        }

ilECSResult::init (  )  [private]

init result (json_decode) private

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

Referenced by __construct().

        {
                if(!$this->result_string)
                {
                        $this->result = array();
                        return true;
                }

                switch($this->result_type)
                {
                        case self::RESULT_TYPE_JSON:
                                $this->result = json_decode($this->result_string);
                                break;
                }
                return true;
        }

Here is the caller graph for this function:


Field Documentation

ilECSResult::$result [protected]

Definition at line 38 of file class.ilECSResult.php.

ilECSResult::$result_string = '' [protected]

Definition at line 37 of file class.ilECSResult.php.

ilECSResult::$result_type [protected]

Definition at line 39 of file class.ilECSResult.php.

Definition at line 35 of file class.ilECSResult.php.


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