mirror of
				https://github.com/alchemy-fr/Phraseanet.git
				synced 2025-10-27 03:43:12 +00:00 
			
		
		
		
	
		
			
				
	
	
		
			22 lines
		
	
	
		
			375 B
		
	
	
	
		
			PHP
		
	
	
	
	
	
			
		
		
	
	
			22 lines
		
	
	
		
			375 B
		
	
	
	
		
			PHP
		
	
	
	
	
	
| <?php
 | |
| 
 | |
| namespace Alchemy\Phrasea\Webhook\Processor;
 | |
| 
 | |
| class CallableProcessorFactory implements ProcessorFactory
 | |
| {
 | |
| 
 | |
|     private $factoryMethod;
 | |
| 
 | |
|     public function __construct($callable)
 | |
|     {
 | |
|         $this->factoryMethod = $callable;
 | |
|     }
 | |
| 
 | |
|     public function createProcessor()
 | |
|     {
 | |
|         $factoryMethod = $this->factoryMethod;
 | |
| 
 | |
|         return $factoryMethod();
 | |
|     }
 | |
| }
 | 
