karyakode / framework
The Kodhe framework
Package info
Type:project
pkg:composer/karyakode/framework
v0.2.0-alpha
2026-08-08 10:43 UTC
Requires
- php: >=8.1
- eftec/bladeone: ^4.19
- paragonie/random_compat: ^9.99
Requires (Dev)
- mikey179/vfsstream: 1.6.*
- phpstan/phpstan: ^1.10
- phpunit/phpunit: ^9.0|^10.0
- squizlabs/php_codesniffer: ^3.7
Suggests
- ext-apc: APC cache driver
- ext-hash: Required for encryption libraries
- ext-memcached: Memcached cache/session driver
- ext-openssl: Required for encryption libraries
- ext-redis: Redis cache/session driver
- paragonie/random_compat: Provides better randomness in PHP 5.x
This package is not auto-updated.
Last update: 2026-08-09 09:11:32 UTC
README
Setiap package berdiri sendiri. Install hanya yang dibutuhkan.
Standar yang Diterapkan
- PSR-4 — Autoload & struktur namespace
- PSR-12 — Coding style (header, declare strict_types, namespace, use, brace)
Contoh header file (PSR-12)
<?php declare(strict_types=1); namespace Kodhe\Framework\Http\Middleware; use Kodhe\Framework\Http\Request; use Kodhe\Framework\Http\Response; use Throwable; class CallableMiddleware implements MiddlewareInterface { // ... }
Namespace (PSR-4)
Core
| Package | Composer | Namespace root |
|---|---|---|
| framework | kodhe/framework |
Kodhe\Framework\ |
| http | kodhe/http |
Kodhe\Framework\Http\ |
| routing | kodhe/routing |
Kodhe\Framework\Routing\ |
| database | kodhe/database |
Kodhe\Framework\Database\ |
| session | kodhe/session |
Kodhe\Framework\Session\ |
| cache | kodhe/cache |
Kodhe\Framework\Cache\ |
| view | kodhe/view |
Kodhe\Framework\View\ |
| validation | kodhe/validation |
Kodhe\Framework\Validation\ |
Libraries
| Package | Composer | Namespace |
|---|---|---|
| agent | kodhe/user-agent |
Kodhe\UserAgent\ |
| driver | kodhe/driver |
Kodhe\Driver\ |
kodhe/email |
Kodhe\Email\ |
|
| upload | kodhe/upload |
Kodhe\Upload\ |
| image | kodhe/image |
Kodhe\Image\ |
| encryption | kodhe/encryption |
Kodhe\Encryption\ |
| encrypt | kodhe/encrypt |
Kodhe\Encrypt\ |
| ftp | kodhe/ftp |
Kodhe\Ftp\ |
| zip | kodhe/zip |
Kodhe\Zip\ |
| cart | kodhe/cart |
Kodhe\Cart\ |
| calendar | kodhe/calendar |
Kodhe\Calendar\ |
| pagination | kodhe/pagination |
Kodhe\Pagination\ |
| parser | kodhe/parser |
Kodhe\Parser\ |
| profiler | kodhe/profiler |
Kodhe\Profiler\ |
| table | kodhe/table |
Kodhe\Table\ |
| typography | kodhe/typography |
Kodhe\Typography\ |
| javascript | kodhe/javascript |
Kodhe\Javascript\ |
| migration | kodhe/migration |
Kodhe\Migration\ |
| test | kodhe/test |
Kodhe\Test\ |
| trackback | kodhe/trackback |
Kodhe\Trackback\ |
| xmlrpc | kodhe/xmlrpc |
Kodhe\Xmlrpc\ |
| xmlrpcs | kodhe/xmlrpcs |
Kodhe\Xmlrpcs\ |
Install Selektif
# Minimal API composer require kodhe/framework kodhe/http kodhe/routing kodhe/database # Full web composer require kodhe/framework kodhe/http kodhe/routing kodhe/database \ kodhe/session kodhe/cache kodhe/view kodhe/validation # Library saja composer require kodhe/email kodhe/upload kodhe/user-agent
Path repository (lokal)
{
"repositories": [
{ "type": "path", "url": "packages/*", "options": { "symlink": true } }
],
"require": {
"kodhe/framework": "*",
"kodhe/http": "*",
"kodhe/user-agent": "*"
}
}
Catatan
kodhe/cachemembutuhkankodhe/driverkodhe/frameworktidak memaksa dependency ke http/session/cache (hanya suggest)- File helper & Legacy tidak dipaksa
strict_types(kompatibilitas) - Semua class file memakai
declare(strict_types=1);
Calendar Library (New!)
Refactored modular PSR-4 compatible Calendar library with:
- Multiple Renderers: HTML table, JSON for JavaScript
- Localization: English, Indonesian, French, German, Spanish
- Strategy Pattern: Easy to add custom renderers
- Value Objects:
CalendarDate,CalendarEvent - Caching: Built-in structure caching
- 100% CI3 Backward Compatible
Structure
src/
├── Calendar.php # Main class
├── Contracts/
│ ├── CalendarInterface.php
│ └── CalendarRendererInterface.php
├── Generators/
│ └── MonthGenerator.php
├── Renderers/
│ ├── HtmlTableRenderer.php
│ └── JsonRenderer.php
├── Localization/
│ ├── LocalLexicon.php
│ └── LexiconRepository.php
├── ValueObjects/
│ ├── CalendarDate.php
│ └── CalendarEvent.php
├── Traits/
│ ├── ConfigurableTrait.php
│ └── SingletonTrait.php
└── tests/
├── CalendarTest.php
└── Generators/
└── MonthGeneratorTest.php
Quick Start
use Kodhe\Calendar\Calendar; $calendar = new Calendar(['locale' => 'en']); echo $calendar->generate(2026, 8); // JSON output for FullCalendar.js $json = $calendar->asJson(2026, 8, [ 15 => ['title' => 'Meeting', 'url' => '/meeting'], ]);
See full documentation in the package README.