getAccountId() публичный Метод

Gets Identifier of the Account
public getAccountId ( ) : integer
Результат integer Returns identifier of the Account
Пример #1
0
 /**
  * Prepares extra data to pass to a backend
  * Those include RUID, EUID, AccountID, environment etc.
  *
  * @return array Prepared extra data for logging
  */
 protected function getCommonData()
 {
     $data = empty($this->user) ? ["login" => $this->systemTask ? '_' . $this->systemTask : 'guest', "ruid" => null, "euid" => null, "env_id" => $this->envId ?: 0, "account_id" => $this->accountId] : ["login" => $this->user->getEmail(), "ruid" => $this->realUserId ?: $this->user->id, "euid" => $this->user->id, "env_id" => $this->envId ?: 0, "account_id" => empty($this->accountId) ? $this->user->getAccountId() : $this->accountId];
     $data['ip_address'] = $this->ipAddress;
     $data['timestamp'] = AuditLogger::getTimestamp();
     $data['request_type'] = $this->requestType;
     return $data;
 }
Пример #2
0
 /**
  * Creates and save Account Team entities with data from fixtures
  *
  * @param string $name Account Team data name
  */
 protected function prepareAccountTeam($name)
 {
     foreach ($this->sets[$name] as &$accTeamData) {
         $accTeamData['accountId'] = static::$user->getAccountId();
         /* @var  $accTeam Account\Team() */
         $accTeam = ApiTest::createEntity(new Account\Team(), $accTeamData);
         $accTeamData['id'] = $accTeam->id;
     }
 }
Пример #3
0
 /**
  * {@inheritdoc}
  * @see \Scalr\LogCollector\AuditLoggerRetrieveConfigurationInterface::getAuditLoggerConfig()
  */
 public function getAuditLoggerConfig()
 {
     $config = new AuditLoggerConfiguration(AuditLogger::REQUEST_TYPE_API);
     $config->user = $this->user;
     $config->accountId = $this->user ? $this->user->getAccountId() : null;
     $config->envId = $this->env ? $this->env->id : null;
     $config->remoteAddr = $this->request->getIp();
     return $config;
 }