setValueFor() публичный Метод

public setValueFor ( $requestName, $value )
Пример #1
0
 protected function interact(InputInterface $input, OutputInterface $output)
 {
     // Fill up questions
     if ($this->informationCollector->hasMissingInformation()) {
         foreach ($this->informationCollector->getInteractiveQuestions() as $name => $question) {
             $answer = $this->askQuestion($question);
             $this->informationCollector->setValueFor($name, $answer);
             $this->writeEmptyLine();
         }
     }
 }
 public function testSetAndGetValueFor()
 {
     $ic = new InformationCollector();
     $ic->registerRequest(new InformationRequest('foo'));
     $ic->setValueFor('foo', 'bar');
     $this->assertEquals('bar', $ic->getValueFor('foo'));
 }