FRED™  3.0
FRED™: Framework for Rapid and Easy Development
Storage.php
Go to the documentation of this file.
1 <?php
2 
3 namespace Rsi\Fred;
4 
5 /**
6  * Flexible storage component. Something between a database, cache, and/or file system.
7  */
8 class Storage extends Component{
9 
10  public $containerClassName = __CLASS__ . '\\Container\\File';
11 
12  public function container($key){
13  $class_name = $this->containerClassName;
14  return new $class_name($this,$this->config('container'),$key);
15  }
16 
17  protected function _get($key){
18  return $this->storage($key);
19  }
20 
21  public function __call($func_name,$params){
22  return $this->storage(array_merge([$func_name],$params));
23  }
24 
25 }
config($key, $default=null)
Retrieve a config value.
Definition: Component.php:53
__call($func_name, $params)
Definition: Storage.php:21
container($key)
Definition: Storage.php:12
Basic component class.
Definition: Component.php:8
Flexible storage component.
Definition: Storage.php:8