freezy-bee/google-drive

StreamWrapper for Google Drive

dev-master 2016-09-26 17:34 UTC

README

GoogleDrive StreamWrapper (read-only NOW).

Requirements

FreezyBee/GoogleDrive requires PHP 7.0

Installation

The best way to install FreezyBee/GoogleDrive is using Composer:

$ composer require freezy-bee/google-drive

Example


    // register stream
    $gd = FreezyBee\GoogleDrive\GoogleDrive($pathToJsonFile);
    $gd->registerStreamWrapper();

    // download file
    $content = file_get_contents('gdrive://folder/file.jpg');

    // Nette Finder
    foreach (\Nette\Utils\Finder::find('*')->from('gdrive://Test') as $name => $file) {
        dump($name);
    }

    // Symfony Finder
    $finder = new \Symfony\Component\Finder\Finder;
    $finder->files()->in('gdrive://Test');

Homepage https://freezybee.ifire.cz and repository http://github.com/FreezyBee/GoogleDrive.