mirror of
https://github.com/wiosna-dev/common-library.git
synced 2026-03-12 01:31:45 +01:00
39 lines
794 B
Markdown
39 lines
794 B
Markdown
# 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!
|