setValue() public method

Set the callback result value.
public setValue ( mixed $value )
$value mixed
コード例 #1
0
ファイル: Machine.php プロジェクト: daylerees/scientist
 /**
  * Execute the callback, but swallow exceptions.
  *
  * @return void
  */
 protected function executeMutedCallback()
 {
     try {
         $this->result->setValue(call_user_func_array($this->callback, $this->params));
     } catch (Exception $exception) {
         $this->result->setException($exception);
         $this->result->setValue(null);
     }
 }
コード例 #2
0
ファイル: ResultTest.php プロジェクト: vantoozz/scientist
 public function test_result_can_have_value()
 {
     $r = new Result();
     $r->setValue('foo');
     $this->assertEquals('foo', $r->getValue());
 }