PHPdoc updated
This commit is contained in:
@ -5,8 +5,6 @@
|
||||
* @package Majestic
|
||||
* @subpackage app
|
||||
* @since 2010-02-24
|
||||
* @version SVN: $Id$
|
||||
* @filesource $URL$
|
||||
*/
|
||||
|
||||
class FrontController
|
||||
@ -65,6 +63,7 @@ class FrontController
|
||||
|
||||
/**
|
||||
*
|
||||
* @param null $view
|
||||
* @return iView
|
||||
*/
|
||||
public function getView($view = null)
|
||||
@ -75,6 +74,7 @@ class FrontController
|
||||
|
||||
/**
|
||||
* @param string $url
|
||||
* @return FrontController
|
||||
*/
|
||||
public function setBaseUrl($url)
|
||||
{
|
||||
@ -115,6 +115,9 @@ class FrontController
|
||||
throw new GeneralException('Layout class "' . $layout_class . '" not found.');
|
||||
}
|
||||
|
||||
/**
|
||||
* @var Layout $layout
|
||||
*/
|
||||
$layout = new $layout_class();
|
||||
$html = $layout->fetch($action);
|
||||
if (Config::get('PROFILER')) {
|
||||
|
@ -5,15 +5,18 @@
|
||||
* @package Majestic
|
||||
* @subpackage app
|
||||
* @since 2010-02-25
|
||||
* @version SVN: $Id$
|
||||
* @filesource $URL$
|
||||
*/
|
||||
|
||||
class Router
|
||||
{
|
||||
|
||||
/**
|
||||
* @var Route[]
|
||||
*/
|
||||
protected $routes = array();
|
||||
|
||||
/**
|
||||
* @var string
|
||||
*/
|
||||
protected $route_name;
|
||||
|
||||
protected $default_layout = 'Default';
|
||||
@ -33,6 +36,10 @@ class Router
|
||||
$this->routes[$name] = new Route($route, $action, $params, $layout);
|
||||
}
|
||||
|
||||
/**
|
||||
* @param $request
|
||||
* @return bool|Route
|
||||
*/
|
||||
public function route($request)
|
||||
{
|
||||
$req = explode('/', trim($request, '/'));
|
||||
@ -48,6 +55,10 @@ class Router
|
||||
return false;
|
||||
}
|
||||
|
||||
/**
|
||||
* Set default layout name
|
||||
* @param string $layout
|
||||
*/
|
||||
public function setDefaultLayout($layout = 'Default')
|
||||
{
|
||||
$this->default_layout = $layout;
|
||||
@ -71,6 +82,10 @@ class Router
|
||||
return $this->error_layout . 'Layout';
|
||||
}
|
||||
|
||||
/**
|
||||
* Return current router name
|
||||
* @return string
|
||||
*/
|
||||
public function getRouteName()
|
||||
{
|
||||
return $this->route_name;
|
||||
|
@ -56,7 +56,9 @@ abstract class Layout
|
||||
abstract protected function execute();
|
||||
|
||||
/**
|
||||
* Execute Action, insert action's result html into layout template and return Layout html
|
||||
* @param Action $action
|
||||
* @return string
|
||||
*/
|
||||
public function fetch($action)
|
||||
{
|
||||
@ -64,7 +66,11 @@ abstract class Layout
|
||||
$this->execute();
|
||||
return $this->view->fetch($this->getTemplate());
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* Return content of template
|
||||
* @return string
|
||||
*/
|
||||
protected function getTemplate()
|
||||
{
|
||||
$template = ($this->template) ? $this->template : substr(get_class($this), 0, -6/*strlen('Layout')*/);
|
||||
|
@ -5,8 +5,6 @@
|
||||
* @package Majestic
|
||||
* @subpackage Redis
|
||||
* @since 2011-07-29
|
||||
* @version SVN: $Id$
|
||||
* @filesource $URL$
|
||||
*/
|
||||
|
||||
class RedisDebug
|
||||
|
@ -15,7 +15,7 @@ class RedisManager
|
||||
/**
|
||||
* Redis connections
|
||||
*
|
||||
* @var array
|
||||
* @var Redis[]
|
||||
*/
|
||||
static protected $connections = array();
|
||||
|
||||
@ -25,6 +25,7 @@ class RedisManager
|
||||
* @param string $name connection name. If not set 'default' will be used.
|
||||
* @param array $config Configuration array.
|
||||
*
|
||||
* @throws GeneralException
|
||||
* @return Redis
|
||||
*/
|
||||
static public function connect($name = 'default', $config = null)
|
||||
|
@ -15,7 +15,8 @@
|
||||
* @see https://github.com/nicolasff/phpredis
|
||||
*
|
||||
* @method bool connect() connect(string $host, int $port = 6379, float $timeout = 0) Connect to redis
|
||||
* @method bool pconnect() connect(string $host, int $port = 6379, float $timeout = 0, string $persistent_id) Connect to redis with reusing connection
|
||||
* @method bool pconnect() pconnect(string $host, int $port = 6379, float $timeout = 0, string $persistent_id) Connect to redis with reusing connection
|
||||
* @method bool select() select(int $dbindex) Switches to a given database
|
||||
* @method void close() Close connection to redis
|
||||
* @method bool setOption() setOption(mixed $name, mixed $value) Set client option
|
||||
* @method mixed getOption() getOption(mixed $name) Get client option
|
||||
|
Reference in New Issue
Block a user