PEIP_Channel_Registry.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 
00021 class PEIP_Channel_Registry 
00022     implements PEIP_INF_Channel_Resolver {
00023 
00024     protected $channels = array();
00025 
00026     protected static $instance;
00027     
00033     public function getInstance(){
00034         return self::$instance ? self::$instance : self::$instance = new PEIP_Channel_Registry;
00035     }
00036     
00037     
00043     public function register($channel){
00044         $this->channels[$channel->getName()] = $channel;
00045     }
00046 
00047     
00048     
00049     
00055     public function get($name){
00056         return $this->channels[$name];
00057     }
00058 
00059     
00065     public function resolveChannelName($channelName){
00066         return $this->get($channelName);
00067     }   
00068     
00069 }

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