Download the PHP package studiokaizen/framework without Composer
On this page you can find all versions of the php package studiokaizen/framework. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.
Download studiokaizen/framework
More information about studiokaizen/framework
Files in studiokaizen/framework
Package framework
Short Description ZenPHP — a modern zero-dependency PHP 8.4 micro-framework
License MIT
Informations about the package framework
ZenPHP Framework
A modern, zero-dependency micro-framework for PHP 8.4.
Requirements
- PHP 8.4+
- PDO extension (SQLite or MySQL)
- OpenSSL extension
Installation
Getting Started
Copy config.example.php to config.php and fill in your values. Generate an encryption key:
Run migrations:
Routing
Routes are defined in public/index.php. Every handler receives a Request and Response and must return a Response.
Route Parameters
Route Middleware
Route Groups
Request
Response
Views
Templates live in resources/views/ and use plain PHP.
View API reference
| Method | Description |
|---|---|
$this->extend('name') |
Declare the parent layout template |
$this->yield('name', 'default') |
Output a section in a layout |
$this->section('name', 'value') |
Define a section inline (no buffering) |
$this->startSection('name') |
Begin buffering a section |
$this->endSection() |
End the current section buffer |
$this->stack('name') |
Output a stack in a layout |
$this->push('name') |
Begin buffering content to append to a stack |
$this->endPush() |
End the current push buffer |
$this->prepend('name') |
Begin buffering content to prepend to a stack |
$this->endPrepend() |
End the current prepend buffer |
$this->e('string') |
HTML-escape a value |
$this->share('key', $value) |
Share a variable with all templates |
Validation
Available rules: required, nullable, string, integer, numeric, boolean, array, email, url, min, max, between, size, in, not_in, same, different, confirmed, regex.
Database
Query Builder
Pagination
Migrations
Migration files use -- UP and -- DOWN sections:
Authentication
Session Auth
API Token Auth
Use the token middleware to protect API routes. Clients send Authorization: Bearer <token>.
Middleware
Register aliases in bootstrap/app.php:
Built-in aliases: csrf, auth, guest, token, throttle, cors.
Attach to routes:
Custom Middleware
Cache
Events
Queue
Scheduler
Configure the driver in config.php (log, smtp, or sendmail).
Session
Encryption & Hashing
Storage
Logging
Logs are written to storage/logs/app.log.
Container
The container uses array-access. Every closure binding is a singleton — resolved once on first access, then frozen.
Service Providers
Register in bootstrap/app.php:
Support Utilities
Str
Arr
Collection
Console Commands
Custom Commands
Output helpers available inside handle(): $this->line(), $this->info() (green), $this->warn() (yellow), $this->error() (red).
Register in bootstrap/app.php:
License
MIT