[ PHPXref.com ] [ Generated: Sun Jul 20 20:33:10 2008 ] [ TaskFreak! 0.1.4 ]
[ Index ]     [ Variables ]     [ Functions ]     [ Classes ]     [ Constants ]     [ Statistics ]

title

Body

[close]

/cpaint/ -> cpaint2.inc.php (summary)

CPAINT - Cross-Platform Asynchronous INterface Toolkit http://cpaint.sourceforge.net

Author: Paul Sullivan
Author: Dominique Stender
Copyright: Copyright (c) 2005 Paul Sullivan, Dominique Stender - http://cpaint.sourceforge.net
File Size: 746 lines (21 kb)
Included or required: 1 time
Referenced: 0 times
Includes or requires: 0 files

Defines 3 classes

cpaint:: (14 methods):
  cpaint()
  __construct()
  start()
  return_data()
  register()
  add_node()
  set_data()
  get_data()
  set_id()
  get_id()
  set_attribute()
  get_attribute()
  set_name()
  get_name()

cpaint_node:: (13 methods):
  cpaint_node()
  __construct()
  add_node()
  set_data()
  get_data()
  set_id()
  get_id()
  set_attribute()
  get_attribute()
  set_name()
  get_name()
  set_encoding()
  get_encoding()

cpaint_transformer:: (6 methods):
  toString()
  toXML()
  encode()
  decode()
  decode_array()
  find_output_charset()


Class: cpaint  - X-Ref

cpaint base class.

cpaint()   X-Ref
PHP4 constructor.

return: void

__construct()   X-Ref
PHP 5 constructor.

return: void

start($input_encoding = 'UTF-8')   X-Ref
calls the user function responsible for this specific call.

param: string      $input_encoding         input data character encoding, default is UTF-8
return: void

return_data()   X-Ref
generates and prints the response based on response type supplied by the frontend.

return: void

register($func, $input = array()   X-Ref
registers a new function or method as part of the CPAINT API

param: mixed     $func     function name, array(&$object, 'function_name') or array('class', 'function_name')
param: array     $input    function input parameters (not yet used by CPAINT and subject to change)
param: array     $output   function output format (not yed used by CPAINT and subject to change)
return: boolean

add_node($nodename, $id = '')   X-Ref
adds a new subnode to the basenode.

will return a reference to it for further processing.

param: string    $nodename     name of the new node
param: string    $id           id of the new node
return: object

set_data($data)   X-Ref
assigns textual data to the basenode.

param: string    $data    data to assign to this node
return: void

get_data()   X-Ref
returns the data assigned to the basenode.

return: string

set_id($id)   X-Ref
sets the id property of the basenode.

param: string    $id      the id
return: void

get_id()   X-Ref
gets the id property of the basenode.

return: string

set_attribute($name, $value)   X-Ref
adds a new attribute to the basenode.

param: string    $name       attribute name
param: mixed     $value      attribute value
return: void

get_attribute($name)   X-Ref
retrieves an attribute of the basenode by name.

param: string    $name       attribute name
return: string

set_name($name)   X-Ref
set name property of the basenode.

param: string    $name   the name
return: void

get_name()   X-Ref
get name property of the basenode.

return: string

Class: cpaint_node  - X-Ref

a cpaint data node. Data nodes are used to build up the response.

cpaint_node()   X-Ref
PHP4 constructor.

return: void

__construct()   X-Ref
PHP 5 constructor.

return: void

add_node($nodename, $id = '')   X-Ref
adds a new subnode to this node.

will return a reference to it for further processing.

param: string    $nodename     name of the new node
param: string    $id           id of the new node
return: object

set_data($data)   X-Ref
assigns textual data to this node.

param: string    $data    data to assign to this node
return: void

get_data()   X-Ref
returns the textual data assigned to this node.

return: string

set_id($id)   X-Ref
sets the id property of this node.

param: string    id      the id
return: void

get_id()   X-Ref
returns the id property if this node.

return: string

set_attribute($name, $value)   X-Ref
adds a new attribute to this node.

param: string    $name       attribute name
param: mixed     $value      attribute value
return: void

get_attribute($name)   X-Ref
retrieves an attribute by name.

param: string    $name       attribute name
return: string

set_name($name)   X-Ref
set name property.

param: string    $name   the name
return: void

get_name()   X-Ref
get name property.

return: string

set_encoding($encoding)   X-Ref
sets the character encoding for this node

param: string      $encoding     character encoding
return: void

get_encoding()   X-Ref
returns the character encoding for this node

return: string

Class: cpaint_transformer  - X-Ref

static class of output transformers.

toString(&$node)   X-Ref
toString method, used to generate response of type TEXT.
will perform character transformation according to parameters.

param: object    $node               a cpaint_node object
return: string

toXML(&$node)   X-Ref
XML response generator.
will perform character transformation according to parameters.

param: object    $node               a cpaint_node object
return: string

encode($data, $encoding)   X-Ref
performs conversion to JavaScript-safe UTF-8 characters

param: string    $data         data to convert
param: string    $encoding     character encoding
return: string

decode($data, $encoding)   X-Ref
performs conversion from JavaScript encodeURIComponent() string (UTF-8) to
the charset in use.

param: string    $data         data to convert
param: string    $encoding     character encoding
return: string

decode_array($data, $encoding)   X-Ref
decodes a (nested) array of data from UTF-8 into the configured character set

param: array     $data         data to convert
param: string    $encoding     character encoding
return: array

find_output_charset($encoding)   X-Ref
determines the output character set
based on input character set

param: string    $encoding     character encoding
return: string



[ Powered by PHPXref - Served by Debian GNU/Linux ]