PHP Classes

File: docs/extensions/

Recommend this page to a friend!
  Classes of Slawomir Kaleta  >  Dframe Framework  >  docs/extensions/  >  Download  
File: docs/extensions/
Role: Auxiliary data
Content type: text/markdown
Description: Auxiliary data
Class: Dframe Framework
Modular MVC based PHP Web framework
Author: By
Last change: Update of docs/extensions/
Date: 1 year ago
Size: 884 bytes


Class file image Download



Router is alredy defined in core dframe so you just use $this->router in controller or view files. If you want use only router component use $router = new Dframe\Router();

$isActive = $this->router->isActive('page/index') // For check if you are on page
var_dump($isActive); // true/false

$publicWeb = $this->router->publicWeb('img/example.jpg') // For load web/* files
var_dump($publicWeb);  //

$assets = $this->router->assets('ventor/js/exampleJs.js') // For load app/view/files and cache web/assets/
var_dump($assets);  //

$makeUrl = $this->router->makeUrl('page/index') // To create link
var_dump($makeUrl); //

$this->router->setHttps(true) // reinit from Config

$router->redirect('page/index'); // To redirect
For more information send a message to info at phpclasses dot org.