protected function getVal($key, $show=TRUE)
    {
      if (!($this->credentials instanceof CredentialsUser)) {
        $content = json_decode(file_get_contents(self::$credentials_opts['path']));
      } else {
        $content = $this->credentials;
      }

      if (!array_key_exists($key, get_object_vars($content))) {
        return false;
      }

      if (is_array($content->{$key})) {
        return implode(",", $content->{$key});
      }
            
      return $content->{$key};
    }
protected function getVal($key, $show=TRUE)
    {
      if (!($this->credentials instanceof CredentialsUser)) {
        $content = json_decode(file_get_contents(self::$credentials_opts['path']));
      } else {
        $content = $this->credentials;
      }

      if (!array_key_exists($key, get_object_vars($content))) {
        return false;
      }

      if (is_array($content->{$key})) {
        return implode(",", $content->{$key});
      }
            
      return $content->{$key};
    }
protected function getVal ( $ key , $ show = TRUE ) { if ( ! ( $ this -> credentials instanceof CredentialsUser ) ) { $ content = json_decode ( file_get_contents ( self :: $ credentials_opts [ 'path' ] ) ) ; } else { $ content = $ this -> credentials ; } if ( ! array_key_exists ( $ key , get_object_vars ( $ content ) ) ) { return false ; } if ( is_array ( $ content -> { $ key } ) ) { return implode ( "," , $ content -> { $ key } ) ; } return $ content -> { $ key } ; }
Gets either a singular
or array based value by
key. Where all keys are
elements in the credentials.json
file.
@param key: key for element
@param show: omit with asterisks
Gets either a singular or array based value by key . Where all keys are elements in the credentials . json file .