2017 © Pedro Peláez
 

yii2-extension yii2-helpers

使用在YII2的一些帮助函数

image

liasica/yii2-helpers

使用在YII2的一些帮助函数

  • Sunday, September 17, 2017
  • by liasica
  • Repository
  • 0 Watchers
  • 1 Stars
  • 44 Installations
  • PHP
  • 2 Dependents
  • 0 Suggesters
  • 1 Forks
  • 0 Open issues
  • 12 Versions
  • 0 % Grown

The README.md

Latest Stable Version Total Downloads Latest Unstable Version [License][4], (*1)

ArrayTOXml Usage

$xml = new ArrayToXML();
print $xml->buildXML($array);

SimpleArrayToXml Usage

$xml = new SimpleArrayToXml($redpack->redpackData);
var_dump($xmlmodel->buildXML());

Curl Usage

1.curl_get

$curl = new Curl($url);
var_dump($curl->Get());

2.curl_post

$curl = new Curl($url);
$curl->setData($data);
var_dump($curl->Post());

3.curl_post_ssl

$certs = [
    CURLOPT_SSLCERT => 'CURLOPT_SSLCERT.pem',
    CURLOPT_SSLKEY  => 'CURLOPT_SSLKEY.pem',
];
$curl = new Curl($url);
$curl->setData($data)->setCerts($certs);
var_dump($curl->postSSL());

Unicode Usage

1.encode

$unicode = new Unicode(null, $unicodeStr);
var_dump($unicode->encode());

2.decode

$unicode = new Unicode($encodeUnicodeStr);
var_dump($unicode->decode());

Radom Usage

1.Generate an radom str

$radom = new Radom();
var_dump($radom->RadomChars(32));

2.Get lottery

$proArr = [1 => 1, 2 => 10, 3 => 40];
$radom = new Radom();
var_dump($radom->lottery($proArr));

Url

1.Get real url

$Url = new Url($uri);
var_dump($Url->realurl());

or, (*2)

$Url = Url::setUri($uri);
var_dump($Url->realurl());

Time

1.Get formated microtime

$Time = new Time();
var_dump($Time->microtime_format);

2. Get timestamp of microtime

$Time = new Time();
var_dump($Time->microtime_float());

The Versions

17/09 2017

dev-master

9999999-dev

使用在YII2的一些帮助函数

  Sources   Download

GPL

The Requires

 

The Development Requires

by Avatar liasica

28/01 2016

1.0.3

1.0.3.0

使用在YII2的一些帮助函数

  Sources   Download

GPL

The Requires

 

The Development Requires

by Avatar liasica

28/01 2016

1.0.2

1.0.2.0

使用在YII2的一些帮助函数

  Sources   Download

GPL

The Requires

 

The Development Requires

by Avatar liasica

28/01 2016

1.0.1

1.0.1.0

使用在YII2的一些帮助函数

  Sources   Download

GPL

The Requires

 

The Development Requires

by Avatar liasica

05/01 2016

1.0.0

1.0.0.0

使用在YII2的一些帮助函数

  Sources   Download

GPL

The Requires

 

The Development Requires

by Avatar liasica

05/01 2016

0.0.7

0.0.7.0

使用在YII2的一些帮助函数

  Sources   Download

GPL

The Requires

 

The Development Requires

by Avatar liasica

05/01 2016

0.0.6

0.0.6.0

使用在YII2的一些帮助函数

  Sources   Download

GPL

The Requires

 

The Development Requires

by Avatar liasica

05/01 2016

0.0.5

0.0.5.0

使用在YII2的一些帮助函数

  Sources   Download

GPL

The Requires

 

The Development Requires

by Avatar liasica

05/01 2016

0.0.4

0.0.4.0

使用在YII2的一些帮助函数

  Sources   Download

GPL

The Requires

 

The Development Requires

by Avatar liasica

05/01 2016

0.0.3

0.0.3.0

使用在YII2的一些帮助函数

  Sources   Download

GPL

The Requires

 

The Development Requires

by Avatar liasica

05/01 2016

0.0.2

0.0.2.0

使用在YII2的一些帮助函数

  Sources   Download

GPL

The Requires

 

The Development Requires

by Avatar liasica

05/01 2016

0.0.1

0.0.1.0

使用在YII2的一些帮助函数

  Sources   Download

GPL

The Requires

 

The Development Requires

by Avatar liasica