This repository has been archived on 2024-04-08. You can view files and clone it, but cannot push or open issues or pull requests.
lnapp/classes/lnApp/Request.php
2014-02-17 11:29:11 +11:00

32 lines
948 B
PHP

<?php defined('SYSPATH') or die('No direct access allowed.');
/**
* Request. Uses the [Route] class to determine what
* [Controller] to send the request to.
*
* @package lnApp
* @category Modifications
* @author Deon George
* @copyright (c) 2009-2013 Deon George
* @license http://dev.leenooks.net/license.html
*/
abstract class lnApp_Request extends Kohana_Request {
/**
* Sets and gets the directory for the controller.
*
* We override the Kohana version, so that we can have short directory URLs.
* eg: admin=>a,reseller=>r.
*
* @param string $directory Directory to execute the controller from
* @return mixed
*/
public function directory($directory = NULL) {
// If $directory is NULL, we are a getter and see if we need to expand the directory
if ($directory === NULL AND $this->_directory)
$this->_directory = URL::dir($this->_directory);
return parent::directory($directory);
}
}
?>