private function _init()
 {
     self::$base = "";
 }
<?php

//----------------------------------------------------------------------------
// Bootstrap
//----------------------------------------------------------------------------
define('ROOT_PATH', realpath(dirname(__FILE__) . '/../') . '/');
require ROOT_PATH . 'lib/boot/bootstrap.php';
session_start();
$token = "ya29.AHES6ZSi8xWxhiidj5s4BlP0_OotCaNbP5NBwh_dkok9rHiDY-OmQA";
$docs = new Googledocs();
$results = array();
$docInfo = array();
if (!getParam('action')) {
    $results = $docs->getDocs($token);
} else {
    $docInfo = $docs->getDoc(getParam('docId'), $token);
}
require_once "src/apiClient.php";
$client = new apiClient();
$client->discover('plus');
$client->setScopes(array('http://docs.google.com/feeds/'));
if (isset($_GET['logout'])) {
    unset($_SESSION['token']);
}
if (isset($_GET['code'])) {
    $client->authenticate();
    $_SESSION['token'] = $client->getAccessToken();
    $redirect = 'http://' . $_SERVER['HTTP_HOST'] . $_SERVER['PHP_SELF'];
    header('Location: ' . filter_var($redirect, FILTER_SANITIZE_URL));
}
if (isset($_SESSION['token'])) {