Dotkernel API adheres to PHP Standards Recommendations (PSRs) established by the PHP-FIG (Framework Interoperability Group). These standards ensure code interoperability and allow Dotkernel API to work seamlessly with other PSR-compliant libraries.
Some PSRs are at the core of Dotkernel API's architecture, while others are installed as dependencies through third-party packages.
Repository: php-fig/http-message
Defines standardized interfaces for HTTP messages (requests and responses) and URIs.
Why it matters:
Laminas\Diactoros.Repository: php-fig/http-server-handler and php-fig/http-server-middleware
Defines the interface for HTTP request handlers and middleware components that process PSR-7 HTTP messages.
Why it matters:
RequestHandlerInterface.Repository: php-fig/container
Defines the standard interface for dependency injection containers.
Why it matters:
Laminas\ServiceManager.Repository: php-fig/log
Provides a standard interface for logging libraries.
Usage: Error handling, debugging, audit trails
Implemented in: dotkernel/dot-errorhandler
Repository: php-fig/log
Defines how PHP files are automatically loaded based on namespaces and file paths.
Usage: Automatic class loading without manual require statements
Implemented in: Laminas\Loader
Repository: php-fig/cache
Defines standard interfaces for caching systems to improve application performance.
Usage: Caching query results, configuration, templates
Implemented in: dotkernel/dot-cache
Repository: php-fig/link
Describes how to represent hypermedia links independently of serialization format.
Usage: HAL (Hypertext Application Language) resource links
Implemented in: mezzio/mezzio-hal
Repository: php-fig/event-dispatcher
Mechanism for event-based extension and collaboration between components.
Usage: Triggering events on user actions, logging events, notifications Implemented in: Third-party packages as needed
Repository: php-fig/http-factory
Standard for factories that create PSR-7 compliant HTTP objects.
Usage: Creating requests, responses, and streams programmatically
Implemented in: Laminas\Diactoros
Repository: php-fig/http-client
Interface for sending HTTP requests and receiving HTTP responses.
Usage: Calling external APIs from your Dotkernel API
Implemented in: symfony/http-client or similar packages
Repository: php-fig/clock
Provides a standard interface for reading the system clock.
Usage: Getting current time in a testable way Implemented in: Third-party packages as needed
┌───────────────────────────────────────────┐
│ PSR-7: HTTP Messages (Requests/Responses)│
└───────────────────────────────────────────┘
▲
│
┌───────────────────────────────────────────┐
│ PSR-15: Handlers & Middleware │
│ (Process PSR-7 messages) │
└───────────────────────────────────────────┘
▲
│
┌───────────────────────────────────────────┐
│ PSR-11: Container │
│ (Manages services for handlers) │
└───────────────────────────────────────────┘
▲
│
┌───────────────────────────────────────────┐
│ PSR-4: Autoloader │
│ (Loads services automatically) │
└───────────────────────────────────────────┘