dschuppelius / php-common-toolkit
Project description.
Installs: 441
Dependents: 2
Suggesters: 0
Security: 0
Stars: 2
Watchers: 2
Forks: 0
Open Issues: 0
pkg:composer/dschuppelius/php-common-toolkit
Requires
- php: >=8.2 <8.5
- ext-bcmath: *
- ext-dom: *
- ext-intl: *
- dschuppelius/php-config-toolkit: ^0.2.26
Requires (Dev)
- phpunit/phpunit: ^11.3@dev
- dev-main
- v0.9.9
- v0.9.8
- v0.9.7
- v0.9.6
- v0.9.5
- v0.9.3.1
- v0.9.3
- v0.9.2
- v0.9.1
- v0.9
- v0.8
- v0.4.20
- v0.4.19
- v0.4.18
- v0.4.17
- v0.4.16
- v0.4.15
- v0.4.14
- v0.4.13
- v0.4.12.1
- v0.4.12
- v0.4.11
- v0.4.10.1
- v0.4.10
- v0.4.9
- v0.4.8
- v0.4.7
- v0.4.6
- v0.4.5
- v0.4.4
- v0.4.3
- v0.4.2
- v0.4.1
- v0.4.0
- v0.3.1
- v0.3.0
- v0.2.9
- v0.2.8
- v0.2.7
- v0.2.6
- v0.2.5
- v0.2.4.1
- v0.2.4
- v0.2.3
- v0.2.2
- v0.2.1
- v0.2.0
- v0.1.0
This package is auto-updated.
Last update: 2026-01-10 23:39:00 UTC
README
General-purpose PHP utility toolkit providing platform-agnostic helpers, CSV processing, and executable wrappers.
Features
- CSV Processing: Fluent builders and parsers for CSV documents with strict field typing
- Executable Wrappers: Platform-agnostic integration with external tools (ImageMagick, TIFF tools, PDF tools)
- Helper Utilities: Bank validation (IBAN, BIC, BLZ), currency formatting, string manipulation
- Enum Support: Typed enums with factory methods (CurrencyCode, CountryCode, CreditDebit, LanguageCode)
- XML Builders: Extended DOM document builder for structured XML generation
- Bundesbank Data: Auto-downloading BLZ/BIC data with expiry tracking
Architecture
src/
├── Builders/ # Fluent document builders (CSV, XML)
├── Contracts/ # Abstract base classes and interfaces
├── Entities/ # Immutable domain models (CSV, Executables, XML)
├── Enums/ # Typed enums with factory methods
├── Generators/ # Code generators
├── Helper/ # Utility classes (Data, FileSystem, Shell)
├── Parsers/ # Document parsers (CSV)
└── Traits/ # Reusable traits
Requirements
The following tools are required to successfully run dschuppelius/php-common-toolkit:
1. TIFF Tools
Required for processing and handling TIFF files.
- Windows: GnuWin32 TIFF Tools
- Debian/Ubuntu:
apt install libtiff-tools
2. Xpdf
Required for handling PDF files.
- Windows: Xpdf Download
- Debian/Ubuntu:
apt install xpdf
3. ImageMagick
For converting and processing image files.
- Windows: ImageMagick Installer
- Debian/Ubuntu:
apt install imagemagick-6.q16hdri
4. muPDF Tools
For processing PDF and XPS documents.
- Debian/Ubuntu:
apt install mupdf-tools
5. QPDF
For advanced PDF manipulation and processing.
- Windows: QPDF Download
- Debian/Ubuntu:
apt install qpdf
Install the Toolkit into your Project
The Toolkit requires a PHP version of 8.1 or higher. The recommended way to install the SDK is through Composer.
composer require dschuppelius/php-common-toolkit
Usage Examples
CSV Processing
use CommonToolkit\Builders\CSVDocumentBuilder; $document = CSVDocumentBuilder::create() ->setDelimiter(';') ->setEnclosure('"') ->addHeaderLine(['Name', 'Amount', 'Date']) ->addDataLine(['Max Mustermann', '1000.00', '2025-01-15']) ->addDataLine(['John Doe', '2500.00', '2025-01-16']) ->build(); echo $document->toString();
Bank Validation
use CommonToolkit\Helper\Data\BankHelper; // IBAN Validation $isValid = BankHelper::isValidIBAN('DE89370400440532013000'); // true // BIC Validation $isValid = BankHelper::isValidBIC('COBADEFFXXX'); // true // Get Bank Name by BLZ $bankName = BankHelper::getBankNameByBLZ('37040044'); // "Commerzbank"
Currency Formatting
use CommonToolkit\Helper\Data\CurrencyHelper; use CommonToolkit\Enums\CurrencyCode; $formatted = CurrencyHelper::format(1234.56, CurrencyCode::Euro); // "1.234,56 €"
Enum Usage
use CommonToolkit\Enums\CurrencyCode; use CommonToolkit\Enums\CountryCode; use CommonToolkit\Enums\CreditDebit; // Currency from Symbol $currency = CurrencyCode::fromSymbol('€'); // CurrencyCode::Euro // Country from Code $country = CountryCode::fromStringValue('DE'); // CountryCode::Germany // Credit/Debit from MT940 Code $creditDebit = CreditDebit::fromMt940Code('C'); // CreditDebit::CREDIT
License
This project is licensed under the MIT License.
Daniel Joerg Schuppelius 📧 info@schuppelius.org