als/utils
Composer 安装命令:
composer require als/utils
包简介
Utils Component.
README 文档
README
Набор классов из пакета Lib.
Включает в себя:
########################################################################### # cut trailing and leading chars $sChars (whitespaces by default) for $sText @trim[sText;sChars] ########################################################################### # print link to $sURI with attributes $uAttr (string or hash) if $sURI specified, otherwise just print $sLabel @href[sURI;sLabel;uAttr] ########################################################################### # set location header for redirecting to $sURI and prevent caching # $.bExternal option makes redirect @location[sURI;hParam] ########################################################################### # check email format @isEmail[sEmail] ########################################################################### # print $iNum as a binary string @dec2bin[iNum;iLength] ########################################################################### # makes hash of tables from $tData. if $sKeyColumn is not specified 'parent_id' will be used @createTreeHash[tData;sKeyColumn] ########################################################################### # print number. options $.iFracLength, $.sThousandDivider and $.sDecimalDivider are available @numberFormat[dNumber;hParam] ########################################################################### # looks over hash elements in specified order @foreach[hHash;sKeyName;sValueName;jCode;sSeparator;sDirection] ########################################################################### # returns hash with parser version @getParserVersion[] ########################################################################### # every odd call returns $sColor1, every even - $sColor2, without parameters - reset sequence @color[sColor1;sColor2] ########################################################################### # creates 2-levels hash @create2LevelHash[uData;sField1;sField2]
########################################################################### # print $xDoc as string without DOCTYPE and XML declaration @toString[xDoc]
############################################################ # print $xNode as string @toString[xNode;sRootTag] ############################################################ # print $xNode VALUE as string: <aaa><bbb>ccc</bbb></aaa> => "<bbb>ccc</bbb>" @valueToString[xNode;sRootTag] ############################################################ # go through all nodes in $hNodeList and execute $jCode @foreach[hNodeList;hNodeName;sNode;sAttr;jCode;sSeparator] ############################################################ # go through all children for $xParent and execute $jCode @foreachChild[xParent;hNodeName;sNode;sAttr;jCode;sSeparator] ############################################################ # get children of $xParent as hash @getChildren[xParent;hNodeName]
Installation
$ composer require als/utils
References
- Bugs and feature request are tracked on GitHub
统计信息
- 总下载量: 7
- 月度下载量: 0
- 日度下载量: 0
- 收藏数: 0
- 点击次数: 0
- 依赖项目数: 0
- 推荐数: 0
其他信息
- 授权协议: MIT
- 更新时间: 2021-02-24