상속: extends AbstractModel
 /**
  * @return StructAttributeContainer
  */
 public static function instance()
 {
     $struct = StructTest::instance('Bar', true);
     $structAttributeContainer = new StructAttributeContainer(self::getBingGeneratorInstance());
     $structAttributeContainer->add(new StructAttribute(self::getBingGeneratorInstance(), 'foo', 'string', $struct));
     $structAttributeContainer->add(new StructAttribute(self::getBingGeneratorInstance(), 'bar', 'int', $struct));
     $structAttributeContainer->add(new StructAttribute(self::getBingGeneratorInstance(), 'Bar', 'float', $struct));
     $structAttributeContainer->add(new StructAttribute(self::getBingGeneratorInstance(), 'fooBar', 'bool', $struct));
     return $structAttributeContainer;
 }
예제 #2
0
 /**
  * Returns the attribute by its name, otherwise null
  * @uses Struct::getAttributes()
  * @param string $attributeName the original attribute name
  * @return StructAttribute|null
  */
 public function getAttribute($attributeName)
 {
     return $this->attributes->getStructAttributeByName($attributeName);
 }