Revision 331, 0.9 KB
(checked in by knyghtmare, 14 years ago)
|
Added items remotely
V:\users\knyghtmare\edk\application
V:\users\knyghtmare\edk\media
V:\users\knyghtmare\edk\system
V:\users\knyghtmare\edk\.htaccess
V:\users\knyghtmare\edk\index.php
|
Line | |
---|
1 | <?php |
---|
2 | |
---|
3 | defined('SYSPATH') or die('No direct script access.'); |
---|
4 | |
---|
5 | class View extends View_Core |
---|
6 | { |
---|
7 | |
---|
8 | public function __construct($name = NULL, $data = NULL, $type = NULL) |
---|
9 | { |
---|
10 | // don't for get to call the parent constructor! |
---|
11 | parent::__construct($name, $data, $type); |
---|
12 | } |
---|
13 | |
---|
14 | /** |
---|
15 | * Creates a new View using the given parameters. |
---|
16 | * |
---|
17 | * @param string view name |
---|
18 | * @param array pre-load data |
---|
19 | * @param string type of file: html, css, js, etc. |
---|
20 | * @return object |
---|
21 | */ |
---|
22 | public static function factory($name = NULL, $data = NULL, $type = NULL) |
---|
23 | { |
---|
24 | if ($name !== null) |
---|
25 | { |
---|
26 | if (strpos($_SERVER['HTTP_USER_AGENT'], "EVE-minibrowser") !== false) |
---|
27 | $name = 'igb/'.$name; |
---|
28 | else |
---|
29 | $name = 'oog/'.$name; |
---|
30 | } |
---|
31 | return new View($name, $data, $type); |
---|
32 | } |
---|
33 | |
---|
34 | } |
---|
35 | |
---|
36 | ?> |
---|