Modules/Groupware/Email/Draft/Filter/DraftInput.php
\Conjoon_Modules_Groupware_Email_Draft_Filter_DraftInput
An input-filter class defining all validators and filters needed when processing input data for mutating or creating email drafts.
- Parent(s)
- \Conjoon_Filter_Input < \Zend_Filter_Input
- Author
- Thorsten Suckow-Homberg
- Category
- Filter
- Uses
- \Conjoon_Filter_Input
Constants
string
CONTEXT_CREATE
= 'create'- Inherited_from
- \Conjoon_Filter_Input::CONTEXT_CREATE
- string
string
CONTEXT_UPDATE
= 'update'- Inherited_from
- \Conjoon_Filter_Input::CONTEXT_UPDATE
- string
string
CONTEXT_DELETE
= 'delete'- Inherited_from
- \Conjoon_Filter_Input::CONTEXT_DELETE
- string
string
CONTEXT_RESPONSE
= 'response'- Inherited_from
- \Conjoon_Filter_Input::CONTEXT_RESPONSE
- string
Properties

string
$_context= ''''
''Details- Type
- string
- Inherited_from
- \Conjoon_Filter_Input::$$_context

array
$_dontRecurseFilter= 'array()'
array()Details- Type
- array
- Inherited_from
- \Conjoon_Filter_Input::$$_dontRecurseFilter

array
$_filters= 'array(
'type' => array(),
'format' => array(),
'id' => array(
'Int'
),
'groupwareEmailAccountsId' => array(
'Int'
),
'date' => array(
'Int'
),
'referencesId' => array(
'Int'
),
'groupwareEmailFoldersId' => array(
'Int'
),
'subject' => array(
'Raw'
),
'message' => array(
'Raw'
),
'references' => array(
'Raw'
),
'inReplyTo' => array(
'Raw'
),
'to' => array(
'JsonDecode',
'EmailRecipients'
),
'cc' => array(
'JsonDecode',
'EmailRecipients'
),
'bcc' => array(
'JsonDecode',
'EmailRecipients'
),
'attachments' => array(
'JsonDecode'
),
'removedAttachments' => array(
'JsonDecode',
'PositiveArrayValues'
)
)'
array(
'type' => array(),
'format' => array(),
'id' => array(
'Int'
),
'groupwareEmailAccountsId' => array(
'Int'
),
'date' => array(
'Int'
),
'referencesId' => array(
'Int'
),
'groupwareEmailFoldersId' => array(
'Int'
),
'subject' => array(
'Raw'
),
'message' => array(
'Raw'
),
'references' => array(
'Raw'
),
'inReplyTo' => array(
'Raw'
),
'to' => array(
'JsonDecode',
'EmailRecipients'
),
'cc' => array(
'JsonDecode',
'EmailRecipients'
),
'bcc' => array(
'JsonDecode',
'EmailRecipients'
),
'attachments' => array(
'JsonDecode'
),
'removedAttachments' => array(
'JsonDecode',
'PositiveArrayValues'
)
)Details- Type
- array

array
$_presence= 'array(
self::CONTEXT_CREATE => array(
'format',
'id',
'date',
'referencesId',
'groupwareEmailAccountsId',
'groupwareEmailFoldersId',
'subject',
'inReplyTo',
'references',
'message',
'to',
'cc',
'bcc',
'type',
'attachments',
'removedAttachments'
),
self::CONTEXT_DRAFT => array(
'format',
'id',
'date',
'referencesId',
'groupwareEmailAccountsId',
'groupwareEmailFoldersId',
'subject',
'inReplyTo',
'references',
'message',
'to',
'cc',
'bcc',
'type',
'attachments',
'removedAttachments'
)
)'
An associative array containing all fields which need to be available for each operation. Override this to adjust your filter bahavior.
Example:
$_presence = array( 'update' => array('field1', 'field2', 'field3'), 'create' => array('field4') );
The above array would tell the filter that field1, field2 and field3 have to be available (Meta command PRESENCE) when data is updated (i.e. edited), while only field4 has to be present when data is created.
array(
self::CONTEXT_CREATE => array(
'format',
'id',
'date',
'referencesId',
'groupwareEmailAccountsId',
'groupwareEmailFoldersId',
'subject',
'inReplyTo',
'references',
'message',
'to',
'cc',
'bcc',
'type',
'attachments',
'removedAttachments'
),
self::CONTEXT_DRAFT => array(
'format',
'id',
'date',
'referencesId',
'groupwareEmailAccountsId',
'groupwareEmailFoldersId',
'subject',
'inReplyTo',
'references',
'message',
'to',
'cc',
'bcc',
'type',
'attachments',
'removedAttachments'
)
)Details- Type
- array

array
$_validators= 'array(
'format' => array(
'allowEmpty' => false
),
'type' => array(
'allowEmpty' => false
),
'id' => array(
'allowEmpty' => false,
array('GreaterThan', -2)
),
'date' => array(
'allowEmpty' => false,
array('GreaterThan', 0)
),
'referencesId' => array(
'allowEmpty' => true,
array('GreaterThan', -2)
),
'groupwareEmailAccountsId' => array(
'allowEmpty' => false,
array('GreaterThan', 0)
),
'groupwareEmailFoldersId' => array(
'allowEmpty' => false,
array('GreaterThan', -2)
),
'subject' => array(
'allowEmpty' => true,
'default' => ''
),
'message' => array(
'allowEmpty' => true,
'default' => ''
),
'references' => array(
'allowEmpty' => true,
'default' => ''
),
'inReplyTo' => array(
'allowEmpty' => true,
'default' => ''
),
'to' => array(
'allowEmpty' => true
),
'cc' => array(
'allowEmpty' => true
),
'bcc' => array(
'allowEmpty' => true
),
'attachments' => array(
'Array'
),
'removedAttachments' => array(
'allowEmpty' => true,
array('GreaterThan', 0)
)
)'
array(
'format' => array(
'allowEmpty' => false
),
'type' => array(
'allowEmpty' => false
),
'id' => array(
'allowEmpty' => false,
array('GreaterThan', -2)
),
'date' => array(
'allowEmpty' => false,
array('GreaterThan', 0)
),
'referencesId' => array(
'allowEmpty' => true,
array('GreaterThan', -2)
),
'groupwareEmailAccountsId' => array(
'allowEmpty' => false,
array('GreaterThan', 0)
),
'groupwareEmailFoldersId' => array(
'allowEmpty' => false,
array('GreaterThan', -2)
),
'subject' => array(
'allowEmpty' => true,
'default' => ''
),
'message' => array(
'allowEmpty' => true,
'default' => ''
),
'references' => array(
'allowEmpty' => true,
'default' => ''
),
'inReplyTo' => array(
'allowEmpty' => true,
'default' => ''
),
'to' => array(
'allowEmpty' => true
),
'cc' => array(
'allowEmpty' => true
),
'bcc' => array(
'allowEmpty' => true
),
'attachments' => array(
'Array'
),
'removedAttachments' => array(
'allowEmpty' => true,
array('GreaterThan', 0)
)
)Details- Type
- array
Methods

__construct(
array $data, $context, array $options
=
null
)
:
void
| Name | Type | Description |
|---|---|---|
| $data | array | OPTIONAL |
| $context | ||
| $options | array | OPTIONAL |

_filterRule(
array $filterRule
)
:
voidOverride to consider _dontRecurseFilter - where field names are stored where filters should not be operated on array values.
Inherited from: \Conjoon_Filter_Input::_filterRule()| Name | Type | Description |
|---|---|---|
| $filterRule | array |

process(
)
:
\Zend_Filter_InputOverrides parent implementation by adding a call to _preProcess before the data gets processed.
Inherited from: \Conjoon_Filter_Input::process()| Type | Description |
|---|---|
| \Zend_Filter_Input |
| Exception | Description |
|---|---|
| \Zend_Filter_Exception |