EVENT_TYPE::GetEventDescription PHP Method

GetEventDescription() public static method

public static GetEventDescription ( $event_type )
    public static function GetEventDescription($event_type)
    {
        $descriptions = array(self::HOST_UP => _("Instance started and configured."), self::BEFORE_HOST_UP => _("Time for user-defined actions before instance will be added to DNS, LoadBalancer, etc."), self::HOST_DOWN => _("Instance terminated."), self::REBUNDLE_COMPLETE => _("\"Synchronize to all\" or custom role creation competed successfully."), self::REBUNDLE_FAILED => _("\"Synchronize to all\" or custom role creation failed."), self::REBOOT_BEGIN => _("Instance being rebooted."), self::REBOOT_COMPLETE => _("Instance came up after reboot."), self::RESUME_COMPLETE => _("Instance successfully resumed after suspension."), self::FARM_LAUNCHED => _("Farm has been launched."), self::FARM_TERMINATED => _("Farm has been terminated."), self::HOST_INIT => _("Instance booted up, Scalr environment not configured and services not initialized yet."), self::NEW_MYSQL_MASTER => _("One of MySQL instances promoted as master on boot up, or one of mySQL slaves promoted as master."), self::MYSQL_BACKUP_COMPLETE => _("MySQL backup completed successfully."), self::MYSQL_BACKUP_FAIL => _("MySQL backup failed."), self::INSTANCE_IP_ADDRESS_CHANGED => _("Public IP address of the instance was changed upon reboot or within Elastic IP assignments."), self::EBS_VOLUME_MOUNTED => _("Single EBS volume or array of EBS volumes attached and mounted to instance."), self::BEFORE_INSTANCE_LAUNCH => _("New instance will be launched in a few minutes"), self::BEFORE_HOST_TERMINATE => _("Instance will be terminated in 3 minutes"), self::EBS_VOLUME_ATTACHED => _("EBS volume attached to instance."), self::CHECK_FAILED => _("Check failed"), self::CHECK_RECOVERED => _("Check recovered"));
        return $descriptions[$event_type];
    }

Usage Example

 public static function GetConfigurationForm()
 {
     $ConfigurationForm = new DataForm();
     $ConfigurationForm->SetInlineHelp("");
     $ConfigurationForm->AppendField(new DataFormField("IsEnabled", FORM_FIELD_TYPE::CHECKBOX, "Enabled"));
     $ReflectionInterface = new ReflectionClass("IEventObserver");
     $events = $ReflectionInterface->getMethods();
     $ConfigurationForm->AppendField(new DataFormField("", FORM_FIELD_TYPE::SEPARATOR, "Request URL on following events"));
     foreach ($events as $event) {
         $name = substr($event->getName(), 2);
         $ConfigurationForm->AppendField(new DataFormField("{$event->getName()}NotifyURL", FORM_FIELD_TYPE::TEXT, "{$name} URL", false, array(), null, null, EVENT_TYPE::GetEventDescription($name)));
     }
     return $ConfigurationForm;
 }
All Usage Examples Of EVENT_TYPE::GetEventDescription