Skip to content

Commit

Permalink
v1.0.0
Browse files Browse the repository at this point in the history
First commit.
  • Loading branch information
Maikuolan committed Feb 28, 2019
0 parents commit 19df4f3
Show file tree
Hide file tree
Showing 7 changed files with 1,111 additions and 0 deletions.
4 changes: 4 additions & 0 deletions .gitattributes
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
# Refer to:
# https://help.github.com/articles/dealing-with-line-endings/

* text eol=lf
16 changes: 16 additions & 0 deletions Changelog.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
Common classes package changelog.

=== VERSIONING GUIDELINES ===
The common classes package adheres to the SemVer guidelines for versioning.

Versioning guidelines for SemVer can be found at: https://semver.org/

=== Changes made since last versioned release ===

(none)

=== Version/Release 1.0.0 ===
FIRST TAGGED RELEASE.

Caleb M (Maikuolan),
February 28, 2019.
340 changes: 340 additions & 0 deletions LICENSE.txt

Large diffs are not rendered by default.

48 changes: 48 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,48 @@
[![PHP >= 5.4.0](https://img.shields.io/badge/PHP-%3E%3D%205.4.0-8892bf.svg)](https://maikuolan.github.io/Compatibility-Charts/)
[![License: GPL v2](https://img.shields.io/badge/License-GPL%20v2-blue.svg)](https://www.gnu.org/licenses/old-licenses/gpl-2.0.en.html)

## 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:
- **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](https://www.php-fig.org/psr/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:

- to do -

---


### Other information:

#### Licensing:
Provided using the [GNU General Public License version 2.0](https://github.com/CIDRAM/Aggregator/blob/master/LICENSE.txt) (GPLv2).

#### For support:
Please use the issues page of this repository.

---


Last Updated: 28 February 2019 (2019.02.28).
19 changes: 19 additions & 0 deletions composer.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
{
"name": "maikuolan/common",
"description": "Common classes package. Contains some common classes written for CIDRAM, phpMussel, etc, available for additional use elsewhere via this package.",
"keywords": ["classes","common","php","yaml","l10n"],
"license": "GPL-2.0-or-later",
"support": {
"issues": "https://github.com/Maikuolan/Common/issues",
"source": "https://github.com/Maikuolan/Common"
},
"require": {
"php": ">=5.4.0",
"ext-pcre": "*"
},
"autoload": {
"psr-4": {
"Maikuolan\\Common\\": "src/"
}
}
}
Loading

0 comments on commit 19df4f3

Please sign in to comment.