RSI helpers  0.1
RSI helpers
Value.php
Go to the documentation of this file.
1 <?php
2 
3 namespace Rsi\Object;
4 
5 /**
6  * Basic value object.
7  */
8 class Value extends \Rsi\Thing{
9 
10  protected $_value = null;
11 
12  public function __construct($value){
13  $this->setValue($value);
14  }
15 
16  protected function setValue($value){
17  $this->_value = $value;
18  }
19 
20  protected function getValue(){
21  return $this->_value;
22  }
23 
24  public function __invoke($value = null){
25  if(func_num_args()) $this->setValue($value);
26  else return $this->getValue();
27  }
28 
29 }
__construct($value)
Definition: Value.php:12
setValue($value)
Definition: Value.php:16
__invoke($value=null)
Definition: Value.php:24
Basic value object.
Definition: Value.php:8