PHP Класс Swift_Mime_SimpleMimeEntity

Автор: Chris Corbyn
Наследование: implements Swift_Mime_MimeEntity
Показать файл Открыть проект Примеры использования класса

Защищенные свойства (Protected)

Свойство Тип Описание
$userContentType

Открытые методы

Метод Описание
__clone ( ) Make a deep copy of object.
__construct ( Swift_Mime_HeaderSet $headers, Swift_Mime_ContentEncoder $encoder, Swift_KeyCache $cache, Swift_IdGenerator $idGenerator ) Create a new SimpleMimeEntity with $headers, $encoder and $cache.
__destruct ( ) Empties it's own contents from the cache.
__toString ( ) : string Returns a string representation of this object.
charsetChanged ( string $charset ) Receive notification that the charset of this entity, or a parent entity has changed.
encoderChanged ( Swift_Mime_ContentEncoder $encoder ) Receive notification that the encoder of this entity or a parent entity has changed.
generateId ( ) : string Generate a new Content-ID or Message-ID for this MIME entity.
getBody ( ) : string Get the body of this entity as a string.
getBoundary ( ) : string Get the boundary used to separate children in this entity.
getChildren ( ) : Swift_Mime_MimeEntity[] Get all children added to this entity.
getContentType ( ) : string Get the Content-type of this entity.
getDescription ( ) : string Get the description of this entity.
getEncoder ( ) : Swift_Mime_ContentEncoder Get the encoder used for the body of this entity.
getHeaders ( ) : Swift_Mime_HeaderSet Get the {@link Swift_Mime_HeaderSet} for this entity.
getId ( ) : string Get the CID of this entity.
getMaxLineLength ( ) : integer Get the maximum line length of the body of this entity.
getNestingLevel ( ) : integer Get the nesting level of this entity.
setBody ( mixed $body, string $contentType = null ) Set the body of this entity, either as a string, or as an instance of {@link Swift_OutputByteStream}.
setBoundary ( string $boundary ) Set the boundary used to separate children in this entity.
setChildren ( array $children, integer $compoundLevel = null ) Set all children of this entity.
setContentType ( string $type ) Set the Content-type of this entity.
setDescription ( string $description ) Set the description of this entity.
setEncoder ( Swift_Mime_ContentEncoder $encoder ) Set the encoder used for the body of this entity.
setId ( string $id ) Set the CID of this entity.
setMaxLineLength ( integer $length ) Set the maximum line length of lines in this body.
toByteStream ( Swift_InputByteStream $is ) Write this entire entity to a {@see Swift_InputByteStream}.
toString ( ) : string Get this entire entity as a string.

Защищенные методы

Метод Описание
bodyToByteStream ( Swift_InputByteStream $is ) Write this entire entity to a {@link Swift_InputByteStream}.
bodyToString ( ) : string Get this entire entity as a string.
clearCache ( ) Empty the KeyCache for this entity.
fixHeaders ( ) Re-evaluate what content type and encoding should be used on this entity.
getCache ( ) : Swift_KeyCache Get the KeyCache used in this entity.
getHeaderFieldModel ( $field ) Get the model data (usually an array or a string) for $field.
getHeaderParameter ( $field, $parameter ) Get the parameter value of $parameter on $field header.
getIdField ( ) Get the name of the header that provides the ID of this entity.
getIdGenerator ( ) : Swift_IdGenerator Get the ID generator.
setHeaderFieldModel ( $field, $model ) Set the model data for $field.
setHeaderParameter ( $field, $parameter, $value ) Set the parameter value of $parameter on $field header.

Приватные методы

Метод Описание
assertValidBoundary ( $boundary )
childSortAlgorithm ( $a, $b )
createChild ( )
getCompoundLevel ( $children )
getNeededChildLevel ( $child, $compoundLevel )
notifyCharsetChanged ( $charset )
notifyEncoderChanged ( Swift_Mime_ContentEncoder $encoder )
readStream ( Swift_OutputByteStream $os )
setContentTypeInHeaders ( $type )
setEncoding ( $encoding )
setNestingLevel ( $level )
sortChildren ( )

Описание методов

__clone() публичный Метод

Make a deep copy of object.
public __clone ( )

__construct() публичный Метод

Create a new SimpleMimeEntity with $headers, $encoder and $cache.
public __construct ( Swift_Mime_HeaderSet $headers, Swift_Mime_ContentEncoder $encoder, Swift_KeyCache $cache, Swift_IdGenerator $idGenerator )
$headers Swift_Mime_HeaderSet
$encoder Swift_Mime_ContentEncoder
$cache Swift_KeyCache
$idGenerator Swift_IdGenerator

__destruct() публичный Метод

Empties it's own contents from the cache.
public __destruct ( )

__toString() публичный Метод

Returns a string representation of this object.
См. также: toString()
public __toString ( ) : string
Результат string

bodyToByteStream() защищенный Метод

Write this entire entity to a {@link Swift_InputByteStream}.
protected bodyToByteStream ( Swift_InputByteStream $is )
$is Swift_InputByteStream

bodyToString() защищенный Метод

Get this entire entity as a string.
protected bodyToString ( ) : string
Результат string

charsetChanged() публичный Метод

Receive notification that the charset of this entity, or a parent entity has changed.
public charsetChanged ( string $charset )
$charset string

clearCache() защищенный Метод

Empty the KeyCache for this entity.
protected clearCache ( )

encoderChanged() публичный Метод

Receive notification that the encoder of this entity or a parent entity has changed.
public encoderChanged ( Swift_Mime_ContentEncoder $encoder )
$encoder Swift_Mime_ContentEncoder

fixHeaders() защищенный Метод

Re-evaluate what content type and encoding should be used on this entity.
protected fixHeaders ( )

generateId() публичный Метод

Generate a new Content-ID or Message-ID for this MIME entity.
public generateId ( ) : string
Результат string

getBody() публичный Метод

Get the body of this entity as a string.
public getBody ( ) : string
Результат string

getBoundary() публичный Метод

Get the boundary used to separate children in this entity.
public getBoundary ( ) : string
Результат string

getCache() защищенный Метод

Get the KeyCache used in this entity.
protected getCache ( ) : Swift_KeyCache
Результат Swift_KeyCache

getChildren() публичный Метод

Get all children added to this entity.
public getChildren ( ) : Swift_Mime_MimeEntity[]
Результат Swift_Mime_MimeEntity[]

getContentType() публичный Метод

Get the Content-type of this entity.
public getContentType ( ) : string
Результат string

getDescription() публичный Метод

This value comes from the Content-Description header if set.
public getDescription ( ) : string
Результат string

getEncoder() публичный Метод

Get the encoder used for the body of this entity.
public getEncoder ( ) : Swift_Mime_ContentEncoder
Результат Swift_Mime_ContentEncoder

getHeaderFieldModel() защищенный Метод

Get the model data (usually an array or a string) for $field.
protected getHeaderFieldModel ( $field )

getHeaderParameter() защищенный Метод

Get the parameter value of $parameter on $field header.
protected getHeaderParameter ( $field, $parameter )

getHeaders() публичный Метод

Get the {@link Swift_Mime_HeaderSet} for this entity.
public getHeaders ( ) : Swift_Mime_HeaderSet
Результат Swift_Mime_HeaderSet

getId() публичный Метод

The CID will only be present in headers if a Content-ID header is present.
public getId ( ) : string
Результат string

getIdField() защищенный Метод

Get the name of the header that provides the ID of this entity.
protected getIdField ( )

getIdGenerator() защищенный Метод

Get the ID generator.
protected getIdGenerator ( ) : Swift_IdGenerator
Результат Swift_IdGenerator

getMaxLineLength() публичный Метод

Get the maximum line length of the body of this entity.
public getMaxLineLength ( ) : integer
Результат integer

getNestingLevel() публичный Метод

Get the nesting level of this entity.
public getNestingLevel ( ) : integer
Результат integer

setBody() публичный Метод

Set the body of this entity, either as a string, or as an instance of {@link Swift_OutputByteStream}.
public setBody ( mixed $body, string $contentType = null )
$body mixed
$contentType string optional

setBoundary() публичный Метод

Set the boundary used to separate children in this entity.
public setBoundary ( string $boundary )
$boundary string

setChildren() публичный Метод

Set all children of this entity.
public setChildren ( array $children, integer $compoundLevel = null )
$children array
$compoundLevel integer For internal use only

setContentType() публичный Метод

Set the Content-type of this entity.
public setContentType ( string $type )
$type string

setDescription() публичный Метод

This method sets a value in the Content-ID header.
public setDescription ( string $description )
$description string

setEncoder() публичный Метод

Set the encoder used for the body of this entity.
public setEncoder ( Swift_Mime_ContentEncoder $encoder )
$encoder Swift_Mime_ContentEncoder

setHeaderFieldModel() защищенный Метод

Set the model data for $field.
protected setHeaderFieldModel ( $field, $model )

setHeaderParameter() защищенный Метод

Set the parameter value of $parameter on $field header.
protected setHeaderParameter ( $field, $parameter, $value )

setId() публичный Метод

Set the CID of this entity.
public setId ( string $id )
$id string

setMaxLineLength() публичный Метод

Though not enforced by the library, lines should not exceed 1000 chars.
public setMaxLineLength ( integer $length )
$length integer

toByteStream() публичный Метод

Write this entire entity to a {@see Swift_InputByteStream}.
public toByteStream ( Swift_InputByteStream $is )
$is Swift_InputByteStream

toString() публичный Метод

Get this entire entity as a string.
public toString ( ) : string
Результат string

Описание свойств

$userContentType защищенное свойство

protected $userContentType