PHP Classes
elePHPant
Icontem

PHP Common Class Library: Set of classes that provides common functionality

Recommend this page to a friend!
  Info   View files Documentation   View files View files (18)   DownloadInstall with Composer Download .zip   Reputation   Support forum   Blog    
Last Updated Ratings Unique User Downloads Download Rankings
2019-06-23 (29 days ago) RSS 2.0 feedNot yet rated by the usersTotal: 76 This week: 2All time: 9,392 This week: 174Up
Version License PHP version Categories
common 1.0.0The PHP License7Localization, Databases, Text processing, L..., C..., P...
Description Author

This package provides a set of classes that provides common functionality.

It provides several classes that provide different types of functionality that is useful for many types of PHP applications. Currently it provides:

- A class for caching class that can store data either in files, a database using PDO, MemCached, APC and Redis
- A complex string handling class
- Manipulate text strings that may be in different character set encodings
- Manipulate locale sensitive data types like strings, integers and fractions
- Parse configuration strings in YAML format

Recommendations

Detect file encoding and convert it to UTF-8 without BOM
I am unable to detect file encoding, that needs to be converted

Name: Caleb <contact>
Classes: 2 packages by
Country: Australia Australia
Age: ???
All time rank: 411948 in Australia Australia
Week rank: 164 Up5 in Australia Australia Up

 

Details

v1: PHP >= 5.4.0 v2: PHP >= 7.2.0 License: GPL v2

Common Classes Package.

The common classes package is intended to provide some of the classes that I originally wrote for common use by CIDRAM, phpMussel, etc as a separate, redistributable package, available to be readily integrated and used with other projects and packages via Composer.

All classes in the common classes package use the namespace Maikuolan\Common.

The common classes package currently contains the following classes: - Cache: A simple, unified cache handler used by CIDRAM and phpMussel for their caching needs. Currently, it supports APCu, Memcached, Redis, PDO, and flatfile caching. - ComplexStringHandler: The complex string handler class provides an easy way to iterate over the parts of a given string, identified by a given pattern, in order to execute a given closure to those parts of the given string, or to the glue that separates those parts. - Demojibakefier: Intended to normalise the character encoding of a given string to a preferred character encoding when the given string's byte sequences don't match the expectations of the preferred character encoding. Useful in cases where a block of data might conceivably be composed of several different unspecified, unknown encodings. - L10N: Used by CIDRAM and phpMussel to handle L10N data, the L10N class reads in an array of L10N strings and provides some safe and simple methods for manipulating and returning those strings when needed, and for handling cardinal plurals, where integers and fractions are concerned alike, based upon the pluralisation rules specified by the L10N from a range of various pluralisation rules available, to be able to suit the needs of most known languages. - YAML: Used by CIDRAM and phpMussel to handle YAML data, the YAML class is a simple YAML handler intended to adequately serve the needs of the packages and projects where it is implemented. Note however, that isn't a complete YAML solution, instead supporting the YAML specification only to the bare minimum required by those packages and projects known to implement it, and I therefore can't guarantee that it'll necessarily be an ideal solution for other packages and projects, whose exact requirements I mightn't be familiar with.

How to install:

The recommended way to install it is by using Composer:

composer require maikuolan/common

You can, however, download the classes you need from this repository manually, if you want to do so.

After you've downloaded the package, or any needed classes, PSR-4 autoloading is preferred way to access the classes (particularly if you're using a large number of different, unrelated classes). If you're installing the package via Composer, all you have to do is require_once 'vendor/autoload.php'; and everything will be taken care of. Alternatively, if you're installing the package or its classes manually (or without Composer), or if you don't want to use a PSR-4 autoloader, you can simply require or include any needed classes into your projects by using an include or require statement in your code, to point to the needed classes in any PHP code that needs them.

How to use:

Other information:

Licensing:

Provided using the GNU General Public License version 2.0 (GPLv2).

For support:

Please use the issues page of this repository.

For contributors:

[\[CONTRIBUTING.md\] Want to help?](https://github.com/Maikuolan/Common/blob/v2/CONTRIBUTING.md)

Last Updated: 11 May 2019 (2019.05.11).

  Files folder image Files  
File Role Description
Files folder imagesrc (5 files)
Files folder imagetests (1 file)
Files folder image_docs (5 files)
Accessible without login Plain text file .travis.yml Data Auxiliary data
Accessible without login Plain text file Changelog.txt Doc. Documentation
Accessible without login Plain text file composer.json Data Auxiliary data
Accessible without login Plain text file CONTRIBUTING.md Data Auxiliary data
Accessible without login Plain text file LICENSE.txt Doc. Documentation
Accessible without login Plain text file phpunit.xml.dist Data Auxiliary data
Accessible without login Plain text file README.md Doc. Documentation

  Files folder image Files  /  src  
File Role Description
  Plain text file Cache.php Class Class source
  Plain text file ComplexStringHandler.php Class Class source
  Plain text file Demojibakefier.php Class Class source
  Plain text file L10N.php Class Class source
  Plain text file YAML.php Class Class source

  Files folder image Files  /  tests  
File Role Description
  Plain text file L10NTest.php Class Class source

  Files folder image Files  /  _docs  
File Role Description
  Accessible without login Plain text file Cache.md Data Auxiliary data
  Accessible without login Plain text file ComplexStringHandler.md Example Example script
  Accessible without login Plain text file Demojibakefier.md Example Example script
  Plain text file L10N.md Class Class source
  Accessible without login Plain text file YAML.md Example Example script

 Version Control Unique User Downloads Download Rankings  
 100%
Total:76
This week:2
All time:9,392
This week:174Up