convenia / textmapable
There is no license information available for the latest version (1.0.1) of this package.
1.0.1
2018-03-14 17:49 UTC
Requires
- php: >=7.1
Requires (Dev)
- friendsofphp/php-cs-fixer: 2.10.*
- phpunit/phpunit: ^6.4
This package is not auto-updated.
Last update: 2024-11-10 06:43:51 UTC
README
Biblioteca para ler arquivos de textos sem delimitadores físicos e retornar em formato legível
Requisitos
- PHP >= 7.1
Instale usando o composer Composer
composer require convenia/textMapable
Exemplos de Uso
Criando um novo field
use Convenia\TextMap\Field; class NameField extends Field { protected $name = 'name' protected $length = 10; protected $offset = 30; }
Definindo o arquivo de leitura e seus fields
use Convenia\TextMap\Mapable; /* ... */ $mapable = new Mapable(); $mapable ->readFile($greatFile) ->addField($someFieldsInArray) ->addField($aFieldOutOfAnArray);
Obtendo o mapa dos fields com seus valores
use Convenia\TextMap\Mapable; /* ... */ $map = $mapable->getMap();