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 Upgrade

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

Methods summary

public static array
# fetchUpdateFileList( array $upgradeInfo )

获取更新文件列表

获取更新文件列表

Parameters

$upgradeInfo
版本信息

Returns

array
array('file'=>文件名列表, 'md5'=>每个文件对应的md5码)
public static array
# compareBasefile( array $upgradeFileList, array $upgradeFileList,… )

对比文件,筛选出需要更新的文件列表

对比文件,筛选出需要更新的文件列表

Parameters

$upgradeFileList
$upgradeInfo 更新信息
$upgradeFileList,…
需要更新的文件列表

Returns

array
array(需要更新的文件列表, 不需要更新的文件列表)(仅仅返回要修改的文件,不在返回数组里面的是新增的文件)
public static boolean
# checkUpgrade( )

检查更新信息,这些信息将被记录在setting中的upgrade中

检查更新信息,这些信息将被记录在setting中的upgrade中

Returns

boolean
public static type
# getVersionPath( )

获取更新版本路径

获取更新版本路径

Returns

type
public static boolean
# compareFileContent( string $file, string $remoteFile )

对比文件内容

对比文件内容

Parameters

$file
$remoteFile

Returns

boolean
public static boolean|integer
# downloadFile( array $upgradeInfo, string $file, string $folder = 'upload', string $md5 = '', integer $position = 0, integer $offset = 0 )

下载文件

下载文件

Parameters

$upgradeInfo
更新信息
$file
文件名(包括目录名)
$folder
目录名,此目录名并不是指本地,而是官方服务器的目录
$md5
md5码
$position
$position 文件指针,指定文件指针后,下载器将从这个指针开始下载
$offset
$offset 指定本文内容长度,仅仅检验下载文件的长度是否和$offset相等,如果相等将不执行md5检验

Returns

boolean|integer
0 md5检验失败 1 断点文件下载成功 2 md5检验成功(文件完全下载完成才会进行)
public static boolean
# copyFile( string $srcFile, string $desFile, string $type )

复制文件

复制文件

Parameters

$srcFile
来源文件
$desFile
目标文件
$type
复制的类型,是直接复制还是使用ftp

Returns

boolean
复制成功与否
public static string
# getStepName( integer $step )

获得更新步骤名称,用于断点更新

获得更新步骤名称,用于断点更新

Parameters

$step
步骤 1:获取更新文件 2:下载更新 3:本地文件对比 4:正在更新

Returns

string
返回步骤名
public static
# recordStep( integer $step )

记录更新步骤

记录更新步骤

Parameters

$step
第几步

Constants summary

string UPGRADE_URL

更新地址

更新地址

# 'http://ibosupgrade.oss-cn-hangzhou.aliyuncs.com/'

Properties summary

public static string $locale

本地代号

本地代号

# 'SC'
public static string $charset

升级编码

升级编码

# 'UTF8'
IBOS open source API documentation generated by ApiGen