2017 © Pedro PelĂĄez
 

library core

A set of basic utilities that makes PHP easier to deal with.

image

ogoudat/core

A set of basic utilities that makes PHP easier to deal with.

  • Sunday, October 22, 2017
  • by peterwinnberg
  • Repository
  • 1 Watchers
  • 1 Stars
  • 0 Installations
  • PHP
  • 0 Dependents
  • 0 Suggesters
  • 0 Forks
  • 0 Open issues
  • 2 Versions
  • 0 % Grown

The README.md

Ogöudat's core PHP library

The main goal of Ogöudat's core PHP library is to provide a solid well-tested foundation when working with string manipulation and language processing in PHP., (*1)

Please note that this project is in an early stage and the code is not ready for production use yet., (*2)

Installation

composer require ogoudat/core

Strings

Working with Unicode strings in PHP can be difficult and error prone. The Strang class is an attempt to hide some of that complexity behind an object-oriented interface., (*3)

Characters

Typically, when working with standard string functions like strlen, length means the number of bytes. When using a Strang the length is the number of characters., (*4)

<?php
use Ogoudat\Core\Strang;

// let us assume that the code is UTF-8 encoded
$name = new Strang('Ogöudat');

echo $name->length() . PHP_EOL; // will print 7
echo $name->byteCount() . PHP_EOL; // will print 8

You can get each character as an array of Character objects which has its own set of methods., (*5)

<?php
use Ogoudat\Core\Strang;

// let us assume that the code is UTF-8 encoded
$strang = new Strang('αÎČÎł');

// Will take each character, make it upper case, and print it along with the
// code point for that character.
foreach ($strang->characters() as $character) {
    $c = $character->toUpperCase();
    echo $c . ': ' . $c->codePoint() . PHP_EOL;
}

Coding Style

This project tries to follow the coding style described in PSR-2. Use this section to document things that PSR-2 doesn't cover., (*6)

If you would like to use the PHP Coding Standards Fixer copy the .php_cs.dist configuration file to .php_cs and run php-cs-fixer fix from the project root directory., (*7)

License

This library is licensed under the BSD license. See the LICENSE.md file for details., (*8)

The Versions

22/10 2017

dev-master

9999999-dev

A set of basic utilities that makes PHP easier to deal with.

  Sources   Download

BSD-3-Clause

The Requires

  • php >=7.0
  • ext-iconv *
  • ext-intl *
  • ext-mbstring *
  • ext-pcre *

 

The Development Requires

utf-8 i18n string unicode

19/03 2017

v0.0.1

0.0.1.0

A set of basic utilities that makes PHP easier to deal with.

  Sources   Download

BSD-3-Clause

The Requires

  • php >=7.0
  • ext-iconv *
  • ext-intl *
  • ext-mbstring *
  • ext-pcre *

 

The Development Requires

utf-8 i18n string unicode