public function __construct($clientId = null, $clientSecret = null) { global $app_clientId, $app_clientSecret; // if client id wasn't passed, and it's in the settings.php file, use it from there if (!$clientId && isset($app_clientId)) { // if it's still the default, warn them if ($app_clientId == 'XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX') { throw new AppDotNetException('You must change the values defined in EZsettings.php'); } $clientId = $app_clientId; $clientSecret = $app_clientSecret; } // call the parent with the variables we have parent::__construct($clientId, $clientSecret); // set up ez streaming $this->registerStreamFunction(array($this, 'streamEZCallback')); // make sure we cleanup/destroy any streams when we exit register_shutdown_function(array($this, 'stopStreaming')); }