This repository has been archived on 2024-06-26. You can view files and clone it, but cannot push or open issues or pull requests.
sakura/libraries/Controllers/Settings/Controller.php
2016-03-28 03:18:59 +02:00

36 lines
683 B
PHP

<?php
/**
* Holds the base settings controller.
*
* @package Sakura
*/
namespace Sakura\Controllers\Settings;
use Sakura\Controllers\Controller as BaseController;
use Sakura\Urls;
/**
* Base controller (which other controllers should extend on).
*
* @package Sakura
* @author Julian van de Groep <me@flash.moe>
*/
class Controller extends BaseController
{
private $urls;
public function __construct()
{
$this->urls = new Urls();
}
public function go($location)
{
$location = explode('.', $location);
$url = $this->urls->format('SETTING_MODE', $location, null, false);
return header("Location: {$url}");
}
}