protected function loadTokenFromFile($filename)
    {
        if (strpos($filename, '/') !== 0 && strpos($filename, '\\') !== 0) {
            $filename = $this->config->getUserConfigDir() . '/' . $filename;
        }

        $content = file_get_contents($filename);
        if ($content === false) {
            throw new \RuntimeException('Failed to read file: ' . $filename);
        }

        return trim($content);
    }
protected function loadTokenFromFile($filename)
    {
        if (strpos($filename, '/') !== 0 && strpos($filename, '\\') !== 0) {
            $filename = $this->config->getUserConfigDir() . '/' . $filename;
        }

        $content = file_get_contents($filename);
        if ($content === false) {
            throw new \RuntimeException('Failed to read file: ' . $filename);
        }

        return trim($content);
    }
protected function loadTokenFromFile ( $ filename ) { if ( strpos ( $ filename , '/' ) !== 0 && strpos ( $ filename , '\\' ) !== 0 ) { $ filename = $ this -> config -> getUserConfigDir ( ) . '/' . $ filename ; } $ content = file_get_contents ( $ filename ) ; if ( $ content === false ) { throw new \ RuntimeException ( 'Failed to read file: ' . $ filename ) ; } return trim ( $ content ) ; }
Load an API token from a file.

@param string $filename
A filename, either relative to the user config directory, or absolute.

@return string
Load an API token from a file .