PEIP_Parameter_Holder.php

Go to the documentation of this file.
00001 <?php
00002 
00003 /*
00004  * This file is part of the PEIP package.
00005  * (c) 2010 Timo Michna <timomichna/yahoo.de>
00006  * 
00007  * For the full copyright and license information, please view the LICENSE
00008  * file that was distributed with this source code.
00009  */
00010 
00022 class PEIP_Parameter_Holder 
00023     implements PEIP_INF_Parameter_Holder {
00024 
00025     protected $parameters = array();
00026     
00027     
00028     
00034     public function hasParameter($key){
00035         return array_key_exists($key, $this->parameters);
00036     }   
00037     
00038     
00044     public function getParameter($key){
00045         return array_key_exists($key, $this->parameters) ? $this->parameters[$key] : NULL;
00046     }
00047     
00048     
00054     public function deleteParameter($key){
00055         unset($this->parameters[$key]);
00056     }   
00057 
00058     
00065     public function setParameter($key, $value){
00066         $this->parameters[$key] = $value;
00067     }
00068     
00069     
00082     public function setParameters(array $parameters){
00083         $this->parameters = $parameters;        
00084     }
00085 
00086     
00097     public function getParameters(){
00098         return $this->parameters;
00099     }
00100 
00101     
00107     public function addParameters(array $parameters){
00108         $this->parameters = array_merge($this->parameters, $parameters);
00109         array_unique($this->parameters);
00110     }   
00111 
00112 
00113     
00125     public function addParametersIfNot(array $parameters){
00126         $this->parameters = array_merge($parameters, $this->parameters);
00127         array_unique($this->parameters);
00128     }   
00129 
00130 }

Generated on Mon Apr 12 11:39:00 2010 for PEIP by  doxygen 1.5.1