Google\Spreadsheet\Util::extractEndpoint PHP 메소드

extractEndpoint() 공개 정적인 메소드

Extracts the endpoint from a full google spreadsheet url.
public static extractEndpoint ( string $url ) : string
$url string
리턴 string
    public static function extractEndpoint($url)
    {
        return parse_url($url, PHP_URL_PATH);
    }

Usage Example

예제 #1
0
 public function testExtractEndpoint()
 {
     $url = 'https://spreadsheets.google.com/feeds/worksheets/tA3TdJ0RIVEem3xQZhG2Ceg/private/full/od8';
     $expected = '/feeds/worksheets/tA3TdJ0RIVEem3xQZhG2Ceg/private/full/od8';
     $actual = Util::extractEndpoint($url);
     $this->assertEquals($expected, $actual);
 }