public function __construct($class, $required_type, array $initialized_attrs)
{
if (!is_string($class)) {
throw new \InvalidArgumentException('$class must be a class name.');
}
$this->class = $class;
if (!is_string($required_type)) {
throw new \InvalidArgumentException('$requiredType must be a system entity type.');
}
$this->required_type = $required_type;
$this->initialized_attributes = $initialized_attrs;
$all_attr_names = array_keys($initialized_attrs);
$this->secondary_attr_names = array_diff($all_attr_names, self::$primary_attr_names);
}