public function setProperty($property, $value) { $property = Util::generateValidIdentifier($property); if ($this->dataTypeDefinition->hasProperty($property, $this->view)) { $this->properties[$property] = (string) $value; } else { throw new CMDLParserException('Unknown property ' . $property, CMDLParserException::CMDL_UNKNOWN_PROPERTY); } return $this; }
public function __construct(DataTypeDefinition $definition, $property, $type) { $this->dataTypeDefinition = $definition; if (!$definition->hasProperty($property)) { throw new AnyContentClientException('Unknown sequence property ' . $property . ' for data type ' . $definition->getName()); } $this->type = $type; }