shop.balmet.com

Unnamed repository; edit this file 'description' to name the repository.
Log | Files | Refs | README

registry.php (827B)


      1 <?php
      2 /**
      3  * @package		OpenCart
      4  * @author		Daniel Kerr
      5  * @copyright	Copyright (c) 2005 - 2017, OpenCart, Ltd. (https://www.opencart.com/)
      6  * @license		https://opensource.org/licenses/GPL-3.0
      7  * @link		https://www.opencart.com
      8 */
      9 
     10 /**
     11 * Registry class
     12 */
     13 final class Registry {
     14 	private $data = array();
     15 
     16 	/**
     17      * 
     18      *
     19      * @param	string	$key
     20 	 * 
     21 	 * @return	mixed
     22      */
     23 	public function get($key) {
     24 		return (isset($this->data[$key]) ? $this->data[$key] : null);
     25 	}
     26 
     27     /**
     28      * 
     29      *
     30      * @param	string	$key
     31 	 * @param	string	$value
     32      */	
     33 	public function set($key, $value) {
     34 		$this->data[$key] = $value;
     35 	}
     36 	
     37     /**
     38      * 
     39      *
     40      * @param	string	$key
     41 	 *
     42 	 * @return	bool
     43      */
     44 	public function has($key) {
     45 		return isset($this->data[$key]);
     46 	}
     47 }