本文整理汇总了PHP中APP::environment方法的典型用法代码示例。如果您正苦于以下问题:PHP APP::environment方法的具体用法?PHP APP::environment怎么用?PHP APP::environment使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类APP
的用法示例。
在下文中一共展示了APP::environment方法的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: handle
/**
* Execute the console command.
*
* @return mixed
*/
public function handle()
{
xAC::setApiKey(Config::get('arrowsphere-client.' . APP::environment() . '.XAC_APIKEY'));
xAC::setApiBaseUrl(Config::get('arrowsphere-client.' . APP::environment() . '.XAC_URL'));
xAC::setApiVersion(Config::get('arrowsphere-client.' . APP::environment() . '.XAC_APIVERSION'));
xAC::initServices(true);
return printf("Services list has been refreshed \n");
}
示例2: register
/**
* Register the service provider
* @return XacAPI
*/
public function register()
{
$this->app['arrowsphere.client'] = $this->app->share(function ($app) {
//Set apiKey and baseUrl on client.
xACClient::setApiKey(Config::get('arrowsphere-client.' . APP::environment() . '.XAC_APIKEY'));
xACClient::setApiBaseUrl(Config::get('arrowsphere-client.' . APP::environment() . '.XAC_URL'));
xACClient::setApiVersion(Config::get('arrowsphere-client.' . APP::environment() . '.XAC_APIVERSION'));
return xACClient::getInstance();
});
$this->app['command.arrowsphere.list'] = $this->app->share(function ($app) {
return new servicesListCommand($app['config'], $app['files'], $app['view']);
});
$this->app['command.arrowsphere.refresh'] = $this->app->share(function ($app) {
return new refreshListCommand($app['files']);
});
$this->commands('command.arrowsphere.list', 'command.arrowsphere.refresh');
$this->app->bind('Arrowsphere\\Client\\xAC', 'arrowsphere.client');
}