ViewFactory Class Reference
[View]
Static view factory. More...
Static Public Member Functions |
|
static | create_view ($type, $template_name, $params=false) |
Create a suitable view. |
|
static | set_implementation (IViewFactory $implementation, $keep_old=false) |
Change Implementation. |
Detailed Description
Static view factory.
Definition at line 10 of file viewfactory.cls.php.
Member Function Documentation
static ViewFactory::create_view | ( | $ | type, | |
$ | template_name, | |||
$ | params = false |
|||
) | [static] |
Create a suitable view.
- Parameters:
-
$type The type of view to create as a string, e.g. "page", or "content", or "XML" ... $template_name Name of the template $params Params to pass to view, may depend on type
- Returns:
- IView
Definition at line 47 of file viewfactory.cls.php.
00047 { 00048 if (empty(self::$implementation)) { 00049 self::set_implementation(new ViewFactoryBase()); 00050 } 00051 return self::$implementation->create_view($type, $template_name, $params); 00052 }
static ViewFactory::set_implementation | ( | IViewFactory $ | implementation, | |
$ | keep_old = false |
|||
) | [static] |
Change Implementation.
- Parameters:
-
$implementation The new implementation $keep_old If set to TRUE, an existing implementation will not get replaced. Don't mix this with a call to set_old_implementation() of the new factory implementation, since this will always be done.
Definition at line 28 of file viewfactory.cls.php.
The documentation for this class was generated from the following file:
- gyro/core/view/base/viewfactory.cls.php