Scalr\Api\Rest\ApiApplication::getScope PHP Method

getScope() public method

Gets current API request scope
public getScope ( ) : string
return string Returns scope
    public function getScope()
    {
        return isset($this->env) ? ScopeInterface::SCOPE_ENVIRONMENT : (isset($this->user) ? ScopeInterface::SCOPE_ACCOUNT : ScopeInterface::SCOPE_SCALR);
    }

Usage Example

Beispiel #1
0
 /**
  * Gets current API request scope
  *
  * @return string Returns scope
  */
 public function getScope()
 {
     return $this->app->getScope();
 }