Skip to content

pbrilius5/mvc

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

4 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Oryx MVC

Lightweight MVC framework for rapid prototyping - A librarian package built on PHP League ecosystem.

Requirements

  • PHP 8.2+

Installation

composer install

Development Server

php -S 0.0.0.0:1213 -t public

Architecture

src/
├── Application.php           # Entry point, DI container + router config
├── AbstractController.php    # Base controller with render/json helpers
├── ControllerInterface.php   # Contract for controllers
├── Controller/
│   └── HomeController.php     # Concrete controllers extend AbstractController
├── Http/
│   └── RequestHandler.php     # Handles PSR-7 request/response operations
├── Model/
│   ├── AbstractModel.php      # In-memory CRUD model
│   └── ModelInterface.php
├── ServiceProvider.php        # Dependency injection container configuration
└── View/
    ├── PlatesView.php         # League Plates template engine wrapper
    └── ViewInterface.php

Components

  • Controller: Handles HTTP requests
  • Model: Data layer (abstract, implement as needed)
  • View: Template rendering via Plates
  • ServiceProvider: Configures dependency injection container
  • RequestHandler: PSR-7 request/response handling utilities

Available Commands

composer test      # Run PHPUnit tests
composer analyse   # Run PHPStan static analysis

Testing

Run all tests:

composer test

Run a single test class:

vendor/bin/phpunit tests/Unit/ApplicationTest.php

Run a single test method:

vendor/bin/phpunit --filter testCreateReturnsDataWithId

Run tests matching a pattern:

vendor/bin/phpunit --filter AbstractModel

Static Analysis

Run PHPStan (level 6):

composer analyse
# or
vendor/bin/phpstan analyse

Note: PHPStan runs against src/ only. Tests are excluded from analysis.

For detailed coding standards, architecture patterns, and development guidelines, refer to AGENTS.md.

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors