getEth

@return \Web3\Eth
767968
public function getEth()
    {
        if (!isset($this->eth)) {
            $eth = new Eth($this->provider);
            $this->eth = $eth;
        }
        return $this->eth;
    }
875065
public function getSecurity()
	{
		$dbname = $this->client->getDatabaseName();
		$raw = $this->client->query(
				"GET", "/" . $dbname . "/_security"
		);
		$resp = Couch::parseRawResponse($raw);
		if ($resp['status_code'] != 200) {
			throw new CouchException($raw);
		}
		if (!property_exists($resp['body'], "admins")) {
			$resp["body"]->admins = new stdClass();
			$resp["body"]->admins->names = array();
			$resp["body"]->admins->roles = array();
			$resp["body"]->readers = new stdClass();
			$resp["body"]->readers->names = array();
			$resp["body"]->readers->roles = array();
		}
		return $resp['body'];
	}
255383
public function getUri()
    {
        $schema = "http";

        if ($this->isSecure) {
            $schema = "https";
        }
        
        $uri = sprintf(
            "%s://%s%s",
            $schema,
            $this->serverName,
            $this->path
        );
        
        return new Uri($uri);
    }
1287924
static public function getToken()
    {
        if ( self::$token === null )
        {
            self::$token = sha1( self::getSecret() . self::getIntention() . session_id() );
        }

        return self::$token;
    }
394039
static public function getInternalToken() {
        static $token;
        if (is_null($token)) {
            $payload = [
                "exp" => time() + Moment::ONEHOUR,
                "sub" => Util::getModuleId() . "@" . Util::getApplicationId()
            ];
            $secret = self::getSecret(self::CONF_INTERNAL_SECRET_NAME);
            $token = \Firebase\JWT\JWT::encode($payload, $secret, self::ALG);
        }
        return $token;
    }
657578
public function getEmos()
    {
        if ($this->_oEmos === null) {
            $this->_oEmos = new Emos($this->_getScriptPath());

            // make output more readable
            $this->_oEmos->prettyPrint();
            //$this->_oEmos->setSid( $this->getSession()->getId() );

            // set page id
            $this->_oEmos->addPageId($this->_getEmosPageId($this->_getTplName()));

            // language id
            $this->_oEmos->addLangId(\OxidEsales\Eshop\Core\Registry::getLang()->getBaseLanguage());

            // set site ID
            $this->_oEmos->addSiteId(\OxidEsales\Eshop\Core\Registry::getConfig()->getShopId());
        }

        return $this->_oEmos;
    }
1163632
public function getRepoUrl()
    {
        switch ($this->type) {
            case 'github':
                return "git@github.com:{$this->name}.git";

            case 'github-https':
                return "https://github.com/{$this->name}.git";

            case 'gitlab':
                return "git@gitlab.com:{$this->name}.git";
                break;

            case 'bitbucket':
                return "git@bitbucket.org:{$this->name}.git";

            default:

                // Check of type 'scheme://host/path'
                if (filter_var($this->type, FILTER_VALIDATE_URL)) {
                    return $this->type;
                }

                // Check of type 'user@host'
                if (filter_var($this->type, FILTER_VALIDATE_EMAIL)) {
                    return "{$this->type}:{$this->name}.git";
                }

                return;
                break;
        }
    }
840394
public function getToken()
    {
        if(isset($this->_tokens[$this->_position])) {
            return $this->_tokens[$this->_position];
        } else {
            return null;
        }
    }
923642
private function getAuthHeader()
    {
        $credential = $this->apiContext->getCredential();

        $header = '<wsse:Security SOAP-ENV:mustUnderstand="1" xmlns:wsse="http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-secext-1.0.xsd">';
        $header .= '<wsse:UsernameToken wsu:Id="UsernameToken-9" xmlns:wsu="http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-utility-1.0.xsd">';
        $header .= '<wsse:Username>' . $credential->getUsername() . '</wsse:Username>';
        $header .= '<wsse:Password Type="http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-username-token-profile-1.0#PasswordText">' . $credential->getPassword() . '</wsse:Password>';
        $header .= '</wsse:UsernameToken>';
        $header .= '</wsse:Security>';

        $headerbody = new \SoapVar($header, XSD_ANYXML, null, null, null);
        return new \SOAPHeader(self::PAYU_NAMESPACE, 'Security', $headerbody, true);
    }
903412
public function getXPath()
    {
      if(!isset($this->xpath))
      {
        $this->xpath = new DOMXPath($this);

        if($this->documentElement->namespaceURI <> '')
          $this->xpath->registerNamespace('default', $this->documentElement->namespaceURI);

        /*foreach ($this->getNamespaces() as $prefix => $namespaceUri)
          $this->xpath->registerNamespace($prefix, $namespaceUri);*/
      }

      return $this->xpath;
    }
1328064
public static function getHostUri()
  {
    $sheme = (self::getHostParam("HTTPS") == "on") ? "https" : "http";

    $serverName = new Str(self::getHostParam("HTTP_HOST"));
    $serverPort = self::getHostParam("SERVER_PORT");
    $serverPort = ($serverPort != 80 && $serverPort != 443) ? ":" . $serverPort : "";

    if($serverName->endsWith($serverPort))
    {
      $serverName = $serverName->replace($serverPort, "");
    }

    return new Str($sheme . "://" . $serverName . $serverPort);
  }
1091196
public function getJWT()
	{
		if($this->personalKeyPair === NULL)
			throw new \Exception("JWT cannot be built without the personalKey");
		
		// create and sign JWT
		$signer = new Sha512();
		
		$personalPrivateKey = PrivateKey::formatPEM($this->personalKeyPair->getPrivateKey());
		
		$token = (new Builder())
			->set('socialRecord', base64_encode($this->socialRecord->getJSONString()))
			->sign($signer, $personalPrivateKey)
			->getToken();
		
		return $token->__toString();
	}
127712
public function getConnection()
    {
        if ($this->connection === null) {
            $this->connection = ConnectionManager::get('auditlog_elastic');
        }

        return $this->connection;
    }
150775
public function getToken()
    {
        if (Cache::has(self::CACHE_NAME)) {
            return Cache::get(self::CACHE_NAME);
        } else {
            $url    = $this->url."token";
            $option = [
                'grant_type'    => 'client_credentials',
                'client_id'     => $this->client_id,
                'client_secret' => $this->client_secret,
            ];
            $return = Http::postCurl($url, $option);
            Cache::put(self::CACHE_NAME, $return['access_token'], (int) ($return['expires_in'] / 60));

            return $return['access_token'];

        }
    }
618008
public function getClient($path = '/solr')
    {
        $options = $this->options;
        $options = [
            'secure' => $options->isSecure(),
            'hostname' => $options->getHostname(),
            'port' => $options->getPort(),
            'path' => $path,
            'login' => $options->getUsername(),
            'password' => $options->getPassword(),
            'wt' => 'phps'
        ];
        $key = md5(implode(':', $options));
        
        if (!isset($this->clients[$key])) {
            $this->clients[$key] = new SolrClient($options);
        }

        return $this->clients[$key];
    }
1228684
function exchangeToken()
    {
        $this->isTokenExchanged = true;
        $token = $this->client->attainAccessToken( $this->grant );
        return $this->token = $token;
    }
532094
public function getTokenForRequest()
    {
        if (!$this->jwt->isHealthy() && $this->request->headers->has('Authorization')) {
          list($jwt_token) = sscanf( $this->request->headers->get('Authorization'), 'Bearer %s');
          $this->jwt->setToken($jwt_token);
        }

        return $this->jwt->getToken();
    }