PEIP_ABS_Service_Activator.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 abstract class PEIP_ABS_Service_Activator
00023     extends PEIP_Pipe {
00024         
00025     protected 
00026         $serviceCallable;
00027         
00028     
00034     public function doReply(PEIP_INF_Message $message){
00035         if(is_callable($this->serviceCallable)){
00036             $res = call_user_func($this->serviceCallable, $message->getContent());
00037         }else{
00038             if(is_object($this->serviceCallable) && method_exists($this->serviceCallable, 'handle')){
00039                 $res = $this->serviceCallable->handle($message->getContent());
00040             }
00041         }
00042         $out = (bool)$message->hasHeader('REPLY_CHANNEL') 
00043                 ? $message->getHeader('REPLY_CHANNEL') 
00044                 : $this->outputChannel;    
00045         if($out){
00046             $this->replyMessage($res, $res);    
00047         }
00048     }  
00049     
00050 } 

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