Library allowing the management of data in table form yaml
Clone or download
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Permalink
Failed to load latest commit information.
.github
docs
src
tests
.gitignore
.travis.yml
LICENSE
README.md
composer.json
phpcs.xml
phpunit.xml

README.md

version Minimum PHP Version Build Status GitHub license FOSSA Status

doff

DOFF for Data Oriented Flat-File, Library for managing yaml table data via query functions.

composer require simondevelop/doff

Example

<?php
// Initiate doff
require "vendor/autoload.php";
use SimonDevelop\Doff;

$settings = [
  "path" => "/path/of/data/files/",
  "chmod" => 0770 // optionnal, octal value (only string or integer type)
];
$doff = new Doff($settings);

In your /path/of/data/files

# test.yml
-
    name: 'test 0'
-
    name: 'test 1'
-
    name: 'test 2'
-
    name: '3'
-
    name: '4'
<?php
//...

// Example with like query for query.yml
$datas = $doff->select("query", ["name" => "%test%"]);

$datas = [
  ["name" => "test 0"],
  ["name" => "test 1"],
  ["name" => "test 2"]
];

Check this docs for more.

Go to contribute !

License

FOSSA Status