function SetWeights($weights) { assert(is_array($weights)); foreach ($weights as $weight) { assert(is_int($weight)); } $this->_weights = $weights; }