mirror of
https://github.com/wiosna-dev/common-library.git
synced 2026-03-12 01:31:45 +01:00
First, initial commit
This commit is contained in:
38
README.md
Normal file
38
README.md
Normal file
@@ -0,0 +1,38 @@
|
||||
# Meritoo Common Library
|
||||
Useful classes, methods, extensions etc.
|
||||
|
||||
## Installation
|
||||
|
||||
#### Composer
|
||||
|
||||
1. Open ```composer.json``` and add address of repository in ```repositories``` section:
|
||||
|
||||
```json
|
||||
"repositories": [
|
||||
{
|
||||
"type": "vcs",
|
||||
"url": "git@github.com:meritoo/common-library.git"
|
||||
}
|
||||
]
|
||||
```
|
||||
|
||||
2. Run [Composer](https://getcomposer.org) to install new package:
|
||||
|
||||
```bash
|
||||
$ composer require meritoo/common-library
|
||||
```
|
||||
|
||||
> How to install Composer: https://getcomposer.org/download
|
||||
|
||||
## Usage
|
||||
|
||||
This package contains a lot of static methods, so usage is not so complicated. Just run the static method who would you like to use. Example:
|
||||
|
||||
```php
|
||||
use Meritoo\Common\Utilities\Arrays;
|
||||
|
||||
$firstElement = Arrays::getFirstElement(['lorem' 'ipsum']);
|
||||
// result: "lorem"
|
||||
```
|
||||
|
||||
Enjoy!
|
||||
Reference in New Issue
Block a user