Пример #1
0
 function add(BitWord $bitWord)
 {
     $bitWord->setKey($this->key());
     $this->bitList[] = $bitWord;
     $this->next();
 }
Пример #2
0
 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;
 }
Пример #3
0
 public function isUnique(BitWord $word)
 {
     $bool = !in_array($word->getKey(), $this->getObjKeys());
     return $bool;
 }