function add(BitWord $bitWord) { $bitWord->setKey($this->key()); $this->bitList[] = $bitWord; $this->next(); }
public function testBitWord() { #sample array $ArraySample = array('one', 'two', 'three'); $bitObj = new BitWord(); $bitObj->setWord('WORD'); $bitObj->setDefinition("DEFINITION OF WORD"); $bitObj->setSynonym("ANOTHER"); $bitObj->setKey(0); #TEST $this->assertEquals('WORD', $bitObj->getWord()); $this->assertEquals("DEFINITION OF WORD", $bitObj->getDefinition()); $this->assertEquals("ANOTHER", $bitObj->getSynonym()); $this->assertEquals("0", $bitObj->getKey()); $this->assertEquals(0, $bitObj->getKey()); return $bitObj; }
public function isUnique(BitWord $word) { $bool = !in_array($word->getKey(), $this->getObjKeys()); return $bool; }