PHP code example of kigkonsult / sie5sdk
1. Go to this page and download the library: Download kigkonsult/sie5sdk 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/ */
kigkonsult / sie5sdk example snippets
namespace Kigkonsult\Sie5Sdk;
use Kigkonsult\Sie5Sdk\XMLParse\Sie5Parser;
$sie = Sie5Parser::factory()->parse(
file_get_contents( 'SieExportFile.xml' )
);
foreach( $sie->getAccounts()->getAccount() as $account ) {
$id = $account->getId();
//...
}
//...
namespace Kigkonsult\Sie5Sdk;
use Kigkonsult\Sie5Sdk\XMLParse\Sie5Parser;
$sieEntry = Sie5Parser::factory()->parse(
file_get_contents( 'SieImportFile.xml' )
);
foreach( $sieEntry->getAccounts()->getAccount() as $account ) {
$id = $account->getId();
//...
}
//...
namespace Kigkonsult\Sie5Sdk;
use Kigkonsult\Sie5Sdk\XMLWrite\Sie5Writer;
use Kigkonsult\Sie5Sdk\Dto\SieEntry;
use Kigkonsult\Sie5Sdk\Dto\AccountsTypeEntry;
use Kigkonsult\Sie5Sdk\Dto\AccountTypeEntry;
$sieEntry = sieEntry::factory()
->setXMLattribute( SieEntry::XMLNS_XSI, SieEntry::XMLSCHEMAINSTANCE )
->setXMLattribute( SieEntry::XMLNS_XSD, SieEntry::XMLSCHEMA )
->setXMLattribute( SieEntry::XSI_SCHEMALOCATION, SieEntry::SIE5SCHEMALOCATION )
->setXMLattribute( SieEntry::XMLNS, SieEntry::SIE5URI );
->setAccounts(
AccountsTypeEntry::factory()
->setAccount(
[
AccountTypeEntry::factory()
->setId( '1910' )
->setName( 'Kassa' )
->setType( AccountTypeEntry::ASSET ),
AccountTypeEntry::factory()
->setId( '1930' )
->setName( 'Bank' )
->setType( AccountTypeEntry::ASSET )
]
)
)
->set...
$XMLstring = Sie5Writer::factory()->write( $sieEntry );
...
$sieEntry->setXMLAttribut( <key>, <value> );
$sieEntry->setXMLAttribut( SieEntry::PREFIX, <value>, true );
$dsig->unsetXMLAttribut( <key> );
$sieEntry->unsetXMLAttribut( SignatureType::PREFIX, true );
foreach( $sieEntry->getXMLAttributes() as $key => $value {
...
}
$XMLstring = Sie5Writer::factory()->write( $sieEntry );
$domNode = Sie5Writer::factory()->write( $sieEntry, true );
php
composer
php
namespace Kigkonsult\Sie5Sdk;
...
php
namespace Kigkonsult\Sie5Sdk;
...