2017 © Pedro Peláez
 

library sav-util

image

savphp/sav-util

  • Sunday, April 15, 2018
  • by jetiny
  • Repository
  • 1 Watchers
  • 0 Stars
  • 39 Installations
  • PHP
  • 2 Dependents
  • 0 Suggesters
  • 0 Forks
  • 0 Open issues
  • 3 Versions
  • 70 % Grown

The README.md

sav-util

sav util for php, (*1)

Build Status Build Status License Latest Stable Version Code Climate Coverage Status Coveralls Coverage Status, (*2)

CaseConvert


use SavUtil\CaseConvert; CaseConvert::convert('camel', 'HelloWorld'); // helloWorld CaseConvert::convert('pascal', 'Hello-World'); // HelloWorld CaseConvert::convert('snake', 'HelloWorld'); // hello_world CaseConvert::convert('hyphen', 'HelloWorld'); // hello-world // same as above CaseConvert::pascalCase('HelloWorld'); CaseConvert::pascalCase('Hello-World'); CaseConvert::snakeCase('HelloWorld'); CaseConvert::hyphenCase('HelloWorld');

DateTime


use SavUtil\DateTime; DateTime::localTime(); DateTime::utcTime(); DateTime::localToUtc(); DateTime::utcToLocal();

Request


use SavUtil\Request; $res = Request::fetch('http://example.com'); $res->status == 200; is_array($res->headers); is_string($res->response); Request::fetch(array( 'url' => 'http://example.com', 'data' => array(), 'headers' => array(), 'options' => array( // default Options 'timeout' => 10, 'connect_timeout' => 10, 'useragent' => 'curl', // ua 'type' => 'GET', // method 'dataType' => '', // empty|json 'assoc' => true, // json assoc array 'filename' => false, // save file 'verify' => false, // ssl verify 'verifyname' => false, // ssl verifyname ), )); Request::fetchAll(array( "requestA" => array( "url" => 'http://example.com', "headers" => array(), "data" => array(), "options" => array(), ), "requestB" => array( "url" => 'http://example.com', "headers" => array(), "data" => array(), "options" => array(), ), ), array( "timeout" => 20, ));

The Versions

15/04 2018

dev-master

9999999-dev

  Sources   Download

MIT

The Requires

  • php ^5.5 || ^7.0

 

The Development Requires

by Avatar jetiny

15/04 2018

1.0.2

1.0.2.0

  Sources   Download

MIT

The Requires

  • php ^5.5 || ^7.0

 

The Development Requires

by Avatar jetiny

21/03 2018

1.0.1

1.0.1.0

  Sources   Download

MIT

The Requires

  • php ^5.5 || ^7.0

 

The Development Requires

by Avatar jetiny