コード例 #1
0
ファイル: Form.php プロジェクト: Imangazaliev/Tweezers
 /**
  * Gets the value of a field.
  *
  * @param string $name The field name
  *
  * @return FormFieldInterface The associated Field instance
  *
  * @throws \InvalidArgumentException if the field does not exist
  */
 public function offsetGet($name)
 {
     return $this->fields->get($name);
 }
コード例 #2
0
 /**
  * @expectedException \InvalidArgumentException
  */
 public function testFormFieldRegistryGetThrowAnExceptionWhenTheFieldDoesNotExist()
 {
     $registry = new FormFieldRegistry();
     $registry->get('foo');
 }