コード例 #1
0
 /**
  * get the wib client, lazy loading the client library if this is the first call
  *
  * @return void
  * @author Craig Ulliott
  */
 public static function getClient()
 {
     if (!self::$wib) {
         // the wib client has its own database connection
         $database_configuration = getConfiguration('db', 'db1');
         // lazy load the library to keep memory use low
         require 'whereivebeen.php';
         // get the configuration
         $config = getConfiguration('wib');
         // setup the object
         self::$wib = new WhereIveBeen(array_val_required($config, 'api_key'), array_val_required($config, 'api_secret'), $database_configuration, $use_oauth = true, array_val_required($config, 'server_addr'), array_val_required($config, 'authorize_uri'));
     }
     return self::$wib;
 }