Class response

Description

Class response , used to defined the response of the class request and cmd.

Located in /caht.php (line 206)


	
			
Method Summary
response __construct ( $command)
void addError (array[string]mixed $error)
void addMeta ( $meta, array[string]mixed $error)
void addRead ( $read, array[string]mixed $error)
string asString ()
array fromString (string $string)
string getCommand ()
boolen hasError ()
array nextError ()
array nextMeta ()
array nextRead ()
void setError (intger $code, string $method)
Methods
Constructor __construct (line 244)
  • access: public
response __construct ( $command)
  • $command
addError (line 278)

Add an error to the response

  1.  <?php
  2.  $response->addErrorarray'CODE' => 33 'LABEL' => 'ACCESS_DENIED' );
  3.  ?>

  • access: public
void addError (array[string]mixed $error)
  • array[string]mixed $error
addMeta (line 346)

Add a meta line to the response

  1.  <?php
  2.  $response->addMetaarray'nb' => 12 'total' => 134 );
  3.  ?>

  • access: public
void addMeta ( $meta, array[string]mixed $error)
  • array[string]mixed $error
  • $meta
addRead (line 313)

Add a read line to the response

  1.  <?php
  2.  $response->addReadarray'Name' => 'Paul' 'Alias' => 'Cheal' );
  3.  ?>

  • access: public
void addRead ( $read, array[string]mixed $error)
  • array[string]mixed $error
  • $read
asString (line 499)

return the data of this object as string.

  • access: public
string asString ()
fromString (line 399)

Construct this object from a string = raw response of a command.

  • access: public
array fromString (string $string)
  • string $string
getCommand (line 262)

return the name o the command

  • access: public
string getCommand ()
hasError (line 253)

return true if the response ha error else false

  • access: public
boolen hasError ()
nextError (line 291)

return the next line of error

  • access: public
array nextError ()
nextMeta (line 356)

return the next line of meta

  • access: public
array nextMeta ()
nextRead (line 323)

return the next line of read

  • access: public
array nextRead ()
setError (line 374)

set an error with the error code

  • access: public
void setError (intger $code, string $method)
  • intger $code
  • string $method

Documentation generated on Mon, 02 Feb 2009 20:09:52 +0100 by phpDocumentor 1.4.2