IBOS open source
  • Namespace
  • Class

Namespaces

  • application
    • core
      • cache
        • driver
        • provider
      • components
      • controllers
      • engines
        • local
        • sae
      • model
      • modules
      • utils
      • widgets
    • modules
      • article
        • controllers
        • core
        • model
        • utils
      • calendar
        • controllers
        • model
        • utils
      • contact
        • controllers
        • model
        • utils
      • dashboard
        • controllers
        • model
        • utils
      • department
        • components
        • model
        • utils
      • diary
        • components
        • controllers
        • model
        • utils
        • widgets
      • email
        • controllers
        • core
        • model
        • utils
      • main
        • behaviors
        • components
        • controllers
        • model
        • utils
        • widgets
      • message
        • controllers
        • core
          • co
          • wx
            • callback
            • event
        • model
        • utils
      • mobile
        • components
        • controllers
        • utils
      • position
        • components
        • model
        • utils
      • recruit
        • components
        • controllers
        • core
        • model
        • utils
        • widgets
      • role
        • model
        • utils
      • user
        • components
        • controllers
        • model
        • utils
      • vote
        • components
        • controllers
        • model
        • utils
      • weibo
        • controllers
        • core
        • model
        • utils

Classes

  • Email
  • EmailBody
  • EmailFolder
  • EmailWeb

Class Email

CActiveRecord
Extended by application\core\model\Model
Extended by application\modules\email\model\Email
Namespace: application\modules\email\model
Copyright: 2008-2014 IBOS Inc
Author: banyanCheung banyan@ibos.com.cn
Located at system/modules/email/model/Email.php

Methods summary

public static
# model( $className = __CLASS__ )
public
# tableName( )
public array
# fetchPrev( integer $id, integer $uid, integer $fid, integer $archiveId = 0 )

获取上一封邮件

获取上一封邮件

Parameters

$id
当前邮件ID
$uid
当前用户ID
$fid
文件夹ID
$archiveId
存档表ID

Returns

array
public array
# fetchNext( integer $id, integer $uid, integer $fid, integer $archiveId = 0 )

获取下一封邮件

获取下一封邮件

Parameters

$id
当前邮件ID
$uid
当前用户ID
$fid
文件夹ID
$archiveId
存档表ID

Returns

array
public array
# fetchById( integer $id, integer $archiveId = 0 )

查找一条完整的email数据

查找一条完整的email数据

Parameters

$id
邮件索引ID
$archiveId
存档表ID

Returns

array
public
# fetchAllBodyIdByKeywordFromAttach( $keyword, $whereAdd = '1', $queryArchiveId = 0 )
public integer
# setAllRead( integer $uid )

设置指定$uid的邮件为已读

设置指定$uid的邮件为已读

Parameters

$uid
用户ID

Returns

integer
更新的行数
public integer
# setRead( integer $id )

设置指定id的邮件为已读

设置指定id的邮件为已读

Parameters

$id

Returns

integer
更新的行数
public integer
# setField( string $field, mixed $value, string $conditions = '' )

更新email表字段值

更新email表字段值

Parameters

$field
字段名
$value
字段值
$conditions
更新条件

Returns

integer
更新的行数
public
# send( integer $bodyId, array $bodyData, integer $inboxId = application\modules\email\model\BaseController::INBOX_ID, $threadId = 0 )

发送邮件

发送邮件

Parameters

$bodyId
邮件主体ID
$bodyData
邮件主体
$inboxId
收件箱ID
$threadId
public
# recall( $emailIds, $uid )
public integer
# completelyDelete( array $emailIds, $uid, $archiveId = 0 )

彻底删除邮件及其主体

彻底删除邮件及其主体

Parameters

$emailIds
$uid
$archiveId

Returns

integer
删除条数
public array
# fetchAllEmailIdsByFolderId( integer $fid, integer $uid )

根据文件夹id和uid获取邮件ID

根据文件夹id和uid获取邮件ID

Parameters

$fid
文件夹
$uid
用户ID

Returns

array
邮件ID数组
public
# fetchAllByArchiveIds( string $field = '*', mixed $conditions = '', $archiveId = 0, $tableAlias = array( 'e', 'eb' ), $offset = null, $length = null, $order = SORT_DESC, $sort = 'sendtime' )

根据条件搜索指定的一个或者多个邮件表中的邮件

根据条件搜索指定的一个或者多个邮件表中的邮件

Parameters

$field
$conditions
$conditions
$tids 表ID [int][array]
$archiveId
$tableAlias
$offset
$length
$order
$sort

Author

denglh
public array
# fetchAllByListParam( string $operation, integer $uid = 0, integer $fid = 0, integer $archiveId = 0, integer $limit = 10, integer $offset = 0, $subOp = '' )

根据列表查询参数获得列表数据

根据列表查询参数获得列表数据

Parameters

$operation
列表动作
$uid
用户ID
$fid
文件夹ID
$archiveId
存档表ID
$limit
条数
$offset
当前页
$subOp

Returns

array
public integer
# countUnreadByListParam( string $operation, integer $uid = 0, integer $fid = 0, integer $archiveId = 0, $subOp = '' )

根据列表数据获取指定动作未读邮件数

根据列表数据获取指定动作未读邮件数

Parameters

$operation
列表动作
$uid
用户ID
$fid
文件夹ID
$archiveId
存档表ID
$subOp

Returns

integer
统计数
public integer
# countByListParam( string $operation, integer $uid = 0, integer $fid = 0, integer $archiveId = 0, $subOp = '' )

根据列表查询参数统计总数

根据列表查询参数统计总数

Parameters

$operation
列表动作
$uid
用户ID
$fid
文件夹ID
$archiveId
存档表ID
$subOp

Returns

integer
统计数
public array
# getListParam( string $operation, integer $uid = 0, integer $fid = 0, integer $archiveId = 0, $getUnread = false, $subOp = '' )

获取列表查询参数

获取列表查询参数

Parameters

$operation
列表动作
$uid
用户ID
$fid
文件夹ID
$archiveId
存档表ID
$getUnread
$subOp

Returns

array
列表查询参数数组
public boolean|integer
# moveByBodyId( array $emailids, integer $source, integer $target )

debug

debug

Parameters

$emailids
$source
$target

Returns

boolean|integer
public array
# fetchTableIds( )

获取所有存档表的id

获取所有存档表的id

Returns

array
public type
# getSplitSearchContdition( type $conditions )

Parameters

$conditions

Returns

type
public integer
# countBySplitCondition( integer $tableId, string $conditions = '' )

统计分表存档时的数据条数

统计分表存档时的数据条数

Parameters

$tableId
存档表ID
$conditions
附加条件

Returns

integer
统计数目
public array
# fetchAllBySplitCondition( integer $tableId, string $conditions = '', integer $offset = null, integer $limit = null )

查找分表存档的数据列表

查找分表存档的数据列表

Parameters

$tableId
存档表ID
$conditions
附加条件
$offset
页数
$limit
每页多少条

Returns

array
列表数据
public string
# getTableName( integer $tableId = 0 )

根据存档表id获取存档表名

根据存档表id获取存档表名

Parameters

$tableId
存档表id

Returns

string
public array
# getTableStatus( integer $tableId = 0 )

获取指定存档表的状态

获取指定存档表的状态

Parameters

$tableId
存档表id

Returns

array
public boolean
# dropTable( integer $tableId, boolean $force = false )

删除表

删除表

Parameters

$tableId
存档表id
$force
强制删除

Returns

boolean
删除成功与否
public boolean
# createTable( integer $maxTableId )

创建一个表

创建一个表

Parameters

$maxTableId

Returns

boolean

Methods inherited from application\core\model\Model

add(), beforeDelete(), create(), deleteByPk(), fetch(), fetchAll(), fetchAllByAttributes(), fetchAllByPk(), fetchAllSortByPk(), fetchByAttributes(), fetchByPk(), fetchCache(), fetchCaches(), getCacheKey(), getIsAllowCache(), getMaxId(), getModelClass(), init(), modify(), remove(), updateAll(), updateByPk()

Properties summary

Properties inherited from application\core\model\Model

$allowCache, $cacheLife

IBOS open source API documentation generated by ApiGen