mirror of
				https://github.com/Icinga/icingaweb2.git
				synced 2025-10-31 11:24:51 +01:00 
			
		
		
		
	
		
			
				
	
	
		
			22 lines
		
	
	
		
			438 B
		
	
	
	
		
			PHP
		
	
	
	
	
	
			
		
		
	
	
			22 lines
		
	
	
		
			438 B
		
	
	
	
		
			PHP
		
	
	
	
	
	
| <?php
 | |
| // {{{ICINGA_LICENSE_HEADER}}}
 | |
| // {{{ICINGA_LICENSE_HEADER}}}
 | |
| 
 | |
| namespace Icinga\Module\Monitoring\Command;
 | |
| 
 | |
| /**
 | |
|  * Base class for commands sent to an Icinga instance
 | |
|  */
 | |
| abstract class IcingaCommand
 | |
| {
 | |
|     /**
 | |
|      * Get the name of the command
 | |
|      *
 | |
|      * @return string
 | |
|      */
 | |
|     public function getName()
 | |
|     {
 | |
|         return substr_replace(end(explode('\\', get_called_class())), '', -7);  // Remove 'Command' Suffix
 | |
|     }
 | |
| }
 |