PEIP_Callable_Handler.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 
00020 class PEIP_Callable_Handler implements PEIP_INF_Handler {
00021 
00022     protected $callable;
00023     
00024     
00030     public function __construct($callable){
00031         $this->callable = $callable;    
00032     }
00033     
00034     
00040     public function handle($subject){
00041         return call_user_func($this->callable, $subject);
00042     }
00043 
00044     
00050     public function __invoke($subject){
00051         return $this->handle($subject); 
00052     }
00053 
00054     
00059     public function getCallable(){
00060         return $this->callable;
00061     }
00062     
00063 }

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