public function __construct($sURL, $iMethod, $sPostString = "") { parent::__construct(); $this->_sURL = $sURL; $this->_iMethod = $iMethod; $this->_sPostString = $sPostString; }
public function __construct() { $iCallLimit = GITHUB_API_CALL_LIMIT; $iNow = time(); if (self::$_iStartTime == 0) { self::$_iStartTime = time(); } else { if ($iNow - self::$_iStartTime < $iCallLimit && self::$_iCounter >= $iCallLimit || self::$_iCounter >= $iCallLimit) { throw new LimitException("Exceeded limit requests (" . $iCallLimit . " per minute)"); } else { if ($iNow - self::$_iStartTime > self::iSecondsPerMinute) { self::$_iCounter = 0; self::$_iStartTime = time(); } } } self::$_iCounter++; self::$_iElapsedTime = $iNow - self::$_iStartTime; }
public function __construct() { parent::__construct(); }