PHP code example of convenia / convenia-recitable

1. Go to this page and download the library: Download convenia/convenia-recitable 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/ */

    

convenia / convenia-recitable example snippets


use Convenia\PayrollFileReader\Fields\Formats\FieldC;
use Convenia\PayrollFileReader\Patterns\PatternBase;

class DependentRegistry extends PatternBase
{
    protected $length = 21;

    /**
     * @var array
     */
    protected $defaultFields = [
        'fixed' => [
            'format'       => FieldC::class,
            'position'     => 1,
            'length'       => 2,
        ],
        'dependentCode' => [
            'format'       => FieldC::class,
            'position'     => 3,
            'length'       => 10,
        ],
        'value' => [
            'format'       => FieldC::class,
            'position'     => 13,
            'length'       => 9,
        ],
    ];
}
   
// Conversão para string
foreach ($this->events as $event) {
    $file .= $event.PHP_EOL;
}