public function setShuffle($shuffle)
    {
        if (is_bool($shuffle)) {
            $this->shuffle = $shuffle;
        } else {
            $msg = "Shuffle must be a boolean, '" . gettype($shuffle) . "' given.";
            throw new InvalidArgumentException($msg);
        }
    }
public function setShuffle($shuffle)
    {
        if (is_bool($shuffle)) {
            $this->shuffle = $shuffle;
        } else {
            $msg = "Shuffle must be a boolean, '" . gettype($shuffle) . "' given.";
            throw new InvalidArgumentException($msg);
        }
    }
public function setShuffle ( $ shuffle ) { if ( is_bool ( $ shuffle ) ) { $ this -> shuffle = $ shuffle ; } else { $ msg = "Shuffle must be a boolean, '" . gettype ( $ shuffle ) . "' given." ; throw new InvalidArgumentException ( $ msg ) ; } }
Set if the child elements must be randomized.

@param boolean $shuffle true if they must be randomized, false otherwise.
@throws \InvalidArgumentException If $shuffle is not a boolean.
Set if the child elements must be randomized .