Skip to content

Commit

Permalink
google-api-php-client will be managed by composer
Browse files Browse the repository at this point in the history
  • Loading branch information
mamor committed Feb 19, 2014
1 parent ecca62d commit a9ed352
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 6 deletions.
15 changes: 10 additions & 5 deletions classes/gdata.php
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,15 @@

namespace Gdata;

if (file_exists(__DIR__.'/../vendor/autoload.php'))
{
require_once __DIR__.'/../vendor/autoload.php';
}
else
{
require_once VENDORPATH.'autoload.php';
}

/**
* FuelPHP Gdata package
*
Expand Down Expand Up @@ -101,11 +110,7 @@ public static function instance($instance = null)
*/
public function __construct($service, array $config)
{
require_once PKGPATH."gdata/vendor/google-api-php-client/src/Google_Client.php";

$service_class = 'Google_'.ucfirst(strtolower($service)).'Service';
require_once PKGPATH."gdata/vendor/google-api-php-client/src/contrib/{$service_class}.php";

$service_class = '\Google_Service_'.$service;
if( ! class_exists($service_class))
{
throw new \FuelException('Could not find Gdata service class: '.$service_class);
Expand Down
3 changes: 2 additions & 1 deletion composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,8 @@
"name": "mp-php/fuel-packages-gdata",
"type": "fuel-package",
"require": {
"composer/installers": "*"
"composer/installers": "*",
"google/apiclient": "1.*@dev"
},
"extra": {
"installer-name": "gdata"
Expand Down

0 comments on commit a9ed352

Please sign in to comment.