Php library for managing yaml table data via query functions

0.2.0 2021-08-05 16:04 UTC

README

version Minimum PHP Version Github Actions PHP 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