Ecosyste.ms: Awesome

An open API service indexing awesome lists of open source software.

Awesome Lists | Featured Topics | Projects

https://github.com/pmmp-plugins-of-sky-min/dataconfig

pmmp virion
https://github.com/pmmp-plugins-of-sky-min/dataconfig

config json php pmmp pocketmine virion yaml

Last synced: about 21 hours ago
JSON representation

pmmp virion

Awesome Lists containing this project

README

        

# DataConfig
PMMP 4.0

Save `yaml or json or txt or ini` files asynchronously

# How to use

## load Data
```php
public Data $data;

$this->data = new Data(string $fileName, $type, array $default);
```

## save data
```php
$this->data->save();
```

## get data
```php
$this->data->getAll();
$this->data->{key:magic method}
```

## set data
```php
$this->data->setAll($array);
$this->data->{key:magic method} = $value;
```

### $type
```php
Data::AUTO
Data::YAML
Data::JSON
Data::LIST
Data::INI
```