StringFacade.php 1.1 KB

123456789101112131415161718192021222324252627282930
  1. <?php
  2. declare(strict_types=1);
  3. namespace app\facade;
  4. use think\Facade;
  5. /**
  6. * @see \app\utils\StringUtils
  7. * @package app\facade
  8. * @mixin \app\utils\StringUtils
  9. * @method static bool startsWith(string $string, string $subString) 判断$string开头是否包含$subString
  10. * @method static bool endsWith(string $string, string $subString) 判断$string末尾是否包含$subString
  11. * @method static string camelizeFirstOn(string $string, $separator = '_') 下划线转驼峰(首字母大写)
  12. * @method static string camelize(string $string, $separator = '_')下划线转驼峰(首字母小写)
  13. * @method static string uncamelize($camelCaps, $separator = '_') 驼峰命名转下划线命名
  14. * @method static string generate_stochastic_string(int $length = 16) 生成随机字符串
  15. */
  16. class StringFacade extends Facade
  17. {
  18. /**
  19. * 获取当前Facade对应类名(或者已经绑定的容器对象标识)
  20. * @access protected
  21. * @return string
  22. */
  23. protected static function getFacadeClass()
  24. {
  25. return 'app\utils\StringUtils';
  26. }
  27. }