public function intersect(Value $set)
    {
        $intersect = $this->value;

        /** @var Value $arg */
        foreach (func_get_args() as $arg) {
            /** @var array $convertedArg */
            $convertedArg = $arg->getSet()->getValue();
            //array_values is needed to make sure the indexes are ordered from 0
            $intersect = array_values(array_intersect($intersect, $convertedArg));
        }

        return new self($intersect);
    }
public function intersect(Value $set)
    {
        $intersect = $this->value;

        /** @var Value $arg */
        foreach (func_get_args() as $arg) {
            /** @var array $convertedArg */
            $convertedArg = $arg->getSet()->getValue();
            //array_values is needed to make sure the indexes are ordered from 0
            $intersect = array_values(array_intersect($intersect, $convertedArg));
        }

        return new self($intersect);
    }
public function intersect ( Value $ set ) { $ intersect = $ this -> value ; /** @var Value $arg */ foreach ( func_get_args ( ) as $ arg ) { /** @var array $convertedArg */ $ convertedArg = $ arg -> getSet ( ) -> getValue ( ) ; //array_values is needed to make sure the indexes are ordered from 0 $ intersect = array_values ( array_intersect ( $ intersect , $ convertedArg ) ) ; } return new self ( $ intersect ) ; }
Set intersection operator.

Returns a Set which is the intersection of this Set with all passed sets.

@param Value $set,...

@return Set
Set intersection operator .