Class Swift_Stream_Processor

Description
Variable Summary
string $command
mixed $hanging
bool $isOpen
string $response
Method Summary
static void getInstance ()
void addObserver (Swift_IStream $observer)
void destroy ()
string getResponse ( $size)
bool isHanging ()
void setCommand (string $command)
void setResponse (string $response)
Variables
string $command (line 24)

The current command being written

  • var: command
  • access: public
mixed $hanging = false (line 46)

Streams with no EOF hang indefinitely if you try to read too far

We don't want that to happen in testing since it will stop the tests from completing So intead we set a value to true if it *would be* hanging, and this we can test for it

  • access: public
bool $isOpen = false (line 40)

Boolean value is the handle is active

  • var: stream open
  • access: public
string $response = "" (line 29)

The unread response, get regularly truncated from the pointer pos

  • var: resonse buffer
  • access: public
Methods
static method getInstance (line 60)

Singleton factory

  • access: public
static void getInstance ()
addObserver (line 53)

Load an observer in

  • access: public
void addObserver (Swift_IStream $observer)
  • object observer $observer
destroy (line 110)

Kill the singleton

  • access: public
void destroy ()
getResponse (line 87)

Read the response from the response buffer

Then advance the pointer

  • return: response
  • access: public
string getResponse ( $size)
  • $size
isHanging (line 103)

For testing purposes we can see if the stream would be hanging in the real world

  • return: hanging
  • access: public
bool isHanging ()
setCommand (line 69)

Provide a command and store it on the buffer

  • access: public
void setCommand (string $command)
  • string $command: command
setResponse (line 78)

Add a response to the response buffer

  • access: public
void setResponse (string $response)
  • string $response: response

Documentation generated on Wed, 23 Jan 2008 01:59:00 +0000 by phpDocumentor 1.4.0