Initial Commit
This commit is contained in:
31
web/revslider/application/libraries/data.php
Normal file
31
web/revslider/application/libraries/data.php
Normal file
@@ -0,0 +1,31 @@
|
||||
<?php if (!defined('BASEPATH')) exit('No direct script access allowed');
|
||||
|
||||
class Data {
|
||||
|
||||
private $_data = array();
|
||||
|
||||
/**
|
||||
* Get data
|
||||
*
|
||||
* @param string $key
|
||||
* @param var $default
|
||||
* @return var
|
||||
*/
|
||||
|
||||
public function get($key, $default = false) {
|
||||
return isset($this->_data[$key]) ? $this->_data[$key] : $default;
|
||||
}
|
||||
|
||||
/**
|
||||
* Set data
|
||||
*
|
||||
* @param string $key
|
||||
* @param string $value
|
||||
* @return var
|
||||
*/
|
||||
|
||||
public function set($key, $value) {
|
||||
$this->_data[$key] = $value;
|
||||
}
|
||||
|
||||
}
|
||||
Reference in New Issue
Block a user