Welcome Guest, Not a member yet? Register   Sign In
Load google-api-php-client as package
#2

[eluser]Karman de Lange[/eluser]
Probably not the best way of doing it, but it works (well for me)

Create new file under application/library called google.php

Code:
<?php

if (!defined('BASEPATH'))
    exit('No direct script access allowed');

set_include_path(APPPATH . 'third_party/' . PATH_SEPARATOR . get_include_path());

require_once APPPATH . 'third_party/Google/Client.php';


class Google extends Google_Client {


    function __construct($params = array()) {

        parent::__construct();
    }

}


Then to use:

Code:
$this->load->library('google');
        echo $this->google->getLibraryVersion();


Messages In This Thread
Load google-api-php-client as package - by El Forum - 12-23-2013, 05:09 AM
Load google-api-php-client as package - by El Forum - 12-23-2013, 05:35 AM
Load google-api-php-client as package - by El Forum - 12-23-2013, 07:07 AM
Load google-api-php-client as package - by El Forum - 12-23-2013, 07:28 AM
Load google-api-php-client as package - by El Forum - 12-23-2013, 08:12 AM
Load google-api-php-client as package - by El Forum - 12-23-2013, 08:58 AM
Load google-api-php-client as package - by El Forum - 12-23-2013, 09:45 AM



Theme © iAndrew 2016 - Forum software by © MyBB