phpDocumentor utility
[ class tree: utility ] [ index: utility ] [ all elements ]

Class: WindPack

Source Location: /utility/WindPack.php

Class WindPack

Constant Summary
STRIP_PHP   利用php自身的函数打包
STRIP_SELF   使用正则打包
STRIP_TOKEN   通过token方式打包

[ Top ]
Method Summary
string   callBack()   回调函数调用
string   getContentBySuffix()   根据文件后缀得取对应的mime内容
string   getContentFromFile()   从文件读取内容
array   getPackList()   取得被打包的文件列表
boolean   packFromDir()   将指定文件类型且指定文件夹下的所指定文件打包成一个易阅读的文件,
boolean   packFromFileList()   将给出的文件列表进行打包
array   readContentFromDir()   从各个目录中取得对应的每个文件的内容
array:   readContentFromFileList()   从文件列表中取得对应的每个文件的内容
void   setContentInjectionCallBack()   设置回调
string   stripComment()   去除注释
string   stripImport()   去除多余的文件导入信息
string   stripNR()   去除换行
string   stripPhpIdentify()   去除php标识
string   stripSpace()   去除空格符
string   stripStrByRule()   根据指定规则替换指定内容中相应的内容
string   stripWhiteSpaceByPhp()   通过php自身方式去除指定文件的注释及空白
string   stripWhiteSpaceBySelf()   通过正则方式去除指定文件的注释及空白
string   stripWhiteSpaceByToken()   通过token方式去除指定文件的注释及空白

[ Top ]
Methods
callBack  [line 382]

  string callBack( string $content, [string $replace = '']  )

回调函数调用

Parameters:
string   $content:  被回调的内容
string   $replace:  替换内容,默认为空

API Tags:
Access:  public


[ Top ]
getContentBySuffix  [line 329]

  string getContentBySuffix( string $content, string $suffix, [string $replace = ' ']  )

根据文件后缀得取对应的mime内容

Parameters:
string   $content:  要打包的内容内容
string   $suffix:  文件后缀类型
string   $replace:  替换的字串,默认为空

API Tags:
Access:  public


[ Top ]
getContentFromFile  [line 306]

  string getContentFromFile( string $filename  )

从文件读取内容

Parameters:
string   $filename:  文件名

API Tags:
Return:  如果给出的文件不是一个有效文件则返回false
Access:  public


[ Top ]
getPackList  [line 296]

  array getPackList( )

取得被打包的文件列表


API Tags:
Access:  public


[ Top ]
packFromDir  [line 54]

  boolean packFromDir( mixed $dir, string $dst, [string $packMethod = WindPack::STRIP_PHP], [boolean $compress = true], [string $absolutePath = ''], [array $ndir = array('.','..','.svn')], [array $suffix = array()], [array $nfile = array()]  )

将指定文件类型且指定文件夹下的所指定文件打包成一个易阅读的文件,

Parameters:
mixed   $dir:  要打包的目录
string   $dst:  文件名
string   $packMethod:  打包方式,默认为stripWhiteSpaceByPhp
boolean   $compress:  是否压缩,默认为true
string   $absolutePath:  文件路径,默认为空
array   $ndir:  不须要打包的目录,默认包括'.', '..', '.svn'三个
array   $suffix:  不允许打包的文件类型,默认为空数组
array   $nfile:  不允许打包的文件,默认为空数组

API Tags:
Access:  public


[ Top ]
packFromFileList  [line 82]

  boolean packFromFileList( mixed $fileList, string $dst, [method $packMethod = WindPack::STRIP_PHP], [boolean $compress = true], [string $absolutePath = '']  )

将给出的文件列表进行打包

Parameters:
mixed   $fileList:  文件列表
string   $dst:  打包文件的存放位置
method   $packMethod:  打包的方式,默认为stripWhiteSpaceByPhp
boolean   $compress:  打包是否采用压缩的方式,默认为true
string   $absolutePath:  文件路径,默认为空

API Tags:
Access:  public


[ Top ]
readContentFromDir  [line 156]

  array readContentFromDir( [string $packMethod = WindPack::STRIP_PHP], [mixed $dir = array()], [string $absolutePath = ''], [array $ndir = array('.','..','.svn')], [array $suffix = array()], [array $nfile = array()]  )

从各个目录中取得对应的每个文件的内容

Parameters:
string   $packMethod:  打包方式,默认为stripWhiteSpaceByPhp
mixed   $dir:  目录名,默认为空数组
string   $absolutePath:  绝对路径名,默认为空
array   $ndir:  不须要打包的目录,默认包括'.', '..', '.svn'三个
array   $suffix:  不允许打包的文件类型,默认为空数组
array   $nfile:  不允许打包的文件,默认为空数组

API Tags:
Access:  public


[ Top ]
readContentFromFileList  [line 191]

  array: readContentFromFileList( mixed $fileList, [method $packMethod = WindPack::STRIP_PHP], [string $absolutePath = ''], [ &$content = array()], array $content  )

从文件列表中取得对应的每个文件的内容

Parameters:
mixed   $fileList:  文件列表
method   $packMethod:  打包方式,默认为stripWhiteSpaceByPhp
string   $absolutePath:  绝对路径名,默认为空
array   $content:  保存文件内容,默认为空数组
   &$content: 

API Tags:
Access:  public


[ Top ]
setContentInjectionCallBack  [line 369]

  void setContentInjectionCallBack( array $contentInjectionCallBack, [string $position = 'before']  )

设置回调

Parameters:
array   $contentInjectionCallBack:  回调函数
string   $position:  调用位置(before|after)默认为before

API Tags:
Access:  public

Information Tags:
Author:  Qiong Wu

[ Top ]
stripComment  [line 221]

  string stripComment( string $content, [mixed $replace = '']  )

去除注释

Parameters:
string   $content:  要去除的内容
mixed   $replace:  要替换的文本

API Tags:
Access:  public


[ Top ]
stripImport  [line 277]

  string stripImport( string $content, [mixed $replace = '']  )

去除多余的文件导入信息

Parameters:
string   $content:  需要处理的内容
mixed   $replace:  用来替换将匹配出来的结果,默认为空

API Tags:
Access:  public


[ Top ]
stripNR  [line 232]

  string stripNR( string $content, [mixed $replace = array('\n','\r\n','\r')]  )

去除换行

Parameters:
string   $content:  要去除的内容
mixed   $replace:  要替换的文本

API Tags:
Access:  public


[ Top ]
stripPhpIdentify  [line 254]

  string stripPhpIdentify( string $content, [mixed $replace = '']  )

去除php标识

Parameters:
string   $content:  需要处理的内容
mixed   $replace:  将php标识替换为该值,默认为空

API Tags:
Access:  public


[ Top ]
stripSpace  [line 243]

  string stripSpace( string $content, [mixed $replace = ' ']  )

去除空格符

Parameters:
string   $content:  要去除的内容
mixed   $replace:  要替换的文本,默认为空

API Tags:
Access:  public


[ Top ]
stripStrByRule  [line 266]

  string stripStrByRule( string $content, string $rule, [$mixed $replace = '']  )

根据指定规则替换指定内容中相应的内容

Parameters:
string   $content:  需要处理的内容
string   $rule:  需要匹配的正则
$mixed   $replace:  用来替换将匹配出来的结果,默认为空

API Tags:
Access:  public


[ Top ]
stripWhiteSpaceByPhp  [line 104]

  string stripWhiteSpaceByPhp( string $filename  )

通过php自身方式去除指定文件的注释及空白

Parameters:
string   $filename:  文件名

API Tags:
Access:  public


[ Top ]
stripWhiteSpaceBySelf  [line 115]

  string stripWhiteSpaceBySelf( string $filename, [boolean $compress = true]  )

通过正则方式去除指定文件的注释及空白

Parameters:
string   $filename:  文件名字
boolean   $compress:  是否采用压缩,默认为true

API Tags:
Access:  public


[ Top ]
stripWhiteSpaceByToken  [line 127]

  string stripWhiteSpaceByToken( string $filename  )

通过token方式去除指定文件的注释及空白

Parameters:
string   $filename:  文件名称

API Tags:
Access:  public


[ Top ]
Constants
STRIP_PHP = 'stripWhiteSpaceByPhp' [line 26]

利用php自身的函数打包


[ Top ]
STRIP_SELF = 'stripWhiteSpaceBySelf' [line 19]

使用正则打包


[ Top ]
STRIP_TOKEN = 'stripWhiteSpaceByToken' [line 33]

通过token方式打包


[ Top ]

Documentation generated on Fri, 30 Mar 2012 11:43:38 +0800 by phpDocumentor 1.4.4