Core for Cherry-project

v1.6.1 2019-05-11 19:17 UTC

This package is auto-updated.

Last update: 2023-05-12 04:25:25 UTC


The Cherry-project Core

GitHub license

GitHub release

Packagist Version

This is core for Cherry-Project that contains Cherry Request, Response, Router, and Templater.

In root of your application you must define main file and call application Core Kernel and Router classes:

require_once __DIR__ . '/../vendor/autoload.php';

use Cherry\Routing\Router;

$kernel = new Cherry\Kernel(__DIR__);

$router = new Router();

Kernel class takes only one argument - your application root path.

With main file you mast have directories config, controllers, templates:

└─ config/
└─ controllers/
└─ templates/


config directory is a 'home' for application config and router files:

└─ config.json
└─ routes.json

config.json contains application environmental parameters:

  "ROUTES_FILE":      "path-to-routes.json",
  "CONTROLLERS_PATH": "path-to-controllers-directory",
  "TEMPLATES_PATH":   "path-to-templates-directory",
  "LOGS_PATH":        "path-to-logs-directory"


Controller is a simple PHP class that contains public methods mapped on route:

"action": "DefaultController::index"

Every method returns Cherry\HttpUtils\Response object.


2019 © Cherry-project