PHP code example of marcosadantas / sped-container
1. Go to this page and download the library: Download marcosadantas/sped-container 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/ */
marcosadantas / sped-container example snippets
composer
AbstractAttribute
SpedContainer
SpedAttribute
$data = [
'produto' => [
'nome' => 'Produto PHP'
]
];
class ProdutoAttribute extends AbstractAttribute implements SpedAttribute
{
// O container fará a injeção automaticamente
__invoke(array $items, OutroAttributo $instancia);
}
$regras = [
ProdutosAttribute::class
]
$spedContainer = new SpedContainer($regras, $data);
$spedContainer->execute();
Precision - numeros precisos
SanitizeString - limpeza de string
DateFormat - Formatação para UTC