private function lookup_message_variables($matches) {
        $options = array(
                'operation' => $this->type,
                'backupid' => $this->backupid,
                'user_username' => $this->user->username,
                'user_email' => $this->user->email,
                'user_firstname' => $this->user->firstname,
                'user_lastname' => $this->user->lastname,
                'link' => $this->get_resource_link(),
        );

        $match = $options[$matches[1]] ?? $matches[1];

        return $match;
    }
private function lookup_message_variables($matches) {
        $options = array(
                'operation' => $this->type,
                'backupid' => $this->backupid,
                'user_username' => $this->user->username,
                'user_email' => $this->user->email,
                'user_firstname' => $this->user->firstname,
                'user_lastname' => $this->user->lastname,
                'link' => $this->get_resource_link(),
        );

        $match = $options[$matches[1]] ?? $matches[1];

        return $match;
    }
private function lookup_message_variables ( $ matches ) { $ options = array ( 'operation' => $ this -> type , 'backupid' => $ this -> backupid , 'user_username' => $ this -> user -> username , 'user_email' => $ this -> user -> email , 'user_firstname' => $ this -> user -> firstname , 'user_lastname' => $ this -> user -> lastname , 'link' => $ this -> get_resource_link ( ) , ) ; $ match = $ options [ $ matches [ 1 ] ] ?? $ matches [ 1 ] ; return $ match ; }
Callback for preg_replace_callback.
Replaces message placeholders with real values.

@param array $matches The match array from from preg_replace_callback.
@return string $match The replaced string.
Callback for preg_replace_callback . Replaces message placeholders with real values .