承接 idevlab/essential 相关项目开发

从需求分析到上线部署,全程专人跟进,保证项目质量与交付效率

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

idevlab/essential

最新稳定版本:1.8.0

Composer 安装命令:

composer require idevlab/essential

包简介

All the methods and tools useful for the development of the various idevlab projects.

README 文档

README

Auteur Release Codacy grade License Téléchargement

Many PHP functions used in my projects, that you can use in your developments.

Authors

@fsinama

Installation

Install in your project with composer.

  composer require idevlab/essential

Methods

Array

i_array_merge(array...$arrays): array

Merge array

/** @var array $foo */
$foo = ['one' => 1, 'three' => 3];

/** @var array $bar */
$bar = ['two' => 2];

$foo = i_array_merge($foo, $bar); // ['one' => 1, 'three' => 3, 'two' => 2]}

String

str_to_snake_case(string $string): string

Format a string in snake_case.

/** @var string $foo */
$foo = 'Test_DeChaine';

$foo = str_to_snake_case($foo); // test_de_chaine

str_to_pascal_case(string $string): string

Format a string in PascalCase.

/** @var string $foo */
$foo = 'Test_DeChaine';

$foo = str_to_pascal_case($foo); // TestDeChaine

str_to_skewer_case(string $string): string

Format a string in skewer-case.

/** @var string $foo */
$foo = 'Test_DeChaine';

$foo = str_to_skewer_case($foo); // test-de-chaine

str_to_no_case(string $string): string

Format a string in no case.

/** @var string $foo */
$foo = 'Test_DeChaine';

$foo = str_to_no_case($foo); // test de chaine

str_to_case(string $string): string

Format a string in no case.

/** @var string $foo */
$foo = 'Test_DeChaine';

// NO : 0
// PASCAL : 1
// CAMEL : 2
// SKEWER : 3
// SNAKE : 4

$foo = str_to_case($foo,1); // test de chaine

JSON

i_json_serialize(object $object, string ...$excludes): array

Serialize a object you.


class Foo {
    public string $bar = 'purple';
    public string $other = 'exclude value';
}

$foo = new Foo();

$foo = i_json_serialize($foo,['other']); // { 'bar' => 'purple' }

Date

i_random_date(DateTime $start, ?DateTime $end = new DateTime('now')): DateTime

Find a random date between $start and $end

License

GPL3 or later

统计信息

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

GitHub 信息

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

其他信息

  • 授权协议: GPL-3.0-or-later
  • 更新时间: 2022-10-11

承接程序开发

PHP开发

VUE

Vue开发

前端开发

小程序开发

公众号开发

系统定制

数据库设计

云部署

网站建设

安全加固