API Documentation

Mail/Storage/Abstract.php

Classes 
category
Zend
copyright
Copyright (c) 2005-2010 Zend Technologies USA Inc. (http://www.zend.com)
license
http://framework.zend.com/license/new-bsd New BSD License
package
Zend_Mail
subpackage
Storage
version
$Id: Abstract.php 20096 2010-01-06 02:05:09Z bkarwin $
Classes
Zend_Mail_Storage_Abstract

Description

Zend Framework

LICENSE

This source file is subject to the new BSD license that is bundled with this package in the file LICENSE.txt. It is also available through the world-wide-web at this URL: http://framework.zend.com/license/new-bsd If you did not receive a copy of the license and are unable to obtain it through the world-wide-web, please send an email to license@zend.com so we can send you a copy immediately.

Zend_Mail_Storage_Abstract

Implements
category
Zend
copyright
Copyright (c) 2005-2010 Zend Technologies USA Inc. (http://www.zend.com)
license
http://framework.zend.com/license/new-bsd New BSD License
package
Zend_Mail
subpackage
Storage
Properties
$_has
$_iterationPos
$_iterationMax
$_messageClass
Methods
__get
getCapabilities
countMessages
getSize
getMessage
getRawHeader
getRawContent
__construct
__destruct
close
noop
removeMessage
getUniqueId
getNumberByUniqueId
count
offsetExists
offsetGet
offsetSet
offsetUnset
rewind
current
key
next
valid
seek

Description

Properties

$_has

array $_has = 'array'

class capabilities with default values

Details

$_has
array
visibility
protected
default
array
final
false
static
false

$_iterationMax

null|int $_iterationMax = 'null'

maximum iteration position (= message count)

Details

$_iterationMax
null|int
visibility
protected
default
null
final
false
static
false

$_iterationPos

int $_iterationPos = '0'

current iteration position

Details

$_iterationPos
int
visibility
protected
default
0
final
false
static
false

$_messageClass

string $_messageClass = 'Zend_Mail_Message'

used message class, change it in an extened class to extend the returned message class

Details

$_messageClass
string
visibility
protected
default
Zend_Mail_Message
final
false
static
false

Methods

__construct

__construct( array $params ) :

Create instance with parameters

Arguments
$params
array
mail reader specific parameters
Details
visibility
public
final
false
static
false
throws

__destruct

__destruct( ) :

Destructor calls close() and therefore closes the resource.

Details
visibility
public
final
false
static
false

__get

__get( string $var ) : bool

Getter for has-properties. The standard has properties are: hasFolder, hasUniqueid, hasDelete, hasCreate, hasTop

The valid values for the has-properties are: - true if a feature is supported - false if a feature is not supported - null is it's not yet known or it can't be know if a feature is supported

Arguments
$var
string
property name
Output
bool
supported or not
Details
visibility
public
final
false
static
false
throws

close

close( ) : null

Close resource for mail lib. If you need to control, when the resource is closed. Otherwise the destructor would call this.

Output
null
Details
visibility
public
final
false
static
false

count

count( ) : int

Countable::count()

Output
int
Details
visibility
public
final
false
static
false

countMessages

countMessages( ) : int

Count messages messages in current box/folder

Output
int
number of messages
Details
visibility
public
final
false
static
false
throws

current

current( ) : Zend_Mail_Message

Iterator::current()

Output
Zend_Mail_Message
current message
Details
visibility
public
final
false
static
false

getCapabilities

getCapabilities( ) : array

Get a full list of features supported by the specific mail lib and the server

Output
array
list of features as array(featurename => true|false[|null])
Details
visibility
public
final
false
static
false

getMessage

getMessage( $id $id ) : Zend_Mail_Message

Get a message with headers and body

Arguments
$id
$id
int number of message
Details
visibility
public
final
false
static
false

getNumberByUniqueId

getNumberByUniqueId( string $id ) : int

get a message number from a unique id

I.e. if you have a webmailer that supports deleting messages you should use unique ids as parameter and use this method to translate it to message number right before calling removeMessage()

Arguments
$id
string
unique id
Output
int
message number
Details
visibility
public
final
false
static
false
throws

getRawContent

getRawContent( int $id, null|array|string $part = null ) : string

Get raw content of message or part

Arguments
$id
int
number of message
$part
nullarraystring
path to part or null for messsage content
Output
string
raw content
Details
visibility
public
final
false
static
false

getRawHeader

getRawHeader( int $id, null|array|string $part = null, int $topLines = 0 ) : string

Get raw header of message or part

Arguments
$id
int
number of message
$part
nullarraystring
path to part or null for messsage header
$topLines
int
include this many lines with header (after an empty line)
Output
string
raw header
Details
visibility
public
final
false
static
false

getSize

getSize( int $id = 0 ) : int|array

Get a list of messages with number and size

Arguments
$id
int
number of message
Output
int|array
size of given message of list with all messages as array(num => size)
Details
visibility
public
final
false
static
false

getUniqueId

getUniqueId( int|null $id = null ) : array|string

get unique id for one or all messages

if storage does not support unique ids it's the same as the message number

Arguments
$id
intnull
message number
Output
array|string
message number for given message or all messages as array
Details
visibility
public
final
false
static
false
throws

key

key( ) : int

Iterator::key()

Output
int
id of current position
Details
visibility
public
final
false
static
false

next

next( ) : void

Iterator::next()

Details
visibility
public
final
false
static
false

noop

noop( ) : null

Keep the resource alive.

Output
null
Details
visibility
public
final
false
static
false

offsetExists

offsetExists( int $id ) : boolean

ArrayAccess::offsetExists()

Arguments
$id
int
Output
boolean
Details
visibility
public
final
false
static
false

offsetGet

offsetGet( int $id ) : Zend_Mail_Message

ArrayAccess::offsetGet()

Arguments
$id
int
Output
Zend_Mail_Message
message object
Details
visibility
public
final
false
static
false

offsetSet

offsetSet( id $id, mixed $value ) : void

ArrayAccess::offsetSet()

Arguments
$id
id
$value
mixed
Details
visibility
public
final
false
static
false
throws

offsetUnset

offsetUnset( int $id ) : boolean

ArrayAccess::offsetUnset()

Arguments
$id
int
Output
boolean
success
Details
visibility
public
final
false
static
false

removeMessage

removeMessage(  $id ) : null

delete a message from current box/folder

Arguments
$id
Output
null
Details
visibility
public
final
false
static
false

rewind

rewind( ) : void

Iterator::rewind()

Rewind always gets the new count from the storage. Thus if you use the interfaces and your scripts take long you should use reset() from time to time.

Details
visibility
public
final
false
static
false

seek

seek( int $pos ) : void

SeekableIterator::seek()

Arguments
$pos
int
Details
visibility
public
final
false
static
false
throws

valid

valid( ) : boolean

Iterator::valid()

Output
boolean
Details
visibility
public
final
false
static
false
Documentation was generated by DocBlox.