2017 © Pedro Peláez
 

library php-helper

Simple php helper classes and functions.

image

owja/php-helper

Simple php helper classes and functions.

  • Monday, July 31, 2017
  • by hbroer
  • Repository
  • 1 Watchers
  • 0 Stars
  • 31 Installations
  • PHP
  • 1 Dependents
  • 0 Suggesters
  • 0 Forks
  • 0 Open issues
  • 2 Versions
  • 0 % Grown

The README.md

OWJA! PHP Helper

Latest Stable Version License Build Status, (*1)

This Package is Open Source and under MIT license., (*2)

A few little Helper., (*3)

Installation

$ composer require owja/php-helper

Classes

\Owja\Helper\Data


$sampleData = [ 'some' => [ 'value' => 'example', 'othervalue' => new class { public function getSomething() { return 'else'; } } ] ]; $data = new \Owja\Helper\Data($sampleData); // $example = 'example'; $example = $data->get('some.value'); // $somethingElse = 'else'; $somethingElse = $data->get('some.othervalue.something'); // $null = null $null = $data->get('this.does.not.exist');

\Owja\Helper\Random


// $randomString = Random String with 128 alphanummeric Chars $randomString = (string) new \Owja\Helper\Random(128); // $randomString = Random String with 64 Numbers $randomString = (string) new \Owja\Helper\Random(64, \Owja\Helper\Random::NUMBERS); // Alternative $rnd = new \Owja\Helper\Random(); $randomString64Chars = $rnd->generate(64); $randomString64Numbers = $rnd->generate(64, \Owja\Helper\Random::NUMBERS); $randomString256Hex = $rnd->generate(256, \Owja\Helper\Random::HEX);
Predefined Pools
\Owja\Helper\Random::ALNUM     = '0123456789abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ';
\Owja\Helper\Random::ALPHA     = 'abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ';
\Owja\Helper\Random::HEX       = '0123456789abcdef';
\Owja\Helper\Random::NUMBERS   = '0123456789';

\Owja\Helper\Random::ALNUM is the default pool, (*4)

License

This bundle is under the MIT license., (*5)

The Versions

31/07 2017

dev-master

9999999-dev

Simple php helper classes and functions.

  Sources   Download

MIT

The Requires

  • php >=7.0.0

 

The Development Requires

by Hauke Broer

php helper

31/07 2017

1.0.0

1.0.0.0

Simple php helper classes and functions.

  Sources   Download

MIT

The Requires

  • php >=7.0.0

 

The Development Requires

by Hauke Broer

php helper