Site icon Hip-Hop Website Design and Development

Error Undefined variable When attempting to set a personal variable in assemble in a category

that is my class:

class PagarmeDokanPagarmeFunctions{

    non-public $api_key, $pagarme;

    public perform __construct(){
        require("vendor/autoload.php");
        $this->$api_key = get_option('api_pagarme_dokan');
        $this->$pagarme = new PagarMeClient($this->$api_key);
    }
}

I create the non-public variables earlier than the development perform, and them i add worth to those vars within the assemble, considered one of them i give the worth of an possibility of my plugin, and the opposite accommodates one other class,
however it retrieves me this warning:

Warning: Undefined variable $api_key in C:xampphtdocsshotplace_clonewp-contentpluginsintegracao-pagarme-dokanpagarme-functions.php on line 9

Warning: Undefined variable $api_key in C:xampphtdocsshotplace_clonewp-contentpluginsintegracao-pagarme-dokanpagarme-functions.php on line 10

Warning: Undefined variable $pagarme in C:xampphtdocsshotplace_clonewp-contentpluginsintegracao-pagarme-dokanpagarme-functions.php on line 10

What am i lacking?