MIOLO25
|
Membros públicos | |
cpaint () | |
__construct () | |
initialize ($input_encoding='UTF-8') | |
start ($input_encoding='UTF-8') | |
return_data () | |
register ($func, $alias='', $input=array(), $output=array(), $comment='') | |
unregister ($func) | |
& | add_node ($nodename, $id='') |
set_data ($data) | |
get_data () | |
set_id ($id) | |
get_id () | |
set_attribute ($name, $value) | |
get_attribute ($name) | |
set_name ($name) | |
get_name () | |
get_response_type () | |
isEmpty () | |
setResponseControls ($controls, $elements='', $generateFormLayout=false) | |
setResponseScripts ($scripts=array()) | |
setResponseForm ($form='') | |
setResponse ($controls, $elements='', $scripts=array(), $form='') | |
Campos de Dados | |
$version = '2.1.0' | |
$response_type | |
$basenode | |
$api_functions | |
$api_datatypes | |
$use_wsdl | |
$arguments | |
$user_function | |
$response = NULL | |
Outros membros herdados | |
Atributos Protegidos herdados de MService | |
$manager | |
__construct | ( | ) |
& add_node | ( | $nodename, | |
$id = '' ) |
registers a complex data type
@access public
array | $schema | schema definition for the complex type |
public function complex_type($schema) { $return_value = false; $schema = (array) $schema;
if ($schema['name'] != '' && in_array($schema['type'], array('restriction', 'complex', 'list'))) {
$this->api_datatypes[] = $schema; $return_value = true; } // end: if
return $return_value; } switches the generation of WSDL on/off. default is on
@access public
boolean | $state | state of WSDL generation |
public function use_wsdl($state) { $this->use_wsdl = (boolean) $state; } adds a new subnode to the basenode.
will return a reference to it for further processing.
@access public
string | $nodename | name of the new node |
string | $id | id of the new node |
cpaint | ( | ) |
PHP4 constructor.
@access public
get_attribute | ( | $name | ) |
retrieves an attribute of the basenode by name.
@access public
string | $name | attribute name |
get_data | ( | ) |
returns the data assigned to the basenode.
@access public
get_id | ( | ) |
gets the id property of the basenode.
get_name | ( | ) |
get name property of the basenode.
@access public
get_response_type | ( | ) |
returns the response type as requested by the client
@access public
initialize | ( | $input_encoding = 'UTF-8' | ) |
initialize arguments and user_function
@access public
string | $input_encoding | input data character encoding, default is UTF-8 |
isEmpty | ( | ) |
prepare response object
@access public
register | ( | $func, | |
$alias = '', | |||
$input = array(), | |||
$output = array(), | |||
$comment = '' ) |
registers a new function or method as part of the CPAINT API
@access public
mixed | $func | function name, array(&$object, 'function_name') or array('class', 'function_name') |
string | $alias | alias name for the function. Will be used by the frontend. |
array | $input | function input parameters (not yet used by CPAINT and subject to change) |
array | $output | function output format (not yed used by CPAINT and subject to change) |
string | $comment | description of the functionality |
return_data | ( | ) |
generates and prints the response based on response type supplied by the frontend.
@access public
set_attribute | ( | $name, | |
$value ) |
adds a new attribute to the basenode.
@access public
string | $name | attribute name |
mixed | $value | attribute value |
set_data | ( | $data | ) |
assigns textual data to the basenode.
@access public
mixed | $data | data to assign to this node |
set_id | ( | $id | ) |
sets the id property of the basenode.
string | $id | the id |
set_name | ( | $name | ) |
set name property of the basenode.
@access public
string | $name | the name |
setResponse | ( | $controls, | |
$elements = '', | |||
$scripts = array(), | |||
$form = '' ) |
setResponseControls | ( | $controls, | |
$elements = '', | |||
$generateFormLayout = false ) |
setResponseForm | ( | $form = '' | ) |
setResponseScripts | ( | $scripts = array() | ) |
start | ( | $input_encoding = 'UTF-8' | ) |
calls the user function responsible for this specific call.
@access public
string | $input_encoding | input data character encoding, default is UTF-8 |
unregister | ( | $func | ) |
unregisters a function that is currently part of the CPAINT API.
proves useful when the same set of functions is to be used in the frontend and in some kind of administration environment. you might want to unregister a few (admin) functions for the frontend in this case.
Note that if you supplied an alias when registering a method, you must use the alias to unregister the function / method.
@access public
string | $func | function name |
array $api_datatypes |
list of registered complex types used in the CPAINT API
@access protected
array $api_functions |
list of registered methods available through the CPAINT API
@access protected
array $arguments |
arguments send by front-end
@access private
object $basenode |
the basenode ajaxResponse.
@access protected
string $response = NULL |
response.
@access protected
string $response_type |
response type.
@access protected
boolean $use_wsdl |
whether or not the CPAINT API generates a WSDL when called with ?wsdl querystring
@access private
string $user_function |
user function name
@access private
string $version = '2.1.0' |
version number
@access private