PHP code example of earc / data-filesystem

1. Go to this page and download the library: Download earc/data-filesystem library. Choose the download type require.

2. Extract the ZIP file and open the index.php.

3. Add this code to the index.php.
    
        
<?php
require_once('vendor/autoload.php');

/* Start to develop here. Best regards https://php-download.com/ */

    

earc / data-filesystem example snippets


use eArc\Data\Initializer;

Initializer::init();

use eArc\Data\ParameterInterface;
use eArc\DataFilesystem\FilesystemDataBridge;

di_tag(ParameterInterface::TAG_ON_LOAD, FilesystemDataBridge::class);
di_tag(ParameterInterface::TAG_ON_PERSIST, FilesystemDataBridge::class);
di_tag(ParameterInterface::TAG_ON_REMOVE, FilesystemDataBridge::class);
di_tag(ParameterInterface::TAG_ON_FIND, FilesystemDataBridge::class);

di_set_param(\eArc\DataFilesystem\ParameterInterface::DATA_PATH, '/path/to/save/the/entity/data');