PHP WebSocket2 Library
PHP5 Library for browsing web
HttpAttachment Class Reference

HTTP attachment base class. More...

Inheritance diagram for HttpAttachment:
HttpContentAttachment HttpFileAttachment

Public Member Functions

 __construct ($filename)
 Constructor. More...
 
 setFilename ($filename)
 Sets attachment file name. More...
 
 setContentType ($content_type)
 Sets attachment content-type. More...
 
 getFilename ()
 Returns attachment file name. More...
 
 getContentType ()
 Returns attachment content-type. More...
 
 writeTo (HttpSocket $socket)
 Writes raw attachment data to HttpSocket $socket. More...
 
 getSize ()
 Returns attachment size in bytes. More...
 

Detailed Description

HTTP attachment base class.

Constructor & Destructor Documentation

__construct (   $filename)

Constructor.

Parameters
string$filenameAttachment file name (this will be sent over HTTP)

Member Function Documentation

getContentType ( )

Returns attachment content-type.

Return values
stringAttachment content-type (or null, if no content-type present)
getFilename ( )

Returns attachment file name.

Return values
stringAttachment file name
getSize ( )
abstract

Returns attachment size in bytes.

Return values
intAttachment size in bytes
setContentType (   $content_type)

Sets attachment content-type.

Parameters
string$content_typeAttachment content-type or null, if no content-type should be supplied
setFilename (   $filename)

Sets attachment file name.

Parameters
string$filenameAttachment file name (this will be sent over HTTP)
writeTo ( HttpSocket  $socket)
abstract

Writes raw attachment data to HttpSocket $socket.

Parameters
HttpSocket$socketSocket to send data to

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