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_Service_Container 00023 extends PEIP_Parameter_Holder 00024 implements PEIP_INF_Service_Container { 00025 00026 protected $services = array(); 00027 00028 00040 public function __construct(array $parameters = array()){ 00041 $this->setInternalValues($parameters); 00042 } 00043 00044 00051 public function setService($key, $service){ 00052 $this->services[$key] = $value; 00053 } 00054 00055 00061 public function getService($key){ 00062 return $this->services[$key]; 00063 } 00064 00065 00071 public function hasService($key){ 00072 return array_key_exists($key, $this->services); 00073 } 00074 00075 00081 public function deleteService($key){ 00082 unset($this->services[$key]); 00083 } 00084 00085 }