lib/BlockCypher/Cache/AuthorizationCache.php
public static function pull($config = null, $clientId = null)
    {
        // Return if not enabled
        if (!self::isEnabled($config)) {
            return null;
        }

        $tokens = null;
        $cachePath = self::cachePath($config);
        if (file_exists($cachePath)) {
            // Read from the file
            $cachedToken = file_get_contents($cachePath);
            if ($cachedToken && JsonValidator::validate($cachedToken, true)) {
                $tokens = json_decode($cachedToken, true);
                if ($clientId && is_array($tokens) && array_key_exists($clientId, $tokens)) {
                    // If client Id is found, just send in that data only
                    return $tokens[$clientId];
                } else if ($clientId) {
                    // If client Id is provided, but no key in persisted data found matching it.
                    return null;
                }
            }
        }
        return $tokens;
    }
public static function pull($config = null, $clientId = null)
    {
        // Return if not enabled
        if (!self::isEnabled($config)) {
            return null;
        }

        $tokens = null;
        $cachePath = self::cachePath($config);
        if (file_exists($cachePath)) {
            // Read from the file
            $cachedToken = file_get_contents($cachePath);
            if ($cachedToken && JsonValidator::validate($cachedToken, true)) {
                $tokens = json_decode($cachedToken, true);
                if ($clientId && is_array($tokens) && array_key_exists($clientId, $tokens)) {
                    // If client Id is found, just send in that data only
                    return $tokens[$clientId];
                } else if ($clientId) {
                    // If client Id is provided, but no key in persisted data found matching it.
                    return null;
                }
            }
        }
        return $tokens;
    }
public static function pull ( $ config = null , $ clientId = null ) { // Return if not enabled if ( ! self :: isEnabled ( $ config ) ) { return null ; } $ tokens = null ; $ cachePath = self :: cachePath ( $ config ) ; if ( file_exists ( $ cachePath ) ) { // Read from the file $ cachedToken = file_get_contents ( $ cachePath ) ; if ( $ cachedToken && JsonValidator :: validate ( $ cachedToken , true ) ) { $ tokens = json_decode ( $ cachedToken , true ) ; if ( $ clientId && is_array ( $ tokens ) && array_key_exists ( $ clientId , $ tokens ) ) { // If client Id is found, just send in that data only return $ tokens [ $ clientId ] ; } else if ( $ clientId ) { // If client Id is provided, but no key in persisted data found matching it. return null ; } } } return $ tokens ; }
A pull method which would read the persisted data based on clientId.
If clientId is not provided, an array with all the tokens would be passed.

@param array|null $config
@param string $clientId
@return mixed|null
A pull method which would read the persisted data based on clientId . If clientId is not provided an array with all the tokens would be passed .