mirror of
				https://github.com/Icinga/icingaweb2.git
				synced 2025-11-04 05:05:01 +01:00 
			
		
		
		
	
		
			
				
	
	
		
			22 lines
		
	
	
		
			468 B
		
	
	
	
		
			PHP
		
	
	
	
	
	
			
		
		
	
	
			22 lines
		
	
	
		
			468 B
		
	
	
	
		
			PHP
		
	
	
	
	
	
<?php
 | 
						|
/* Icinga Web 2 | (c) 2014 Icinga Development Team | GPLv2+ */
 | 
						|
 | 
						|
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()
 | 
						|
    {
 | 
						|
        $nsParts = explode('\\', get_called_class());
 | 
						|
        return substr_replace(end($nsParts), '', -7);  // Remove 'Command' Suffix
 | 
						|
    }
 | 
						|
}
 |