Overview
Packages
Classes
1: <?php
2:
3: /**
4: * Onion Framework - Widgety
5: *
6: * Copyright (c) 2011 Jano Gašpar (http://webstranky.net)
7: *
8: * @author Jano Gašpar
9: * @copyright Copyright (c) 2011 Jano Gašpar
10: * @package Onion::UI
11: */
12:
13: class Widget
14: {
15: public $data = array();
16:
17: protected $app;
18:
19: public function __construct($app)
20: {
21: $this->app = $app;
22: }
23:
24: /**
25: * Vloženie dát do úložiska dát
26: *
27: * @param string|array názov premennej, alebo asociatívne pole s dátami
28: * @param string|array hodnota premennej
29: * @return object
30: */
31: protected function set_data($variable, $value = NULL)
32: {
33: if (is_array($variable) === TRUE
34: OR is_object($variable) === TRUE) {
35:
36: $this->data = array_merge($this->data, (array) $variable);
37:
38: } else {
39: $this->data[$variable] = $value;
40: }
41: }
42: }
43: