https://github.com/ixnode/php-array-to-object
A PHP array to object converter
https://github.com/ixnode/php-array-to-object
Last synced: 8 months ago
JSON representation
A PHP array to object converter
- Host: GitHub
- URL: https://github.com/ixnode/php-array-to-object
- Owner: ixnode
- License: mit
- Created: 2022-12-31T14:55:02.000Z (over 3 years ago)
- Default Branch: main
- Last Pushed: 2022-12-31T15:13:46.000Z (over 3 years ago)
- Last Synced: 2024-12-27T01:41:39.231Z (over 1 year ago)
- Language: Shell
- Size: 28.3 KB
- Stars: 1
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- Changelog: CHANGELOG.md
- License: LICENSE
Awesome Lists containing this project
README
# PHP Array To Object
[](https://github.com/ixnode/php-array-to-object/releases)
[](https://www.php.net/supported-versions.php)
[](https://phpstan.org/user-guide/rule-levels)
[](https://www.php-fig.org/psr/psr-12/)
[](https://github.com/ixnode/php-array-to-object/blob/master/LICENSE)
> A PHP array to object converter.
## Installation
```bash
composer require ixnode/php-array-to-object
```
```bash
vendor/bin/php-array-to-object -V
```
```bash
php-array-to-object 0.1.0 (12-31-2022 15:51:08) - Björn Hempel
```
## Usage
```php
use Ixnode\PhpArrayToObject\ArrayToObject;
```
```php
$array = [
'backgroundColor' => '255,255,255,100',
'printCalendarWeek' => true,
'printWeekNumber' => true,
'printQrCodeMonth' => true,
'printQrCodeTitle' => true,
'aspectRatio' => 1.414,
'height' => 4000,
];
$backgroundColor = (new ArrayToObject($array))->getBackgroundColor();
```
## Development
```bash
git clone git@github.com:ixnode/php-array-to-object.git && cd php-array-to-object
```
```bash
composer install
```
```bash
composer test
```
## License
This tool is licensed under the MIT License - see the [LICENSE](/LICENSE) file for details