lib/BlockCypher/Core/BlockCypherCredentialManager.php
public function getCredentialObject($userId = null)
    {
        if ($userId == null && array_key_exists($this->defaultAccountName, $this->credentialHashmap)) {
            $credObj = $this->credentialHashmap[$this->defaultAccountName];
        } else if (array_key_exists($userId, $this->credentialHashmap)) {
            $credObj = $this->credentialHashmap[$userId];
        }

        if (empty($credObj)) {
            throw new BlockCypherInvalidCredentialException("Credential not found for " . ($userId ? $userId : " default user") .
                ". Please make sure your configuration/APIContext has credential information");
        }
        return $credObj;
    }
public function getCredentialObject($userId = null)
    {
        if ($userId == null && array_key_exists($this->defaultAccountName, $this->credentialHashmap)) {
            $credObj = $this->credentialHashmap[$this->defaultAccountName];
        } else if (array_key_exists($userId, $this->credentialHashmap)) {
            $credObj = $this->credentialHashmap[$userId];
        }

        if (empty($credObj)) {
            throw new BlockCypherInvalidCredentialException("Credential not found for " . ($userId ? $userId : " default user") .
                ". Please make sure your configuration/APIContext has credential information");
        }
        return $credObj;
    }
public function getCredentialObject ( $ userId = null ) { if ( $ userId == null && array_key_exists ( $ this -> defaultAccountName , $ this -> credentialHashmap ) ) { $ credObj = $ this -> credentialHashmap [ $ this -> defaultAccountName ] ; } else if ( array_key_exists ( $ userId , $ this -> credentialHashmap ) ) { $ credObj = $ this -> credentialHashmap [ $ userId ] ; } if ( empty ( $ credObj ) ) { throw new BlockCypherInvalidCredentialException ( "Credential not found for " . ( $ userId ? $ userId : " default user" ) . ". Please make sure your configuration/APIContext has credential information" ) ; } return $ credObj ; }
Obtain Credential Object based on UserId provided.

@param null $userId
@return SimpleTokenCredential
@throws BlockCypherInvalidCredentialException
Obtain Credential Object based on UserId provided .