diff options
Diffstat (limited to 'library/Director/Data/PropertiesFilter.php')
-rw-r--r-- | library/Director/Data/PropertiesFilter.php | 25 |
1 files changed, 25 insertions, 0 deletions
diff --git a/library/Director/Data/PropertiesFilter.php b/library/Director/Data/PropertiesFilter.php new file mode 100644 index 0000000..a8c3906 --- /dev/null +++ b/library/Director/Data/PropertiesFilter.php @@ -0,0 +1,25 @@ +<?php + +namespace Icinga\Module\Director\Data; + +class PropertiesFilter +{ + public static $CUSTOM_PROPERTY = 'CUSTOM_PROPERTY'; + public static $HOST_PROPERTY = 'HOST_PROPERTY'; + public static $SERVICE_PROPERTY = 'SERVICE_PROPERTY'; + + protected $blacklist = array( + 'id', + 'object_name', + 'object_type', + 'disabled', + 'has_agent', + 'master_should_connect', + 'accept_config', + ); + + public function match($type, $name, $object = null) + { + return ($type != self::$HOST_PROPERTY || !in_array($name, $this->blacklist)); + } +} |