mirror of
				https://github.com/Icinga/icingaweb2.git
				synced 2025-10-31 19:34:16 +01:00 
			
		
		
		
	Adding suffix "Hook" to every base class. This simplifies development because you don't need to alias bases classes in your concrete hook classes refs #6928
		
			
				
	
	
		
			44 lines
		
	
	
		
			982 B
		
	
	
	
		
			PHP
		
	
	
	
	
	
			
		
		
	
	
			44 lines
		
	
	
		
			982 B
		
	
	
	
		
			PHP
		
	
	
	
	
	
| <?php
 | |
| // {{{ICINGA_LICENSE_HEADER}}}
 | |
| // {{{ICINGA_LICENSE_HEADER}}}
 | |
| 
 | |
| namespace Icinga\Web\Hook;
 | |
| 
 | |
| /**
 | |
|  * Icinga Web Ticket Hook base class
 | |
|  *
 | |
|  * Extend this class if you want to integrate your ticketing solution nicely into
 | |
|  * Icinga Web
 | |
|  *
 | |
|  * @copyright  Copyright (c) 2013 Icinga-Web Team <info@icinga.org>
 | |
|  * @author     Icinga-Web Team <info@icinga.org>
 | |
|  * @license    http://www.gnu.org/copyleft/gpl.html GNU General Public License
 | |
|  */
 | |
| abstract class TicketHook
 | |
| {
 | |
|     /**
 | |
|      * Constructor must live without arguments right now
 | |
|      *
 | |
|      * Therefore the constructor is final, we might change our opinion about
 | |
|      * this one far day
 | |
|      */
 | |
|     final public function __construct()
 | |
|     {
 | |
|         $this->init();
 | |
|     }
 | |
| 
 | |
|     /**
 | |
|      * Overwrite this function if you want to do some initialization stuff
 | |
|      *
 | |
|      * @return void
 | |
|      */
 | |
|     protected function init()
 | |
|     {
 | |
|     }
 | |
| 
 | |
|     abstract public function getPattern();
 | |
| 
 | |
|     abstract public function createLink($match);
 | |
| 
 | |
| }
 |