get('entity'); switch(get_class($entity)) { case 'ServerAccount': $account = $entity; $server = $entity->server; break; case 'Group': $group = $entity; break; } $remote_entity = $this->get('remote_entity'); $mode = $this->get('mode'); $options = $this->get('options'); switch(get_class($remote_entity)) { case 'User': $remote_entity_name = $remote_entity->uid; break; case 'ServerAccount': $remote_entity_name = $remote_entity->name.'@'.$remote_entity->server->hostname; break; case 'Group': $remote_entity_name = $remote_entity->name; break; } ?>