addAttribute() public method

Adds attribute based on its original name
public addAttribute ( string $attributeName, string $attributeType ) : Struct
$attributeName string the attribute name
$attributeType string the attribute type
return Struct
コード例 #1
0
 /**
  * @expectedException \InvalidArgumentException
  */
 public function testSetModelBasNameOneAttributeWithException()
 {
     $struct = new StructModel(self::bingGeneratorInstance(), 'Foo');
     $struct->addAttribute('bar', 'string');
     $array = new ArrayFile(self::bingGeneratorInstance(), 'Foo');
     $array->setModel($struct);
 }