anklimsk/cakephp-basic-functions

CakePHP 2.x 应用程序的全局基本工具

v1.0.2 2019-11-30 21:32 UTC

This package is auto-updated.

Last update: 2024-09-29 05:21:15 UTC


README

Build Status Coverage Status Latest Stable Version License

CakePHP 应用程序的全局基本工具

此插件提供以下功能

  • 使用 constsToWords() 获取具有名称的常量值数组;
  • 使用 constsVals() 根据前缀获取常量值数组;
  • 使用 constValToLcSingle() 根据前缀和值获取常量名称;
  • 使用域名 translArray() 翻译数组值;
  • 使用 mb_ucfirst() 获取首字母大写的字符串;
  • 使用 isGuid() 检查字符串是否为GUID;
  • 使用 GuidToString() 从二进制字符串LDAP获取可读GUID;
  • 使用 GuidStringToLdap() 从可读GUID字符串获取LDAP查询的GUID;
  • PHP函数 str_pad() 的类似物,用于使用unicode mb_str_pad()
  • 使用 unichr() 通过其代码获取unicode字符;
  • 使用 isAssoc() 检查数组是否是零索引和顺序的;
  • 使用 isBinary() 检查字符串是否是二进制的;
  • 获取UI当前语言的详细信息并进行转换。

安装

  1. 使用composer安装插件: composer require anklimsk/cakephp-basic-functions

  2. 将以下行添加到文件末尾 app/Config/bootstrap.php

    CakePlugin::load('CakeBasicFunctions', ['bootstrap' => true]);

使用

使用此插件