承接 kshabazz/slib 相关项目开发

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

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

kshabazz/slib

最新稳定版本:3.0.1

Composer 安装命令:

composer require kshabazz/slib

包简介

A collection of useful functions to aid developing.

README 文档

README

CircleCI

This is a library with some tools to aid in performing common task.

Examples:

How to use the HttpClient object to make an HTTP Request

<?php

use \Kshabazz\Slib\HttpClient;

// Initialize a new HTTP client object.
$httpClient = new HttpClient();
$url = 'http://www.example.com';

// Set headers
// Please note that the same header can be set multiple times, just like in the HTTP RFC.
$httpClient->setHeaders([
    'Content-Type: application/json; charset=utf-8',
    'Custom-Header: custom value',
]);

// Make a request and check the response.
$httpClient->send( $url );
$responseCode = $http->responseCode();
if ( $responseCode === 200 ) {
    echo $httpClient->responseBody();

} else { // DEBUG
    // Show what was sent in the last request.
    var_dump( $httpClient->lastRequest() );
    
    // Show the response headers.
    var_dump( $httpClient->responseHeaders() );
}
?>

Functions

<?php
echo \Kshabazz\Slib\camelCase( 'test-me' );
// Output:
TestMe

echo \Kshabazz\Slib\camelCase( 'test-me', TRUE );
// Output:
testMe
?>

统计信息

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

GitHub 信息

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

其他信息

  • 授权协议: Unknown
  • 更新时间: 2015-03-31