/**
  * Retrieve an instance of the class
  *
  * @return  webservices.soap.SoapDriver self::$instance
  */
 public static function getInstance()
 {
     if (NULL === self::$instance) {
         self::$instance = new self();
     }
     return self::$instance;
 }
 /**
  * Constructor
  *
  * @param   string endpoint default 'http://api.google.com/search/beta2'
  */
 public function __construct($endpoint = 'http://api.google.com/search/beta2')
 {
     $this->client = SoapDriver::getInstance()->forEndpoint($endpoint, 'urn:GoogleSearch');
     $this->client->registerMapping(new QName('urn:GoogleSearch', 'GoogleSearchResult'), XPClass::forName('com.google.soap.search.GoogleSearchResult'));
     $this->client->registerMapping(new QName('urn:GoogleSearch', 'ResultElement'), XPClass::forName('com.google.soap.search.ResultElement'));
     $this->client->registerMapping(new QName('urn:GoogleSearch', 'DirectoryCategory'), XPClass::forName('com.google.soap.search.DirectoryCategory'));
 }