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

  • Api
  • ApiCode
  • Attach
  • Cache
  • Cloud
  • Convert
  • Credit
  • Database
  • DateTime
  • Env
  • File
  • Ftp
  • IBOS
  • Image
  • Mail
  • Module
  • Org
  • Page
  • PHPExcel
  • String
  • System
  • Upgrade
  • Url
  • WebSite
  • Xml
  • XMLParse

Class Attach

Namespace: application\core\utils
Copyright: Copyright © 2012-2013 IBOS Inc
Author: banyanCheung banyan@ibos.com.cn
Located at system/core/utils/Attach.php

Methods summary

public static
# getCommonImgExt( )
public static array
# getUploadConfig( integer $uid = 0 )

获取上传配置数组

获取上传配置数组

Parameters

$uid
指定用户ID

Returns

array
public static integer
# getTableId( integer $relatedId )

根据当前的关联id自动分配附件所属表id,只能为attachment0-9

根据当前的关联id自动分配附件所属表id,只能为attachment0-9

Parameters

$relatedId
关联内容id

Returns

integer
生成的附件所属表id
public static boolean
# updateAttach( mixed $aid, integer $relateId = 0 )

全局更新附件函数,主要是把未使用的附件表的数据更新到分配好的附件表里去

全局更新附件函数,主要是把未使用的附件表的数据更新到分配好的附件表里去

Parameters

$aid
单个附件ID字符串或数组
$relateId
关联的内容ID

Returns

boolean

Since

IBOS1.0
public static integer
# delAttach( mixed $aid )

删除指定的附件

删除指定的附件

Parameters

$aid
附件id

Returns

integer
$count 删除的个数

Author

wwb
public static string
# getAttachStr( integer $aid, integer $tableId = '', array $param = array() )

输出下载字符串

输出下载字符串

Parameters

$aid
附件id
$tableId
附件所属表id
$param
额外参数,这些是可以提交到下载处理页处理的数据

Returns

string

Since

IBOS1.0
public static array
# getAttachData( mixed $aid, boolean $filterUnused = true )

获取已转存的附件数据

获取已转存的附件数据

Parameters

$aid
字符串或数组
$filterUnused
是否过滤未使用附件

Returns

array
public static array
# getAttach( mixed $aid, boolean $down = true, boolean $officeDown = true, boolean $edit = false, boolean $delete = false, boolean $getRealAddress = false )

获取处理过后的附件信息,一般用于展示

获取处理过后的附件信息,一般用于展示

Parameters

$aid
附件ID,字符串或数组
$down
是否允许下载
$officeDown
是否允许文档附件下载
$edit
若文档允许下载,是否允许编辑
$delete
是否允许删除
$getRealAddress
是否返回真实附件地址

Returns

array

Since

IBOS1.0
public static mixed
# attachType( mixed $type, string $returnVal = 'smallicon' )

附件类型,返回类型图片链接或类型ID

附件类型,返回类型图片链接或类型ID

Parameters

$type
附件类型
$returnVal
返回类型

Returns

mixed

Since

IBOS1.0
public static
# localBatchDownload( mixed $aIds, $downloadName = '' )

本地批量下载 (打包为zip)

本地批量下载 (打包为zip)

Parameters

$aIds
$downloadName

Constants summary

string ICON_PATH
# 'static/image/filetype/'
IBOS open source API documentation generated by ApiGen