/**
  * Overidden constructor to take class-specific parameters
  * 
  * @param string $username
  * @param string $password
  * @param string $queueDir
  * @param integer $rotateInterval
  */
 public function __construct($username, $password, $queueDir = '/tmp', $rotateInterval = 10)
 {
     // Sanity check
     if ($rotateInterval < 5) {
         throw new Exception('Rotate interval set too low - Must be >= 5 seconds');
     }
     // Set subclass parameters
     $this->queueDir = $queueDir;
     $this->rotateInterval = $rotateInterval;
     // Call parent constructor
     return parent::__construct($username, $password);
 }
Exemple #2
0
 public function __construct($key, $secret, $stream)
 {
     parent::__construct($key, $secret);
     $this->stream = $stream;
 }
 public function __construct($username, $password)
 {
     // Call parent constructor
     return parent::__construct($username, $password);
 }
 public static function Initialize($basic_username = NULL, $basic_password = NULL, $oauth_token = NULL, $oauth_secret = NULL)
 {
     if (!self::$instance instanceof UserstreamPhirehose) {
         self::$instance = new UserstreamPhirehose($basic_username, $basic_password, UserstreamPhirehose::METHOD_USER);
     }
 }