jablonka.czprosek.czf

freenet-router

Subversion Repositories:
[/] [trunk/] [freenet-router/] [var/] [www/] [freenet-router/] [Application/] [Models/] [System/] [ConfigEntry.php] - Blame information for rev 2

 

Line No. Rev Author Line
12simandl<?php
2 
3namespace FreenetRouter\Models\System;
4 
5use FreenetRouter\Libraries\ConfigEntryManagers\IConfigEntryManager;
6use Phem\Core\Object;
7 
8/**
9 * @author Jakub PetrŞílka <kubapet@lbcfree.net>
10 */
11class ConfigEntry extends Object
12{
13 private $name;
14 private $label;
15 private $value;
16 private $configEntryManager;
17 
18 function __construct($name, $label, IConfigEntryManager $cem)
19 {
20 $this->name = $name;
21 $this->label = $label;
22 $this->configEntryManager = $cem;
23 }
24 
25 
26 public function getName()
27 {
28 return $this->name;
29 }
30 
31 public function getLabel()
32 {
33 return $this->label;
34 }
35 
36 public function getValue()
37 {
38 if ($this->value === null)
39 {
40 $this->value = $this->configEntryManager->getValue();
41 }
42 return $this->value;
43 }
44 
45 public function setName($name)
46 {
47 $this->name = $name;
48 }
49 
50 public function setLabel($label)
51 {
52 $this->label = $label;
53 }
54 
55 public function setValue($value)
56 {
57 $this->configEntryManager->setValue($value);
58 $this->value = $this->configEntryManager->getValue();
59 }
60}

Powered by WebSVN 2.2.1