コード例 #1
0
ファイル: Watch.php プロジェクト: hpbuniat/testy
 /**
  * Run the watch-loop
  *
  * @param  \stdClass $oConfig
  * @param  int $iSleep
  *
  * @return $this
  *
  * @throws Exception
  */
 public function loop(\stdClass $oConfig = null, $iSleep)
 {
     if (empty($oConfig->adapter) === true) {
         throw new Exception(Exception::MISSING_TRANSPORT);
     }
     $iTime = $this->_iTimestamp;
     $this->_iTimestamp = time();
     if ($iTime === $this->_iTimestamp) {
         $this->_iTimestamp += $iSleep;
     }
     $oParallel = \parallely\Builder::build($this->_aStack, $oConfig->adapter, $oConfig->config);
     $oParallel->run(array('check' => array($iTime), 'run'));
     unset($oParallel);
     return $this;
 }
コード例 #2
0
ファイル: Aggregator.php プロジェクト: hpbuniat/mergy
 /**
  * Get all Revision-Details
  *
  * @param  boolean $bCreateDiff [true]
  *
  * @return Aggregator
  */
 public function run($bCreateDiff = true)
 {
     foreach ($this->_aArguments['revisions'] as $sRevision) {
         $this->_aRevisions[] = $this->_oBuilder->build($this->_aArguments['config']->remote, $sRevision);
     }
     $aActions = array('read');
     if ($bCreateDiff === true) {
         $aActions[] = 'diff';
     }
     $oParallel = \parallely\Builder::build($this->_aRevisions, $this->_aArguments['config']->parallel);
     $this->_aRevisions = $oParallel->run($aActions)->get();
     unset($oParallel);
     return $this;
 }
コード例 #3
0
ファイル: BuilderTest.php プロジェクト: hpbuniat/parallely
 /**
  *
  */
 public function testTransportMissingConfig()
 {
     $this->setExpectedException('\\parallely\\Exception', \parallely\Exception::SETUP_ERROR);
     \parallely\Builder::transport('file');
 }