Public Member Functions | Data Fields

SoapStatus Class Reference

Public Member Functions

 __construct ()
 set_error ($name)
 get_array ()

Data Fields

 $value
 $name
 $description

Detailed Description

The class which represents the status which SiT! always returns when using the SOAP API

Author:
Paul Heaney

Definition at line 92 of file soap_types.inc.php.


Constructor & Destructor Documentation

__construct (  ) 

Creates a new SoapStatus object.

Author:
Paul Heaney

Definition at line 102 of file soap_types.inc.php.

References set_error().

    {
        $this->set_error('no_error');
    }


Member Function Documentation

get_array (  ) 

Generate the array to be returned by nusoap

Returns:
array. Status array
Author:
Paul Heaney

Definition at line 134 of file soap_types.inc.php.

References description, and name.

    {
        return array('value' => $this->value, 'name' => $this->name, 'description' => $this->description);
    }

set_error ( name  ) 

Sets the error code for this object

Parameters:
string $name. Name of the error as defined in soap_error_definitions
Author:
Paul Heaney

Definition at line 112 of file soap_types.inc.php.

References $name, $soap_errors, description, global, and name.

Referenced by __construct().

    {
        global $soap_errors;
        if (isset($soap_errors[$name]))
        {
            $this->value = $soap_errors[$name]['value'];
            $this->name = $soap_errors[$name]['name'];
            $this->description = $soap_errors[$name]['description'];
        }
        else
        {
            $this->value = -1;
            $this->name = "Undefined error {$name} occured";
            $this->description = "Undefined error {$name} occured";
        }
    }


Field Documentation

Definition at line 96 of file soap_types.inc.php.

$name

Definition at line 95 of file soap_types.inc.php.

Referenced by set_error().

$value

Definition at line 94 of file soap_types.inc.php.


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

For more help developing with SiT! see http://sitracker.org/wiki/DevelopmentHowTo

© 2008-2011 Support Incident Tracker

Tsohost Logo