예제 #1
0
  /**
   * Initializes the default client to use. Uses the socket consumer by default.
   * @param  string $secret   your project's secret key
   * @param  array  $options  passed straight to the client
   */
  public static function init($secret, $options = array()) {

  	if (!$secret){
  		throw new Exception("Analytics::init Secret parameter is required");
  	}

    self::$client = new Analytics_Client($secret, $options);
  }