定制 spaf/yii2-simputils 二次开发

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

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

spaf/yii2-simputils

Composer 安装命令:

composer require spaf/yii2-simputils

包简介

Yii2 extension wrap for php-simputils, some useful wraps that improve usage

README 文档

README

Yii2 extension wrap for php-simputils, some useful wraps that improve usage

Current condition

This version is initial wrapper-library for usage with Yii2 framework.

Basically it implements just an improvement of VarDumper capabilities for "pd()" procedure. All other functionality will be added later.

P.S. This version I have developed just for myself. Because my php-simputils is not ready as well. But you are welcome to suggest things/functionality for both. Documentation will be improved as well.

Basic Usage

Install it through composer:

composer require spaf/yii2-simputils "*"

Add this to your yii2 config file for console.php:

<?php
$config = [
//  ...
    'bootstrap' => [
	    [
	    	'class' => 'spaf\yii\simputils\bootstrap\SimputilsBootstrap',
		    'isConsole' => true,
	    ]
    ],
//  ...
];

And add this one for web.php:

<?php
$config = [
//  ...
    'bootstrap' => [
	    [
	    	'class' => 'spaf\yii\simputils\bootstrap\SimputilsBootstrap',
	    ]
    ],
//  ...
];

And that's it! Now you can use the wrapped functionality (currently only pd() procedure).

In your code you can use now:

<?php

use function spaf\simputils\basic\pd;

$myVar = [
    'key1' => 'value1',
    'key2' => [
        'subkey1' => 'subvalue1',
        'subkey2' => 12
    ],
];

pd($myVar);

Important: You need to use normal pd() procedure, this library does not redefine it, but adjust it's behaviour.

统计信息

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

GitHub 信息

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

其他信息

  • 授权协议: MIT
  • 更新时间: 2021-09-18

承接程序开发

PHP开发

VUE

Vue开发

前端开发

小程序开发

公众号开发

系统定制

数据库设计

云部署

网站建设

安全加固