simplesamlphp /
xml-common
| 1 | <?php |
||
| 2 | |||
| 3 | declare(strict_types=1); |
||
| 4 | |||
| 5 | namespace SimpleSAML\XMLSchema\XML; |
||
| 6 | |||
| 7 | use SimpleSAML\XML\Assert\Assert; |
||
| 8 | use SimpleSAML\XMLSchema\Exception\SchemaViolationException; |
||
| 9 | use SimpleSAML\XMLSchema\Type\IDValue; |
||
| 10 | use SimpleSAML\XMLSchema\Type\NCNameValue; |
||
| 11 | use SimpleSAML\XMLSchema\Type\QNameValue; |
||
| 12 | use SimpleSAML\XMLSchema\Type\Schema\MaxOccursValue; |
||
| 13 | use SimpleSAML\XMLSchema\Type\Schema\MinOccursValue; |
||
| 14 | use SimpleSAML\XMLSchema\XML\Constants\NS; |
||
| 15 | use SimpleSAML\XMLSchema\XML\Interface\ParticleInterface; |
||
| 16 | |||
| 17 | use function is_null; |
||
| 18 | |||
| 19 | /** |
||
| 20 | * Abstract class representing the realGroup-type. |
||
| 21 | * |
||
| 22 | * @package simplesamlphp/xml-common |
||
| 23 | */ |
||
| 24 | abstract class AbstractRealGroup extends AbstractGroup |
||
| 25 | { |
||
| 26 | /** The namespace-attribute for the xs:anyAttribute element */ |
||
| 27 | public const string XS_ANY_ATTR_NAMESPACE = NS::OTHER; |
||
|
0 ignored issues
–
show
Bug
introduced
by
Loading history...
|
|||
| 28 | |||
| 29 | |||
| 30 | /** |
||
| 31 | * Group constructor |
||
| 32 | * |
||
| 33 | * @param \SimpleSAML\XMLSchema\XML\Interface\ParticleInterface|null $particle |
||
| 34 | * @param \SimpleSAML\XMLSchema\Type\NCNameValue|null $name |
||
| 35 | * @param \SimpleSAML\XMLSchema\Type\QNameValue|null $reference |
||
| 36 | * @param \SimpleSAML\XMLSchema\Type\Schema\MinOccursValue|null $minOccurs |
||
| 37 | * @param \SimpleSAML\XMLSchema\Type\Schema\MaxOccursValue|null $maxOccurs |
||
| 38 | * @param \SimpleSAML\XMLSchema\XML\Annotation|null $annotation |
||
| 39 | * @param \SimpleSAML\XMLSchema\Type\IDValue|null $id |
||
| 40 | * @param array<\SimpleSAML\XML\Attribute> $namespacedAttributes |
||
| 41 | */ |
||
| 42 | public function __construct( |
||
| 43 | ?ParticleInterface $particle = null, |
||
| 44 | ?NCNameValue $name = null, |
||
| 45 | ?QNameValue $reference = null, |
||
| 46 | ?MinOccursValue $minOccurs = null, |
||
| 47 | ?MaxOccursValue $maxOccurs = null, |
||
| 48 | ?Annotation $annotation = null, |
||
| 49 | ?IDValue $id = null, |
||
| 50 | array $namespacedAttributes = [], |
||
| 51 | ) { |
||
| 52 | Assert::nullOrIsInstanceOf( |
||
| 53 | $particle, |
||
| 54 | ParticleInterface::class, |
||
| 55 | SchemaViolationException::class, |
||
| 56 | ); |
||
| 57 | |||
| 58 | parent::__construct( |
||
| 59 | $name, |
||
| 60 | $reference, |
||
| 61 | $minOccurs, |
||
| 62 | $maxOccurs, |
||
| 63 | is_null($particle) ? [] : [$particle], |
||
| 64 | $annotation, |
||
| 65 | $id, |
||
| 66 | $namespacedAttributes, |
||
| 67 | ); |
||
| 68 | } |
||
| 69 | } |
||
| 70 |