public function exchangeComponentAccessToken(){ $values['config']['app_id'] = 'xxx'; $values['config']['secret'] = 'xxx'; $values['config']['verify_ticket'] = 'xxxx'; $app = new Container($values); //这里会生成一个对象方法 $AccessToken = new AccessToken($app); }
//$this->app 这个是等于我上面赋值过去的return [ 'component_appid' => $this->app['config']['app_id'], 'component_appsecret' => $this->app['config']['secret'], //这里我不想改代码,因为这是个框架,我想按照他去赋值,但是我上面该怎么赋值呢 'component_verify_ticket' => $this->app['verify_ticket']->getTicket(), ];
largeQ