PHP Classes


Recommend this page to a friend!
  Classes of Maik Greubel   Caribu MVC   Download  
Role: Documentation
Content type: text/markdown
Description: Documentation
Class: Caribu MVC
MVC framework with controllers using annotations
Author: By
Last change:
Date: 6 years ago
Size: 2,393 bytes


Class file image Download

Build Status Scrutinizer Code Quality Code Coverage Dependency Status


Tiny annotation based MVC framework

For now only a simple example, what you can do with Caribu MVC.


  "require" : {
    "nkey/caribu-mvc" : "dev-master",
    "nkey/phpgenerics" : "dev-master",
    "psr/log" : "1.0.0"


require dirname(__FILE__) . '/../vendor/autoload.php';

use \Nkey\Caribu\Mvc\Controller\AbstractController;
use \Nkey\Caribu\Mvc\Controller\Request;
use \Nkey\Caribu\Mvc\Application;
use \Nkey\Caribu\Mvc\View\AbstractView;

use \Generics\Logger\ExtendedLogger;

 * A simple test controller
 * @author Maik Greubel <>
 *         This file is part of Caribu MVC package
class IndexController extends AbstractController

     * @webMethod
     * @title Hey there page
    public function index()
        echo "Hey, there!\n\n";

     * @responseType text/plain
     * @param \Nkey\Caribu\Mvc\Controller\Request $request
    public function paramTest(Request $request)
        foreach ($request->getParams() as $param => $value) {
            printf("%s => %s\n", $param, $value);

// Preparing
    ->setLogger(new ExtendedLogger());

// Serving

Then in your browser window open http://host/ and see the output of index() web method. The address http://host/index, as well as http://host/index/index provides the same functionality.

Surf to http://host/index/paramTest/param1/Hello/param2/Caribu or to get the same output the address http://host/index/paramTest?param1=Hello&param2=Caribu

Documentation follows soon in wiki.