public function setAcceptedCardinalities(array $acceptedCardinalities)
    {
        foreach ($acceptedCardinalities as $cardinality) {
            if (!in_array($cardinality, OperatorCardinality::asArray(), true)) {
                $msg = "Accepted cardinalities must be values from the Cardinality enumeration, '" . $cardinality . "' given";
                throw new InvalidArgumentException($msg);
            }
        }

        $this->acceptedCardinalities = $acceptedCardinalities;
    }
public function setAcceptedCardinalities(array $acceptedCardinalities)
    {
        foreach ($acceptedCardinalities as $cardinality) {
            if (!in_array($cardinality, OperatorCardinality::asArray(), true)) {
                $msg = "Accepted cardinalities must be values from the Cardinality enumeration, '" . $cardinality . "' given";
                throw new InvalidArgumentException($msg);
            }
        }

        $this->acceptedCardinalities = $acceptedCardinalities;
    }
public function setAcceptedCardinalities ( array $ acceptedCardinalities ) { foreach ( $ acceptedCardinalities as $ cardinality ) { if ( ! in_array ( $ cardinality , OperatorCardinality :: asArray ( ) , true ) ) { $ msg = "Accepted cardinalities must be values from the Cardinality enumeration, '" . $ cardinality . "' given" ; throw new InvalidArgumentException ( $ msg ) ; } } $ this -> acceptedCardinalities = $ acceptedCardinalities ; }
Set the accepted operand cardinalities.

@param array $acceptedCardinalities An array of values from the Cardinality enumeration.
@throws \InvalidArgumentException If a value from $acceptedCardinalities is not a value from the Cardinality enumeration.
Set the accepted operand cardinalities .