定制 estasi/filter 二次开发

按需修改功能、优化性能、对接业务系统,提供一站式技术支持

邮箱:yvsm@zunyunkeji.com | QQ:316430983 | 微信:yvsm316

estasi/filter

Composer 安装命令:

composer require estasi/filter

包简介

Filtering and normalizing data and files

README 文档

README

This is a set of frequently used, unchangeable filters that are required. Provides a simple data filtering chain that allows you to apply multiple filters in the specified order.

Installation

To install with a composer:

composer require estasi/filter

Requirements

  • PHP 7.4 or newer
  • ext-mbstring
  • ext-intl
  • Data Structures: composer require php-ds/php-ds
    Polyfill is installed with the estasi/filter package.

Usage

Basic usage

<?php

declare(strict_types=1);

use Estasi\Filter\CamelCase;

$filter = new CamelCase();

echo $filter->filter('camel case'); // camelCase
// or 
echo $filter('camel_case'); // camelCase

Chain

Here are two filters tasks in the chain: explicitly (by class declaration) and via the factory (array):

<?php

declare(strict_types=1);

use Estasi\Filter\{Chain,Trim};

$string = ' camel case string   ';

$chain = new Chain(Chain::DEFAULT_PLUGIN_MANAGER, 'trim', 'camelCase');

// the same thing
$chain = new Chain();
$chain = $chain->attach(new Trim())
               ->attach([Chain::FILTER_NAME => 'camelCase']); // or attach('camelCase')

echo $chain->filter($string); // "camelCaseString"

License

All contents of this package are licensed under the BSD-3-Clause license.

统计信息

  • 总下载量: 0
  • 月度下载量: 0
  • 日度下载量: 0
  • 收藏数: 0
  • 点击次数: 0
  • 依赖项目数: 3
  • 推荐数: 0

GitHub 信息

  • Stars: 0
  • Watchers: 1
  • Forks: 0
  • 开发语言: PHP

其他信息

  • 授权协议: BSD-3-Clause
  • 更新时间: 2020-05-20

承接程序开发

PHP开发

VUE

Vue开发

前端开发

小程序开发

公众号开发

系统定制

数据库设计

云部署

网站建设

安全加固